LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TRAPPING AND RECORDING AN EVENT

Solved!
Go to solution

Hi,

This is the updated VI. It is still continuously writing to the text file, perhaps I am missing something

Many thanks for your assistance

 

 

Log.JPGStop Capture.JPG

 

0 Kudos
Message 11 of 19
(701 Views)

Invert the input from the shift register - right click on that input on the compound arithmetic node and select invert input. 

0 Kudos
Message 12 of 19
(692 Views)

@paul.r wrote:

Invert the input from the shift register - right click on that input on the compound arithmetic node and select invert input. 


output that is.

Message 13 of 19
(686 Views)

Hi,

Tried inverting, but the input into the file is still continuous. Maybe I don't understand as I am completely new to this. Anyway I could send the VI ?

 

 

0 Kudos
Message 14 of 19
(668 Views)

Personally I am not a fan of Feedback Nodes, a Shift Register does the same thing and does not break the data flow paradigm like FB nodes... (IMHO)

 

Anyway what you need to do here is what we used to call back in the day "Set a flag" 

 

See my soultion to  How to send email when vacuum reaches threshold for an example.

========================
=== Engineer Ambiguously ===
========================
Message 15 of 19
(664 Views)

@Tim_56 wrote:

Anyway I could send the VI ? 


Yes, that would help.

Message 16 of 19
(657 Views)

@RTSLVU wrote:

Personally I am not a fan of Feedback Nodes, a Shift Register does the same thing and does not break the data flow paradigm like FB nodes... (IMHO)


I concur.

Message 17 of 19
(655 Views)

Hi,

Hopefully I have done this correctly !

0 Kudos
Message 18 of 19
(625 Views)
Solution
Accepted by topic author Tim_56

If the output is TRUE, and previous is FALSE, the IO is going up. Then you want to log. So the log should be in the TRUE case of the case structure.

 

Right click the case, and when showing the FALSE case, select Make this the TRUE case.

 

Some stuff to reflect on: 

Spoiler

Alternatively, you can invert the output of the compound arithmetic node.

 

Then you'd have a !Log if !A NAND B, that would read as Don't not log if previous is FALSE and current is TRUE.

That could\should be refactored to A OR !B. That would  read as "don't log if previous is TRUE or current is FALSE".

In general, and AND can be changed to an OR (and vice versa) by inverting ALL inputs and outputs. If you have more then two inverted  terminals, that is usually conceptually easier.

 

Message 19 of 19
(621 Views)