Upgrading a Torque Measurement Meter with NI CompactRIO Hardware

James Campbell, Viewpoint Systems CEO

Viewpoint Systems logo

 

 

Case Study Highlights

 

  • ​The NI CompactRIO (cRIO) platform was flexible and powerful enough to enable us to replace key components of an outdated torque meter.
  • The CompactRIO Module Development Kit helped us create a custom CompactRIO module to do specialized tasks required by the system.
  • The speed of the FPGA on the NI cRIO-9042 controller made it possible to do high-resolution edge detection of digital signals.
​Image of cRIO-9042​

​"The performance and flexibility of CompactRIO helped us upgrade and add new functionality to an outdated Class 1/Div 2 torque measurement meter our customers needed."

​—James Campbell​

The Challenge

​Our client needed to update a specialized torque meter. It required a Class 1/Div 2 rating, along with the usual CE, UL, and FCC certifications. The new design would interface with existing sensors, improve measurement capability, and add functionality to enhance the operator’s experience. It would also communicate with PLCs and a PC to manage torque trends, alarms, and meter configuration.

The Solution

We created a system based on the NI cRIO-9042 (already Class 1/Div 2, CE, and UL certified) with various C Series modules to work with existing sensors, communicate with PLCs, and add new functionality to the system. We used the cRIO-9951 Module Development Kit to create a custom C Series module that takes the signals from position sensors and sends them downstream for timing analysis with the FPGA.

​​Background

​Our client, a manufacturer of electric motors and mechanical power transmission equipment, offered a specialized torque meter based on obsolete electronics. The design of this meter was decades old, so our client contacted us to upgrade this meter due to our experience in the following areas:

 

  • ​Designing and building custom electronics for embedded monitoring applications
  • ​Reverse engineering expertise
  • ​Small batch manufacturing custom electronics

 

​​The Challenges

​The application required a Class 1/Div 2 rating, along with the usual CE, UL, and FCC certifications. The existing meter included two sensors (which we could keep), electronics for signal conditioning the sensor outputs, and a small microprocessor for communicating with the outside world. As usual, the documentation for this existing meter was incomplete, requiring reverse engineering to understand the project scope.

 

​Being a retrofit, the replacement design would need to match these same requirements at minimum. On top of this baseline, the client wanted us to improve measurement capability and add some functionality to enhance the operator’s experience. The outputs from the meter had to communicate with PLCs and the PC that ran the operator application—written in NI LabVIEW—to manage torque trends, alarms, and meter configuration.

 

​The Solution

​Meter Overview

​Because we had an obsolescence situation, our client needed a replacement design quickly. However, obtaining certifications for Class 1/Div 2, and all the other certifications, like CE, UL, and FCC, takes a long time. We considered ways to shorten the overall timeline and settled on combining a CompactRIO system with a custom C Series module developed to interface the client’s sensors. This path rested on the fact that the CompactRIO Controller and chassis already satisfied Class 1/Div 2, CE, UL, and the other certifications, reducing the overall time and complexity for certifying the entire system. We chose the cRIO-9042 controller and 4-slot chassis.

 

​Another benefit of deciding to base the meter on a CompactRIO system was the availability of other NI modules. For example, the sensors are slightly affected by temperature, so we included a 4-channel RTD module to measure sensor temperature. We also included a 4-channel 0-20 mA analog output to broadcast torque values to other systems, such as a PLC, that used this signal to trend, alarm, and possibly shut down the drive motors.

 

​Finally, we wanted to place more system functionality in software and less in hardware. The microcontroller in the existing design was very modest in its capabilities; much of the signal conditioning and basic processing, such as filtering, was done in hardware. With the available processing power in the CompactRIO Controller, we could use the hardware front end for some signal conditioning and use software to do the remaining signal processing and conversion of raw values to torque. This approach is more flexible and maintainable than the previous design. In fact, when we found during system debug that some of the initial requirements were not described correctly, we were able to make a change to the software. Making a hardware change would have delayed the delivery schedule.

 

​Custom Hardware Design

​NI enables third-party developers to design and build custom C Series modules by following the hardware and software guidelines and requirements in the CompactRIO Module Development Kit (MDK).

 

​The following are examples of the MDK guidelines:

  • ​An EEPROM needs to hold a unique ID for module identification when plugged into the backplane.
  • ​The C Series module interface uses 11 signal lines on the backplane, two of which have predefined, fixed functionality. So, our module had to use the other nine lines to communicate configuration, data, and status to the controller through the FPGA layer.
  • ​The custom circuitry needed to physically fit in the shell of a C Series module.
  • ​Power consumption needs to be below specified limits.

​Many other requirements are spelled out in the MDK documentation. The following image shows the PCB we designed.

Custom cRIO module from Viewpoint Systems.

 

​The following image shows the PCB being inserted into the C Series module shell.

Customer cRIO module and cover from Viewpoint Systems

 

Our custom hardware design takes the signals from the two position sensors and conditions them into digital pulses for downstream timing analysis. Since the amplitudes of the signal change depending on operating conditions, this signal conditioning uses a signal-amplitude-dependent thresholding combined with debouncing hysteresis.

 

​Software Design

​Our custom module uses an onboard FPGA and VHDL to communicate with the CompactRIO system LabVIEW FPGA I/O nodes according to specifications in the MDK. The CompactRIO LabVIEW FPGA code detects the edges of the two digital signals and timestamps them with high resolution. Results are passed up to a LabVIEW Real-Time application.

 

​This application outputs torque measurements over Modbus Ethernet, Modbus 485 serial, and an analog 0-20 mA signal.

 

​An operator application, developed in LabVIEW for Windows, interfaces with the CompactRIO Controller as a Modbus device. Torque data, status information, and any errors are accessed using Modbus registers. The operator user interface of this application enables configuring each meter for a specific setup (sensor type, calibrations, and so on). Finally, the meter can also communicate with a PLC for controlling their motor, monitoring their equipment, and performing safe shutdown if needed.

 

​Outcome and Moving Forward

​An important consideration in our design was component lifecycle so that the client need not worry about obsolescence for many years.

 

​With that goal in mind, we specifically designed for the following criteria:

  • ​Minimizing the functionality of the C Series module so that when this hardware does become obsolete, the effort to design replacement hardware is simplified.
  • ​Maximizing the functionality done in software for its simpler lifecycle management.
  • ​Leveraging NI lifecycle management for the remainder of the CompactRIO components.

​Our client’s concern about eventual obsolescence is diminished with this approach.

 

​Moving forward, our client will be swapping out the previous torque meter with this new CompactRIO-based design for their existing customers and fielding new units for their upcoming customers. We are sure their customers will be happy.

 

 

An NI Partner is a business entity independent from NI and has no agency or joint-venture relationship and does not form part of any business associations with NI.