LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help about Date/Time

I need to know How to code for Control state machine with date/time. for example I have 3 State (Initialize) , (Code 1) and (Code 2) Then I need to work "Code 1" for every 3 day at 8.00 PM. How can i code it.

 

Thank For Help

Molly

 

 

0 Kudos
Message 1 of 2
(2,197 Views)

What parts are you having problems with? LabVIEW has a rich collection of timing functions.

 

As a first step you should define all states and what they do. Is there also an "idle" state where it just checks the time occasionally? How often does "code 2" need to run? What does the program actually do? How precise does the 8:00 pm need to be? (microseconds? minutes?)

 

3 days is a long time. You probably also want to keep an updated state file that records whenever "code 1" has executed so the phase is maintained even if the program or computer needs to restart. Does this run on a PC or on an embedded system?

 

You typically get the best help if you attach your current code and point out what the problem is. Maybe start with a simplified sandbox version that does a certain state every 10 seconds, for example.

0 Kudos
Message 2 of 2
(2,178 Views)