Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Find average frequency from a digital waveform

I am using a cRIO-9421 to capture a digital waveform from a Hall sensor off a 3 phase DC motor.  The digital waveform is not consistant, but I need to find the after frequency.  I have looked for an example, but can't find one that seems to fit.  All the example are for waveforms that are very consistent. 
0 Kudos
Message 1 of 6
(4,220 Views)

Hi olsont,

I don't think that there is an example that does exactly this but you should be able to modify an existing example to do this pretty easily.  One that you may want to look at is in the example finder under HW Input and Output->CompactRIO->FPGA Fundamentals->Frequency Measurement->Count and Period-cRIO.lvproj.

-Justin D

0 Kudos
Message 2 of 6
(4,196 Views)
I don't have that example.  Could you send it to me?
0 Kudos
Message 3 of 6
(4,184 Views)
Are you using the 9421 in a Compact RIO chassis?  Are you sure that it's not compact DAQ or USB?  If you have the RIO driver installed you should have this example installed automatically.
 
-Justin D
0 Kudos
Message 4 of 6
(4,170 Views)
It is a cRIO card in a Compact DAQ chassis.  Is this a problem?
0 Kudos
Message 5 of 6
(4,154 Views)
No, it's not a problem but when you said cRIO-9421 I assumed that you were using it in a cRIO, not a cDAQ.  The way that you use this module is completely different between the two.  Are you having problems aquiring the digital data or computing the average frequency?
 
If you are having problems aquiring the data you can just look at the DAQmx examples in the example finder (Hardware Input and Output->DAQmx).  If your issue is with finding the average frequency, I would reccommend using a shift register to store the past 5 frequeny values read and then average the values together.  You can find examples on how to use the shift register by searching the example finder for "shift register".
 
-Justin D
0 Kudos
Message 6 of 6
(4,137 Views)