LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem trying to mantain a boolean state

Hello everyone, I'm working in a Cardioverter simulator for school, basically what should do is be constantly generating a ECG singal, but when charge and discharge buttons are TRUE and the signal reaches the highest value ( QRS peak) the signal should become 0 for a moment and then start again, I'm using Simulate Arbitrary Signal to generate the ECG signal, using a SELECT I can Switch between maximum amplitude ONE to CERO, however it only becomes CERO for a cicle, and I need it to be CERO for many cicles before the signal starts again, but I dont know how to HOLD the TRUE State that controls the SELECT.

 

Can someone help me with this? I attached my VI.

0 Kudos
Message 1 of 5
(3,078 Views)

You need to store your reset status in a shift register.  It only needs to be true for one iteration of the loop otherwise it will continue to reset.  Make your boolean comparisons after generating the signal so you can get rid of the feedback node.  I don't really understand your comparisons so I am unsure what should go on the true case.

Capture.PNG

aputman
0 Kudos
Message 2 of 5
(3,066 Views)

I think I attached the wrong file, let me attached the updated one, I tried the shift register and now it makes CERO the amplitude for two cicles but I still need it to be for more cicles, i want my signal to look like this:

Target.PNG

 

When charge and discharge buttons are pressed and the signal is higher than 0.8 the signal should go to CERO and then start over again.

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

Your signal generator is outputting one value per loop iteration.  Does that help you any?

aputman
0 Kudos
Message 4 of 5
(3,003 Views)

try something like this...

 

 

0 Kudos
Message 5 of 5
(2,993 Views)