LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

build an integrator waveform

Greetings!
 
I´ll go directly to the subject. I have a waveform that is always positive, and I want to build an integral waveform for it. But there is a catch, I want to, whenever the waveform is below a threshold, the integral graph data points come down to 0(zero) and stay there while the signal is below a threshold. In general the signal I´m looking for would look like a sawtooth.
The tests I´ve made makes the integral always go up (has expected :S)
Can anyone assist in this problem. Thanks 😉
0 Kudos
Message 1 of 10
(3,805 Views)
As you are aware the integral of an always positive waveform will keep increasing indefinitely.

It appears you have two special cases you may need to handle. One is the reset when the signal is below threshold. The other is when the integral reaches a maximum value.

For the below threshold case use a compartor to detect whether the current point is below the threshold. Use a case structure to reset the integral output to zero when true. Similarly a comparator and case structure can handle the overflow situation.

Lynn
Message 2 of 10
(3,790 Views)
Thanks for the reply Lynn. 🙂
 
I have a wire of dinamic data (signal wafeform). I´ve thought about that solution but I don´t seem to find any way of reseting the integral :S. Any suggestions??
0 Kudos
Message 3 of 10
(3,789 Views)
Post the VI you have, along with some typical data saved as default, and someone will likely be able to suggest how to put it together.

Lynn
0 Kudos
Message 4 of 10
(3,784 Views)
Ok Lynn. The attachs are below. The data txt and the vi. Thanks in advance.
Download All
0 Kudos
Message 5 of 10
(3,782 Views)
I added an integrate by adding function with threshold to your VI. If you set the threshold to zero you will see the integral continue to ramp up due to the DC component in your signal. You may want to add some scaling or weighting factors.

I also eliminated your local variable (x/y) as direct wiring is better when it can be done.

Lynn
0 Kudos
Message 6 of 10
(3,772 Views)
ok thanks! 😉 But could you post the changes you've made in my vi.
0 Kudos
Message 7 of 10
(3,769 Views)
Sorry. I missed the attachment. You would think by now that the Forum web site could read our minds and attach the right files!

Lynn
Message 8 of 10
(3,763 Views)
LOL. Thanks Lynn. I´ll try this as soon as I get home. I´m at work now. Be in touch as I´ll reply again if it worked ;). Sallutation from Portugal :D.
0 Kudos
Message 9 of 10
(3,760 Views)

HA ha ha ha ha....It´s.......ALIVEEEEEE!!!!!!!!!

Thanks Lynn, it worked like a charm. RATE 5 😉

0 Kudos
Message 10 of 10
(3,746 Views)