Customer Solutions
Encoder Quality Testing Using NI 5102 Digital Oscilloscopes and LabVIEW
Author(s):
Jonathan Robertson, Caron Engineering, Inc.
Industry:
ATE/Instrumentation
Product:
LabVIEW, Modular Instruments, Oscilloscopes/Digitizers
The Challenge:
Automatically quantifying and documenting the quality of an encoder on a servo motor at final assembly.
The Solution:
Building an automated PC-based system using three NI 5102 plug-in oscilloscopes for PCI cards synchronized over the RTSI bus and controlled with LabVIEW.
Introduction
When Inductive Components, Inc. identified the need to quantify and document the quality of encoders built into servo motors they manufacture, they asked Caron Engineering, Inc. to develop an automated test stand for testing a servo motor assembly. Ideally, the operator would simply wire up the servo and select the motor/encoder combination to be tested. This procedure would check for the correct motor and then determine the quality of encoder channels A, B, the index pulse, and all their complements (a total of six channels), if applicable.
Hardware
We selected the NI 5102 computer-based oscilloscope for its speed, its ability to be synchronized with other NI 5102 instruments by a common trigger, and its ease of integration with LabVIEW. We selected the Sorensen programmable power supply for its power (1,000 W at 80 VDC) and the ability to set and verify precise voltage levels and current limits via RS-232 from the PC. We used a 166 MHz Pentium PC running Windows NT.
The Process
The test stand runs the motor and tests the encoder at K e , the "motor voltage constant." K e or a particular DC motor is the voltage that produces a speed of 1,000 rpm. This test is used to verify that the correct unit is being tested and that the direction of motion is correct. The index pulse is used to determine actual speed of the motor. If the measured speed is 1,000 rpm, then the specified K e matches the motor being tested.
Encoder system quality is checked at 1,000 rpm. The obvious parameters are counts per revolution, amplitude and duty cycle of each channel. Less obvious parameters that require testing are the phase jitter of the rising and falling edges of channel A, channel B, and between channels A and B. Alignment of the index pulse to channel A and its width is also critical for homing sequences of servo systems.
Software Integration
Regarding the total system integration, the initial user interface is a Visual Basic (VB) application where the user selects a motor/encoder assembly from an Access database, assigns a serial number, and begins the test. The VB application sets the voltage and current limit on the power supply. When a steady-state condition has been reached, key parameters, (such as K e, and encoder line count) are passed via dynamic data exchange (DDE) to LabVIEW. LabVIEW then checks speed via the index pulse and executes the test. Applicable parameters are passed back to VB, where a pass/fail decision is made. The operator is alerted; the appropriate label/ documentation can be printed; and the process is ready to begin again.
Design Challenges
Interesting challenges were clearly present in this project, not the least of which was the scan rate required on a PC to monitor encoder quality at any significant speed. The goal was to achieve 1-deg resolution per pulse cycle, even for a 2,500 line encoder at 1,000 rpm. This condition required a worst-case scan rate of 15 MS/s for 900,000 samples (16-bit integer per sample) for each channel. We used six channels total - three NI 5102 boards with with two channels per board.
The memory requirements at this rate are also significant. Because plug-in boards such as the NI 5102 do not have room for sufficient memory onboard, the data must be ported to PC system RAM at the scan rate of the test. The PCI bus mastering capabilities of the NI 5102 therefore become a firm requirement at this point.
The last major hurdle for integrating this PC-based test stand was the synchronization of three oscilloscope boards. It is critical on an encoder to accurately determine jitter between the rise time of the Channel A pulse and the rise or fall of the Channel B pulse. For example, in a positive motor direction, Channel A should lead Channel B by 90 deg over the course of a pulse cycle for the entire revolution of the motor. This performance is required for accurate direction determination by the servo controller. The timing of the index pulse relative to Channel A and B is also critical. For accurate results, the triggering of one NI 5102 board must be passed to the other two NI 5102 boards so that all six channels have data from exactly the same start and stop times.
Although other PC-based scope manufacturers can probably meet the first two challenges, we found National Instruments was the only effective choice for the critical synchronization challenge because of the RTSI bus. With the RTSI bus system tying all three boards together, simultaneous triggering of all boards was straightforward. Although there is a latency from the trigger of the master board to the two slave boards, it is easily quantified as a set number of scans at a given scan rate and accounted for by using the Pretrigger scan option that is set individually by board.
Conclusion
The excellent results from our automated test stand have been manually verified in a number of ways. With the NI 5102 scope boards and LabVIEW, we can accurately test the quality of any given encoder as an assembled component of a servo motor. The ability to collect and analyze the sheer amount of data with the required synchronization in a timely manner on a PC is a testament to the quality of National Instruments products. The ability to transfer data via DDE (or any other method of data transfer) to LabVIEW gives us the capability to use any user interface, database, and power supply we choose, increasing the portability of this system to other applications, as well as reducing development time and costs.
For more information, contact :
Jonathan Robertson
Caron Engineering, Inc.
P.O. Box 1529, Rt. 109
Wells, ME 04090
Tel: (207) 646-6071
Fax: (207) 646-6983
E-mail: jrobertson@caron-eng.com
361296a1.pdf
View the entire user solution in Adobe Acrobat PDF format.