cancel
Showing results for 
Search instead for 
Did you mean: 

Loop Timing at alternating speeds

RL
Member
Member

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?
8 REPLIES 8
Shan
Active Participant

Re: Loop Timing at alternating speeds

Message contains an attachment
Can you use the Select function (in the Comparison Function palette)? See attached.
Tim
RL
Member
Member

Re: Loop Timing at alternating speeds

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
ian_fung
Trusted Enthusiast

Re: Loop Timing at alternating speeds

Message contains an attachment
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
RL
Member
Member

Re: Loop Timing at alternating speeds

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
ian_fung
Trusted Enthusiast

Re: Loop Timing at alternating speeds

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
RL
Member
Member

Re: Loop Timing at alternating speeds

Thank you. Where do I find "(Advanced) DIO Port Write"?

RL
ian_fung
Trusted Enthusiast

Re: Loop Timing at alternating speeds

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
iprycejr
Member

Re: Loop Timing at alternating speeds

Thank you,

 

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

 

 

Ian Pryce