06-10-2012 06:29 AM
Hi,
I want my VI to start (for example) at 9:00AM to 5:00PM (This hours should be customizable), when we are into this time slot I want to set a boolean at the value true.
Any example please ?
Thanks;
Peter
06-10-2012 06:34 AM
In labview examples at the website:
Run a task that starts at a start time and stops at a stop time.
https://decibel.ni.com/content/docs/DOC-4521
06-10-2012 06:36 AM
Why don't you just use the OS scheduling capabilities? Seems to me to be far easier.
06-10-2012 06:42 AM
Hi EmcV,
the solution that you gave to me is not exactly what I want, in fact my VI should be executed between 9:00 AM and 5:00 PM "every day" and your in your example it isn't that. How can I modify it to do what I want ?
06-10-2012 07:24 AM
06-10-2012 07:29 AM
Yes my VI is always running ...
06-10-2012 07:47 AM
Well, if your VI is always running, then what is the issue with the simple approach shown in the linked article? All you need to do is look at the current time and compare it to the set time, or a pair of set times if it has to run only between certain hours.
06-10-2012 07:49 AM
06-10-2012 07:55 AM
For example:
To remove date just convert to number which just contains time string.
Probably there are more beautiful ways
06-10-2012 08:02 AM
the problem with your example is that my program is always running and must do task in a time slot every day.
EmcV you probably have the right solution : remove the date. Can you resend your VI example for the labview 9.0 version please.