LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Loop Timing at alternating speeds

I am having difficulty finding a solution to having i.e. controlling a lamp to remain OFF for longer periods than ON. There is Timer that allows no wait states if signal is False but it requires Front Panel action if the signal is True. Is there a VI or function that allows two different delays depending on the Boolean comparison done in the loop?
0 Kudos
Message 1 of 9
(3,130 Views)
Can you use the Select function (in the Comparison Function palette)? See attached.
Tim
0 Kudos
Message 2 of 9
(3,130 Views)
Thank you for the suggestion. "Select" is good but I have worked out an arrangement with the Case Structure which allows me to use one slider to determine the % time ratio dedicated to each path.

I will now check which one works best for this application.

RL
0 Kudos
Message 3 of 9
(3,130 Views)
Lamp ON/OFF timed loop

(Beware of loop delay which might affect the actual time lapsed)
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 4 of 9
(3,130 Views)
Thank you.

The ultimate goal is to control heaters by using the Write 1 point to Digital Line. I have used a Case Structure within a While Loop that has a Not(to alternate between true and false).

At first I put 4 individual "Write 1 pt Dig Line.vi" then I eliminated the redundant parts. There still is a problem that the fourth and sometimes the third relay stays on (past that Off cycle) as if the time for that frame was over before the execution order was finished. I did put a timer in my While Loop to slow it down to a 1 second cycle but the results did not change. The Timer in the Case Structures was also increased but nothing got them all working together, all the time.

It might take a graph to figure out the pattern.

RL
0 Kudos
Message 5 of 9
(3,130 Views)
If you are talking about digital I/O, how about using the (Advanced) DIO Port Write instead of Write to Digital Line?

Note: You will need to set the Line Mask for DIO Port Write.
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 6 of 9
(3,130 Views)
Thank you. Where do I find "(Advanced) DIO Port Write"?

RL
0 Kudos
Message 7 of 9
(3,130 Views)
In the Function Palette:
Data Acquisition > Digital I/O > Advanced Digital I/O
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 8 of 9
(3,130 Views)

Thank you,

 

Seven years later this vi is still saving newbie's : )

 

 

Ian Pryce

0 Kudos
Message 9 of 9
(2,600 Views)