Professional Documents
Culture Documents
United States
INNOVATIONS
SHOP
SUPPORT
COMMUNITY
Home > White Papers > Decoding Tachometer Signals Using CompactRIO and LabVIEW FPGA
Share
Overview
Measuring speed using a tachometer in an industrial application is important for control algorithms and for use with condition
monitoring applications where machine health issues can be directly correlated to speed. The CompactRIO platform offers the ability
to acquire tachometer signals and convert them into rotational speed using the LabVIEW FPGA Module.
Table of Contents
1.
2.
3.
4.
Ratings
Submit
Back to Top
Most tachometer sensors output an AC voltage whose frequency is directly proportional to the speed of the rotating machinery.
Measuring the period between the rising edges of the waveform can allow for the calculation of rotational speed.
For example, consider a tachometer that outputs two pulses per revolution as shown in Figure 1.
3. Application Development
Back to Top
To calculate the rotational speed from the tachometer signal, the application must be divided into two segments. A LabVIEW FPGA
application must sample the tachometer signal to calculate the time period between successive rising edges while the LabVIEW
Real-Time application must convert the period to a floating point revolutions per minute (rpm) value.
The example code that demonstrates this application uses a cRIO-9068 with an NI 9232 C Series module to acquire the tachometer
signal.
converted by Web2PDFConvert.com
LabVIEW FPGA must be used to perform the high-speed acquisition needed to acquire the tachometer signal. After the signal is
acquired, it is processed point by point to detect its edge using a threshold. Choosing an appropriate threshold is dependent on the
specifications of the tachometer sensor used. Figure 2 shows the acquisition of the tachometer signal and the processing.
Figure 2. The top-level FPGA code acquires the tachometer and processes it to calculate the period.
When the threshold is exceeded, a time value representing microseconds is stored in a shift register to allow for the calculation of the
period of the signal. When another edge is detected, the time between the two consecutive pulses is calculated and the shift register
is restarted as shown in Figure 3.
Figure 3. The period of the tachometer signal is calculated between two pulses.
A hysteresis is also incorporated to ensure the timer is not triggered by the threshold crossings of the signal because of noise. As
shown in Figure 4, the algorithm may erroneously consider the noise as exceeding the threshold; instead, the algorithm needs the
signal to cross a hysteresis level before it resumes looking for the threshold crossing.
Figure 4. If a hysteresis is not used, the algorithm my erroneously detect noise as a valid signal.
Initially, the code first checks if the tachometer signal has crossed the specified threshold in the appropriate direction as shown in
Figure 5.
Figure 5. The code checks if the tachometer has exceeded the threshold in the specified direction.
When the tachometer signal has exceeded the threshold, an event is marked as occurred in order to store the time value and the code
begins to check the hysteresis level. If the slope is specified as rising, the tachometer signal must fall below the specified hysteresis
level (shown in Figure 6). If the slope is specified as falling, the tachometer signal must exceed the specified hysteresis level. When
the hysteresis level has been met, the code resumes monitoring the threshold level to trigger an event.
converted by Web2PDFConvert.com
Figure 6. The tachometer signal must fall below the hysteresis level before the threshold is checked again.
Figure 7. The Real-time VI reads the tachometer period from the FPGA and calculates the rpm.
To calculate the rpm, the period from the FPGA must be converted to a frequency and Equation 1 applied. Because the FPGA code is
configured to provide the period in terms of microseconds, the period is converted to seconds prior to the frequency being calculated.
The frequency is then divided by the number of pulses per revolution to obtain the number of rotations per second. Multiplying this by
60 provides the rpm.
4. Next Steps
Back to Top
PRODUCT
SUPPORT
COMPANY
MISSION
Manuals
Events
Activate a product
Drivers
Careers
Alliance Partners
Legal | Privacy | 2016 National Instruments. All rights reserved. | Site map
Contact Us
converted by Web2PDFConvert.com