LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Terminate Do While Loop after 2 Event Structures Completed

Hi guys,

 

I have the following VI built to extract the amplitude of a wave at two seperate points.

 

Blood Pressure VI

 

Only one reading of each pressure is required to be taken before terminating the while loop.. which is why I have the Boolean constants in the event structure leading to the stop if true conditional terminal.  But it's not quite working.

 

Could someone give me a hand getting it fixed?  Smiley Happy

 

Pete


Regards,

Peter D

0 Kudos
Message 1 of 5
(3,180 Views)
I don't understand this; do you want the user to decide what the high and low pressure points are (by clicking on the respective buttons), or would you like the application to derive it?
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 5
(3,169 Views)
The user will select the high and low points; I can't use peak and valley detection as this is not where the high and low pressures occur on the input.

Regards,

Peter D

0 Kudos
Message 3 of 5
(3,163 Views)

What I really need is some kind of switch.. So that the instantaneous true value from the High and Low pressure buttons is held on the input of the AND gate.

 

So that once high and low buttons are pushed the do while loop will end.


Regards,

Peter D

0 Kudos
Message 4 of 5
(3,146 Views)

You acn use Shift Register for that.

 

Add two shift register to your while loop and initialize them with boolean trues. Us an And gate to to perfrom and And between the Shift Register and the buttons with the reslut being used to update the SR after each iteration.

 

When one of you booleans goes fals the And will return fals and the false will be maintained in the SR so that one it goes false it stays false.

 

Have fun!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 5 of 5
(3,130 Views)