LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Execute VI in certain hours

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

Peter.

Labview 2010
0 Kudos
Message 1 of 12
(2,902 Views)

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

 

0 Kudos
Message 2 of 12
(2,901 Views)

Why don't you just use the OS scheduling capabilities? Seems to me to be far easier.

0 Kudos
Message 3 of 12
(2,897 Views)

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 ?

Peter.

Labview 2010
0 Kudos
Message 4 of 12
(2,895 Views)
So what is your problem with the windows scheduler solution that was given? Unless your VI is always running, you'll need another program to start it.
0 Kudos
Message 5 of 12
(2,881 Views)

Yes my VI is always running ...

Peter.

Labview 2010
0 Kudos
Message 6 of 12
(2,879 Views)

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.

0 Kudos
Message 7 of 12
(2,874 Views)
So then, I don't understand what your problem is. Doing a time comparison is pretty simple as the example shows. Attach your code with details on what does not work.
0 Kudos
Message 8 of 12
(2,871 Views)

For example:

To remove date just convert to number which just contains time string.

Probably there are more beautiful ways

0 Kudos
Message 9 of 12
(2,868 Views)

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.

 

 

Peter.

Labview 2010
0 Kudos
Message 10 of 12
(2,866 Views)