From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Run VI at certain time

Hello All,
I want to know of there is a way to run a VI at a desired time. For example lets say I want a VI to automatically start running at 6 PM w/o me physically having to press the run button. Is there a way to tie a VI to the PC time clock and have it run at a desired time?

Thanks
Message 1 of 6
(3,173 Views)

Well, to my knowledge, there are two ways:

1: you can setup the vi in the top level to read system time. When the system is 6:00, then it start runung, other wise, it just keeps idle.

2: write another program which can be written by different language, to start your VI at 6:00

Message 2 of 6
(3,167 Views)
What about Windows Sheduled tasks (Start/All Programs/Accessories/Scheduled Tasks/...) and point it to your exe. Never tried it though, just a thought.
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Message 3 of 6
(3,162 Views)

Use schedule task is really a good idea.

The point here is that the vi front panel has a Run button, can the schedule task automatically initiale the RUN button without changing any VI code? of course, schedule task can load vi.

0 Kudos
Message 4 of 6
(3,146 Views)
Using the VI Properties a VI can be set to run when opened.

Lynn
Message 5 of 6
(3,138 Views)

As far as I know, Windows task scheduler can only run programs. You would have to create an exe from your project to make this work. If you could somehow schedule your VI to open at a certain time, you could just set it to run when opened.

My suggestion: use code to wait in the VI itself. Then you can start the VI and push a button to have it wait until a certain time before actually starting.

Message 6 of 6
(3,137 Views)