LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sine passings through zero

If I have a sine how can I extrect the moments the signal passes from negative values to positive values(the moments when the signal passes through zero).

Thank you

0 Kudos
Message 1 of 6
(3,137 Views)

Hi

 

You will need to use greater or equal function in programming/comparaison palette. You compare with a constant ( 0 in your case)

 

What time do you want? You said it's a sin function so the zero crossing will repeat over a certain period. Do you want to know the time from start until it cross the first time zero? Or the time between two positive zero crossing?

 

francis

0 Kudos
Message 2 of 6
(3,123 Views)

The exact implementation depends on exactly how you are acquiring the sine wave and which measurement you want.

 

This code will give you an array of timestamps representing the samples immediately after a zero crossing:

 

vi_snippet.png

 

 

Message 3 of 6
(3,113 Views)

 

 

original2.PNG

 

Your example is very good but I cannot find the block I circled in red.If someone can help me with the name of the block so I can search for it.I am using LabVIEW 8.0.

0 Kudos
Message 4 of 6
(3,093 Views)

Hi Simon,

 

Can i ask how you added the arrows onto your BD. Is this something you can do within labview?

 

Rgs,

 

Lucither

------------------------------------------------------------------------------------------------------
"Everything should be made as simple as possible but no simpler"
0 Kudos
Message 5 of 6
(3,077 Views)

@Americanu22 - it's called "Get Waveform Components" and you can find it in the Programming»Waveform palette.

 

@Lucither - absolutely -- you can find the frames and arrows in the Programming»Structures»Decorations palette.  I always like to recolour a little to make things look nicer.

0 Kudos
Message 6 of 6
(3,057 Views)