|
|
|
It is currently Wed Jun 19, 2013 6:32 am
|
View unanswered posts | View active topics | View unsolved topics
|
Page 1 of 1
|
[ 6 posts ] |
|
| Author |
Message |
|
JohnLynx
Cadet
Joined: Thu Jun 28, 2012 11:44 am Posts: 8
|
 Window popup time of day
I would like to be able to open a window at a specific time of day. Appreciate any help on this.
|
| Fri Jun 29, 2012 8:06 am |
|
 |
|
Robert.McKenzie
Moderator
Joined: Wed Apr 18, 2007 11:00 am Posts: 399 Location: Sacramento Ca.
|
 Re: Window popup time of day
You can use a Client Timer Script! You can find it in the designer under Project -> Event Scripts (Client). I would make one that ran every minute and opened the window on a specific time. Just make sure you check the time at the beginning of the script.
_________________ Robert McKenzie Inductive Automation Technical Support
|
| Fri Jun 29, 2012 8:23 am |
|
 |
|
JohnLynx
Cadet
Joined: Thu Jun 28, 2012 11:44 am Posts: 8
|
 Re: Window popup time of day
Could you give an example of how it would be written. I am quite new to Ignition and the scripting aspect of it all. Thanks.
|
| Fri Jun 29, 2012 8:27 am |
|
 |
|
Robert.McKenzie
Moderator
Joined: Wed Apr 18, 2007 11:00 am Posts: 399 Location: Sacramento Ca.
|
 Re: Window popup time of day
Code: from time import localtime, strftime curTime = strftime("%H:%M", localtime()) print curTime
if curTime == "17:30": #it's beer thirty! system.tag.write("Beer Cask 1/Flow Control/open", 1)
_________________ Robert McKenzie Inductive Automation Technical Support
|
| Fri Jun 29, 2012 9:08 am |
|
 |
|
JohnLynx
Cadet
Joined: Thu Jun 28, 2012 11:44 am Posts: 8
|
 Re: Window popup time of day
thanks works with system.tag.write("Beer Cask 1/Flow Control/open", 1) being replaced with system.nav.openWindow("windowname")
|
| Fri Jun 29, 2012 9:28 am |
|
 |
|
James.Lorenz
Moderator
Joined: Mon Jun 04, 2012 8:53 am Posts: 413
|
 Re: Window popup time of day
That's correct, although if you're opening a window, system.nav.swapTo("windowname") will be the way to go. This function will properly handle closing the window that was previously in focus and open the new one. If you're just opening a popup, then openWindow works fine.
_________________ James Lorenz QA/Build Engineer Inductive Automation
|
| Fri Jun 29, 2012 9:44 am |
|
 |
|
|
Page 1 of 1
|
[ 6 posts ] |
|
Who is online |
Users browsing this forum: diat150 and 1 guest |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|