LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Counting amp cycles

Solved!
Go to solution

Hello all.  I am desiring to count cycles in a current wave.  I am measuring current on heater plates and I wish to count each time the current hits a threshold.  My issue is that it appears I am counting only groups of cycles instead of individual cycles.  The attached screenshot shows an example of my situation.  .  So in a 1 second time period, the Waveform graph shows about 80 cycles, 40 on the positive side of 0 and 40 on the negative side of 0.  Yet, my Cycles counter will only show about 3 or so.  As we have seen, the heater plates cycle 24 times ~ 0.16 seconds, then are at rest (~0 amps) for ~0.12 seconds.  So in 1 second, you should get about 80 cycles, so our cycle counts should be much, much higher. Is Labview counting a group of 24 cycles as 1 cycle?  

 

I may have a misunderstanding on how the Level and Hysteresis works.  I am seeing a peak amperage of roughly 2 amps, so I set this as my level.  I then set a Hysteresis of 1.5.  So shouldn't this mean that if Labview detects a current within 0.5 to 3.5, it would count this as a trigger?  I want to count on the rising edge as a count, so according to the Help for the Basic Level Trigger Detection VI, I would use Level - Hysteresis, which here would be 2 - 1.5 = 0.5.   Am I thinking of this wrongly?

Download All
0 Kudos
Message 1 of 3
(3,167 Views)
Solution
Accepted by Dhouston

Hi Dhouston,

 

as your signal seems to contain only very little noise a simple approach might be like this:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(3,152 Views)

Yes!  This is excellent!  With this, we found we did not even need the Trigger Detection we had been using.  We took this and added in our DAQAmx current readings, then put an Addition past the U32 conversion and got exactly what we needed.

 

Thanks again greatly for your help.  This will come in very handy for other current measuring projects we will have coming up.

0 Kudos
Message 3 of 3
(3,016 Views)