LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Zero Crossing in FPGA

Currently I am using a NI9215 and inputing a signal from a function generator.  I have a very simple FPGA VI that is using greater than, less than to determine Zero Crossing.  I have a shift registry so I can show previous value and current value.  The problem is, the VI is only detecting zero crossing occassionally not all the time.  I want this to run as fast as possible so I didn't put any kind of timer in the loop.  I used the Labview Zero Crossing VI and it does the same thing.  Looking for suggestions or ideas on how I can get this to work and capture the zero crossing at every instance.
 
Thanks,
guilio_2008
0 Kudos
Message 1 of 3
(2,751 Views)

It sounds like you are doing things correctly, but you may want to include your code with your questions so that we can know what you are doing.

What is the nature of the signal you are passing to the 9215? Frequency, amplitude, shape? Have you checked the wiring from the function generator to the module to make sure you are using the correct terminals?

authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
Message 2 of 3
(2,733 Views)

Freq = 1000Hz

Amp = 2Vpp

Signal Type = Sine Wave

Posted is the code.  At a 1000Hz, I would expect the light to stay on.  It may be that the signal is moving so fast that the graphics can't update quick enough.  Or my timing maybe off.  I notice when I try to read back in the signal that it produces something almost like a triangle wave rather then a sine wave.

Thanks,

Travis

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