LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timming Loops

I want to program a timming loop in Labview 5. I have two input buttons, if
one is pressed an output goes to an external module,
which produces a 1 second pulse.
If the other is pressed in need to change to a diferent mode where when you
press button one a boolean output (true) is generated for a time of
15 minutes, then it resets to false.
Also if during this 15 minute period you wish to abort the output you can.

I thought that I could read the current time into an array element then keep
checking to see if this equals time + 15 minutes, however
the array input is constantly updates?.

In psuedo code this could be :

loop
if button 2 not pressed goto loop
Array(1)= current time
loop1
if button 3 pressed end loop1
if array(1)hen loop1 and check again
otherwise end loop1
end loop

Any ideas?

Thanks

Allan
0 Kudos
Message 1 of 2
(2,647 Views)
Allan,

The easiest way to do this is to use a two Tick Count functions. The first
one is outside of a While loop, the second one is inside of the While loop.
Wire the first one through a tunnel into the While loop, add on the appropriate
ms (15*60*1000), wire the sum to one input of a compare function. Wire the
other input of the compare function to the second Tick Count function. Exit
the loop when the compare shows the second Tick count value is greater than
the summed value.

Regards,

Jim

"Allan Parry" wrote:
>>I want to program a timming loop in Labview 5. I have two input buttons,
if>one is pressed an output goes to an external module,>which produces a
1 second pulse.>If the other is pressed in need to change to a diferent mode
whe
re when you>press button one a boolean output (true) is generated for
a time of>15 minutes, then it resets to false.>Also if during this 15 minute
period you wish to abort the output you can.>>I thought that I could read
the current time into an array element then keep>checking to see if this
equals time + 15 minutes, however>the array input is constantly updates?.>>In
psuedo code this could be :>>loop>if button 2 not pressed goto loop >Array(1)=
current time>loop1>if button 3 pressed end loop1>if array(1)then loop1 and check again>otherwise end loop1>end loop>>Any ideas?>>Thanks>>Allan
0 Kudos
Message 2 of 2
(2,647 Views)