LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

schedule a vi to run on a particular day of the week


@dadest100 wrote:

The VI it's been running for 5 days now with no problems. I agree, a small delay would reduce the CPU % and I should probably add it, but if you want to check the time using labview then there's no other way around it. The VI has to run continuously checking the current time so you can compare it. Only other way to do it is using the Task Scheduler but I want to only have labview running and not rely on another app. 

 

At the moment, the VI has a window of 0.5secs to react to the triggering signal. If you increase this range too much and you only want to run your program once, it might run a few times within this window depending on how much you need to process. I am comparing a rounded decimal = integer to zero. No problems with that. 


 

What you should do ... ,

  1. Make a State Machine with a Timeout Case
  2. Make your timeout adaptive, that is, when you are a week away from starting your VI, make your time out 10s, as you get closer to the time trigger, shorten your timeout.
  3. Use your state machine to change the timeout.

mcduff

0 Kudos
Message 11 of 12
(514 Views)

@dadest100 wrote:

The VI it's been running for 5 days now with no problems. I agree, a small delay would reduce the CPU % and I should probably add it, but if you want to check the time using labview then there's no other way around it. The VI has to run continuously checking the current time so you can compare it. Only other way to do it is using the Task Scheduler but I want to only have labview running and not rely on another app. 

 

 


I don't know what you mean by this.  Task Scheduler is not another app.  It is built into Windows and is always there running whether you realize it or not.  Complie your LabVIEW program into an .exe, and set up Task Scheduler to call that weekly at a specific time.  Then you won't have to worry about if someone accidentally closes your LabVIEW program.

0 Kudos
Message 12 of 12
(506 Views)