12-03-2018 09:47 AM
Hi,
I'm trying to trap and record the event whenever the emergency stop button is pushed on a particular machine. The VI I created does do that but the problem is that it continuously writes into the file while the emergency stop is engaged (False condition). I am trying to record only the first intances, but being completely new to Labview, I am struggling a bit. Any help would be greatly appreciated
Tim
Solved! Go to Solution.
12-03-2018 10:16 AM
With this simple structure you can convert the continuously true output in single true output
with this you can remove che chase structure and convert the boolean output to (0-1) for control directly for loop
12-03-2018 11:18 AM
First off get rid of the For loop, it's not doing any good. Second, either use a feedback node (like Diell said) or a Shift register.
You want to compare logic states- you want to trigger the write if (Value = True) AND (LastValue = False)
12-03-2018 11:26 AM
You can use 'Boolean Crossing PtByPt' to detect a T-F or F-T transition
12-03-2018 02:27 PM
As of LabVIEW 2018 (or maybe 2017), there is a new function called Value Changed.vim. You can use that to AND with your read value. When both are true, you write to your file.
12-03-2018 11:27 PM
Many thanks Diell
12-03-2018 11:28 PM
Many thanks
12-04-2018 09:43 AM
@Diell.it wrote:
With this simple structure you can convert the continuously true output in single true output
with this you can remove che chase structure and convert the boolean output to (0-1) for control directly for loop
Comparing a Boolean with true is redundant.
If a==true then b= false else b=c is basically a=!a and c
=
This reads better. If Boolean is true and previous Boolean is false, result is true.
12-05-2018 12:48 AM
Hi,
Still can't work out where this fits in. I tried it as the input to the True/False loop, but the input to the file remains continuous
Thanks for you assistance
12-05-2018 04:19 AM
Time to post your updated VI.
The shift register should go between the DAQ read and the case structure (NKA True\False loop).