LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I set a on/off timer(ex. Turn on at 7am, and turn off at 8pm)?

I want to set up a timer that turns of a mass flow controller at 7 am and turn it off at 8 pm everyday? Any suggestions (just for the timer part)?
0 Kudos
Message 1 of 3
(2,518 Views)

Hi Detroit,

 

check the system time, get the hours component, check range

(using a 24h time format is clearly easier here:smileywink:)

 

Use the usual boolean logic to detect changes in the state of "daytime?" (shift registerto remember old states; NOT(old state) AND (new state) to detect rising edge...)

Message Edited by GerdW on 08-17-2008 06:39 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(2,490 Views)

Hi Detroit,

 

Depending on how critical the system is, you may want to consider a real-time platform.  If the reliability of the Windows Operating System is acceptable, there is a nifty scheduler built into Windows XP.  To launch the scheduler, goto Start » Settings » Control Panel » Scheduled Tasks » Add Scheduled Task.  You can browse to any EXE file.  If your VI-built-EXE runs for an hour, Windows can take care of scheduling the start.  Just another approach from GerdW's, no better or worse as far as I can tell.

0 Kudos
Message 3 of 3
(2,448 Views)