LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TRAPPING AND RECORDING AN EVENT

Solved!
Go to solution

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

 

 

 

 

Stop Capture.JPG

 

 

0 Kudos
Message 1 of 19
(2,805 Views)

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
solved.png

Message 2 of 19
(2,799 Views)

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)

0 Kudos
Message 3 of 19
(2,776 Views)

You can use 'Boolean Crossing PtByPt' to detect a T-F or F-T transition

0 Kudos
Message 4 of 19
(2,771 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 19
(2,743 Views)

Many thanks Diell

0 Kudos
Message 6 of 19
(2,726 Views)

Many thanks

0 Kudos
Message 7 of 19
(2,725 Views)

@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
solved.png


Comparing a Boolean with true is redundant.

 

If a==true then b= false else b=c is basically a=!a and c

solved.png=  Going up.png

This reads better. If Boolean is true and previous Boolean is false, result is true.

Message 8 of 19
(2,704 Views)

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

0 Kudos
Message 9 of 19
(2,678 Views)

Time to post your updated VI.

 

The shift register should go between the DAQ read and the case structure (NKA True\False loop).

0 Kudos
Message 10 of 19
(2,668 Views)