04-11-2016 09:23 AM
I need to control a heater to be turned on for 60 seconds, and then be turned off for 120 seconds, and then the operation be repeated for a number of cycles. My main loop runs continuously with a delay of 50 ms, and needs a boolean signal from the switch continuously, so there is no possiblity of placing a wait or time elapsed function in this loop. When I try calling a subVI that has a delay, the output to my main loop would be delayed. Would anyone be able to recommend me in the right direction.
Solved! Go to Solution.
04-11-2016 09:27 AM
@prithvibasak wrote:there is no possiblity of placing a wait or time elapsed function in this loop
I haven't looked at your code yet, but the Elapsed Time VI doesn't cause your program to wait, so why wouldn't this work?
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
04-11-2016 09:33 AM - edited 04-11-2016 09:35 AM
Just do it like this. It initializes False, after time has elapsed, it switches to True, and so on.
This could use some clean-up with the Select nodes, but it gets the job done. This results in False for 120, then True for 60 seconds, rinse and repeat.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'