From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Zero Crossing Point Help

Hi all,

 

Looking to find the zero crossing points of a waveform. There are examples of this code but none of them i find do quite what i want.

 

I need the zero crossing points and also the direction of the crossing (negative going crossing or positive going crossing).

 

i am trying to get one array containing all the crossing points and one boolean array containing the direction information relating to that corssing. E.g True = positive crossing...etc.

 

Does anyone have an idea how i can get the direction information. Please see my code.

 

Regards

 

 

 

 

0 Kudos
Message 1 of 5
(2,727 Views)

Search for the VI "Boolean Crossing Pt by Pt".  It can detect True to False, False to True, or changes in either direction.  Couple that with a greater than zero comparison, you should be good to go.

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

The boolean crossing Vi does detect a crossing but it does not tell you the direction, only that one has occured when the direction input is wired as both directions.

 

 

0 Kudos
Message 3 of 5
(2,704 Views)

@qwerty257 wrote:

The boolean crossing Vi does detect a crossing but it does not tell you the direction, only that one has occured when the direction input is wired as both directions.

 

 


use the zero crossing pt by pt.vi....check out the output bools?

 

Spoiler
Sine w Noise gen.png

 

0 Kudos
Message 4 of 5
(2,700 Views)

@qwerty257 wrote:

The boolean crossing Vi does detect a crossing but it does not tell you the direction, only that one has occured when the direction input is wired as both directions.

 

 


Use two.  One for each direction.

 

 

EDIT:  I like Apok's zero crossing pt. by pt.  I hadn't come across that one before.  I had remembered the boolean one because it has been mentioned in several threads recently.;

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