LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Zero crossing.vi

    Hello All,

I am using LV 8.2 and am having some problems with the zero crossing .vi.  As you can see in the attached .vi, when I loop through the array and look at individual values to determine if zero crossing has occured, the vi is able to identify these situations, but when I use the built in zero crossing .vi with a 1D array input it does not locate the zero crossing points.  Any ideas?

Thanks,

Azazel
Azazel

Pentium 4, 3.6GHz, 2 GB Ram, Labview 8.5, Windows XP, PXI-5122, PCI-6259, PCI-6115
0 Kudos
Message 1 of 9
(5,163 Views)
What do you mean? It detects 20 zero crossings. Have you watched the VI. Don't you see the crossing indicator change state?
0 Kudos
Message 2 of 9
(5,151 Views)

Azazel:

I am pretty sure you meant to say that when you are using "Zero Crossing Pt by Pt.vi", you can accurately determine where the zero crossings have occured (by looking at crossing indicator). However, when you use "Zero Crossing.vi" and pass in the same array of data points, you do not get the proper results. This is because "Zero Crossing" takes in an array of data that represents multiple signals. The confusion is that if you pass a 1-D array of data, it is analogous to the data sampled from multiple signals at the same time. I know this is confusing which is why I put together an example to illustrate my point. I have a 2-D array of data that represent two signals with 10 data points each. Please go through that example and let me know if it helps.

Regards,

Rudi N.

0 Kudos
Message 3 of 9
(5,130 Views)

So, is there a way around this?

 

@Rudi N your VI was missing a sub.

0 Kudos
Message 4 of 9
(4,487 Views)

Hi glskinner,

 

Can you provide more details for your question?

Cameron T
Applications Engineer
National Instruments
0 Kudos
Message 5 of 9
(4,463 Views)

I'm trying to pass an analog signal that has a 1d array datatype through a point to point crossing.vi. I don't think it will work because the output for this p2p.vi ends up having an Array of Booleans.

0 Kudos
Message 6 of 9
(4,448 Views)
0 Kudos
Message 7 of 9
(4,447 Views)

Yes the zero crossing P2P VI only passes out a boolean value corresponding to whether or not the input has just crossed the zero point (true when cross is made).  You should still be able to pass in the 1D array, it's just that the VI will output true everytime the cross is made from positive to negative or vice versa.

Cameron T
Applications Engineer
National Instruments
0 Kudos
Message 8 of 9
(4,431 Views)

Well, I modified the p2p to check values other than zero. It will only take a scalar threshold value, not an array data type. I think this was my problem.

0 Kudos
Message 9 of 9
(4,409 Views)