LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

zero crossing function

Hi,
 
I am trying to make a VI to count number of zeros in a sine wave generated using signal simulator. I am using zero crossing fun. ptbypt. the VI works ok for low frequencies upto 5 hz but doesnt prints zero crossing for anything above 5 hz. Any hint or comments.
 
VI is attached for reference.
 
0 Kudos
Message 1 of 3
(2,584 Views)

The PtByPtsubVI can only handle a single data point, but you give it an entire wavform at each call. The waveform is coerced to a single point (notice the grey dot on the input terminal). This means you are only analyzing only a very small fraction of your waveform data.

You probably need to convert your waveform to an array and then place the PtByPt VI inside an FOR loop indexed by the data.

0 Kudos
Message 2 of 3
(2,572 Views)

I know this post is old, but I have an issue running a "Continuous" ( -1 read) analog waveform through the Zero Crossing Pt2Pt. If I change the "number of samples per channel" to 2, it will count correctly. However at -1, It doesn't count the crossings, it just increments my counter indicator super fast when it does cross zero for the first time. I'm sending an array of one of my analog channels into the input of the crossing VI, not a waveform. Could my symptoms be solved by using a for loop as you suggested?  

0 Kudos
Message 3 of 3
(2,079 Views)