Controlling Industrial Actuators, Valves and Motors with the NI 9477 32 Channel Digital Output Module
Overview
This application note explains how to use the NI 9477 module with 12, 24, and 48 V industrial relays, solenoids, heaters, proportional valves, servo hydraulics, brushed DC motors and other actuators. The NI 9477 can switch up to 20 Amps of current at 60 VDC. That’s equivalent to 1200 watts of power, or 1.6 horsepower.
This document also explains how to emulate 5 V/TTL outputs with the high speed NI 9477 module and describes several 37-pin connector accessories.
Table of Contents
NI 9477 Technical Overview
The National Instruments 9477 is a 32-channel, 8 μs sinking digital output module for CompactRIO embedded and R Series intelligent DAQ systems. This combination of ultra-fast switching, high current drive, industrial logic levels, and high channel density makes the NI 9477 a powerful addition to the C Series family. Each channel is compatible with 0 to 60 V signals, and the module features 1,000 Vrms of withstand isolation from channel to earth ground. Like other NI 947x modules, all channels can be connected in parallel and switched on/off simultaneously for higher current drive, which is explained below. The NI 9477 is a sinking module, so the outputs are either a connection to COM (true/on state) or “infinite” resistance (false/off state). At power up, the module defaults to a high impedance (false/off) state.- 32-channel, 8 μS digital output module
- 0 to 60 V output range, sinking
- Up to 1 A of current per channel (20 A per module)
- Industry-standard 37-pin DSUB connector
- Hot-swappable operation
- -40 to 70° C operating range

Figure 1. The DO pin is connected to COM when the channel is turned on.
See Also:
NI 9477 Module Product Page
Connecting to Industrial Actuators
The NI 9477 module can sink up to 625 mA/ch of continuous current on all channels, or up to 1 A/ch of current on up to 20 channels. In other words, the per-channel limit is 1 A and the total current limit for all 32-channels is 20 A. You can also connect multiple digital output channels in parallel and use simultaneous switching in your LabVIEW FPGA application to send up to 20 A of current and 60 VDC to a single actuator, motor or solenoid. That’s 1200 watts of power, or 1.6 horsepower.
The NI 9477 can directly control a wide array of 12, 24, and 48 V industrial relays, solenoids, heaters, proportional valves, servo hydraulics and other actuators. Combined with a speed sensor, such as an encoder or tachometer, the NI 9477 can be used for unidirectional speed control on large brushed DC servo motors. To ensure simultaneous switching in your LabVIEW FPGA application, put all of the output channels in the same I/O node and wire them to the same Boolean signal.

Figure 2. Channels can be connected in parallel and switched simultaneously for up to 20 A of current drive. (Flyback diode is not shown.)
When connecting to inductive loads such as motor, solenoids, or relays, use external flyback diodes to prevent damage to the 32 channel NI 9477 or NI 9476 modules. Note: The 8 channel NI 9472 and NI 9474 modules contain built-in flyback diodes. Figure 3 shows a typical connection diagram for a single channel on the NI 9477 module with an external diode.

Figure 3. Use external flyback diodes with the NI 9477 module when connecting to inductive loads.
CAUTION: When using the NI 9477 module in high current applications, be sure to use a suitably rated power supply for the voltage and current of the load. Also, be sure not to exceed the current limit of the cable and connector accessories you use. Use external flyback diodes when connecting to inductive loads. Refer to the product manual for other important usage guidelines.
See Also:
NI 9477 Product Manual
Using Pulse Width Modulation and Current Feedback for High Precision Control
Due to its fast 8 microsecond switching performance, the NI 9477 module can replace very expensive motor controllers and valve drivers. For precise control of industrial actuators, you can program your LabVIEW FPGA application to generate a pulse width modulation (PWM) signal. PWM signals are useful for driving loads such as motors and proportional valves because the average voltage supplied is equal to the PWM duty cycle. Click here to download a LabVIEW FPGA pulse width modulation function block and example program. PWM outputs can be used without feedback, or sensors can be added for more precise closed loop control of actuator force or speed. In this example, we explore the use of a current sensor for closed loop control of actuator force output.
For many actuators such as DC servo motors, the torque (rotational force output) is proportional to current. By regulating the current in the actuator, it's possible to control the force and thereby the acceleration of the device. In addition to current control, additional sensors and cascaded control loops can be added if other parameters need to be controlled, such as velocity. In this case, we have connected a current sensor to a C Series analog input module, used the built-in LabVIEW FPGA proportional-integral-derivative (PID) control function to close the current loop, and used a PWM function to generate the output signal for the NI 9477 module. Figure 4 shows a typical LabVIEW FPGA application with parallel loops for acquisition, PID control, and PWM.
In this case, four channels are connected in parallel for up to 4 A of switching capacity (Figure 2). Digital output switching is performed simultaneously in the FPGA application by connecting the same PWM signal to the four digital outputs in a single FPGA I/O Node. We are using the NI PS-5 power supply, which is rated for 24 VDC and 5 A of current. An SB540 Schoktty diode is used for flyback voltage protection, as shown in Figure 3. Actuator current and voltage are read using an NI 9215 module, which provides simultaneous sampling at rates up to 166 kS/s for two channels. For current sensing, a ±5 A sensor (SCD05PUR) powered by the 5 VDC power supply on an NI 9411 module is used. Although voltage sensing is not required, it can be read by adding two external resistors to create a voltage divider that reduces the 24 VDC PWM signal to the ±10 V input range of the NI 9215 module. Alternately, an NI 9221 module with ±60 V range could by used without the need for an external voltage divider.
In the LabVIEW FPGA application (Figure 4), the PID loop is synchronized with the acquisition loop by reading the Scan ID counter and triggering the execution of the PID function when the Scan ID value changes. The PID function sets the PWM duty cycle, thereby adjusting the amount of power sent to the actuator. Digital output switching is performed simultaneously on four channels of the NI 9477 module, whenever the Changed? output on the Pulse Width Modulation (PWM) function is true. By placing the FPGA I/O Node in a case structure controlled by the Changed? signal, the PWM resolution is increased because the output operations occur only when the PWM signal changes state. For the 9477 module, each output operation takes roughly 320 FPGA clock ticks (8 microseconds). When no output operations are occuring, the Pulse Width Modulation (PWM) Loop executes in 6 FPGA clock ticks (150 nanoseconds). Since output switching only occurs twice per PWM cycle, this approach increases the timing resolution of the PWM signal.
Note: The iteration terminal on the acquisition loop was NOT used for the Scan ID counter since it would eventually saturate at a maximum value of 2147483647. This would case the PID loop to stop running. Instead, a shift register was used to create a 32-bit counter for Scan ID. After reaching the maximum for an unsigned 32-bit integer (U32) this counter rolls over to 0 and continues counting without interruption.

[+] Enlarge Image
Figure 4. Typical LabVIEW FPGA application for high performance closed loop control of actuator torque.
This FPGA-based closed loop control system can operate a speeds that are many orders of magnitude faster than typical microprocessor based control systems, resulting more precise control of the actuator, improved robustness and better disturbance rejection. Since the niFPGA Discrete PID.vi function takes only 12 clock ticks to execute (300 nanoseconds), the maximum control loop rate is typically limited only by the speed of the I/O modules and sensors. The control logic is executed in FPGA hardware, so multiple operations can be performed simultaneously and in parallel at very high rates. There is no penalty for running the control loops at fast rates, because each loop does not have to share processing resources with the other loops. Reliability and timing determinism is extremely good for FPGA based control systems because the control logic is executed in dedicated gate array hardware with no operating system.
See Also:
Example of a 5 A current sensor that can be powered by the NI 9411 5 V regulated power supply output (Digi-Key)
Example of a 5A Schoktty flyback diode that can be used for 24 VDC applications (Digi-Key)
How to Emulate 5 V/TTL Outputs with the NI 9477
To take advantage of the combined speed and channel density of the NI 9477 in 5 V applications, you can emulate 5V/TTL type outputs. To do this, use a regulated 5 VDC power supply and connect a pull-up resistor (typically 50 or 100 Ohm) between the positive terminal on the 5 VDC supply and the DO terminal on the NI 9477. Then connect the negative power supply terminal to COM on the NI 9477. The desired resistor value depends on how fast you want to switch and the load/cable capacitance. You can also use the regulated 5 VDC output on the NI 9411 module as a power supply. Reverse your logic when using the I/O node in LabVIEW FPGA: When the module output is in the COM (True) state, the channel is driven down to 0 V. When the module is in the high-impedance (False) state, the resistor will pull the DO terminal up to 5 V.
For true TTL inputs and outputs without the need for external resistors, use the NI 94018-Ch 5 V/TTL high-speed bidirectional digital I/O module or the NI 9411 6-Ch 500 ns ±5 to 24 V digital input module.
37-pin DSUB Accessories
The NI 9477 contains an industry-standard 37-pin DSUB connector for low-cost cabling to a wide variety of 37-pin accessories available from NI and other vendors. As shown in Figure 5, the NI 9933 kit provides direct screw terminal connectivity with strain relief as well as a DSUB solder cup backshell for creating custom cable assemblies. For high current applications, be sure not to exceed the current limit of the cable and connector accessories.

[+] Enlarge Image
Figure 5. NI 9933 37-pin Connector Kit. Image shows parts dissambled (left) and assembled (right).
As shown in Figure 6, you can also use a DSUB cable (SH37F-37M-1) and an external screw terminal accessory such as the CB-37FH 37-Pin Screw Terminal Block (778673-01) with the module.

Figure 6. SH37F-37M-1 cable and DIN rail mounting CB-37FH terminal block.
Alternatively, the SH37F-P-4 cable provides loose wires (pigtails) for direct wiring to any external device or creating custom cable assemblies.
See Also:
Purchase a NI 9477 module
Accessories for the NI 9477 module
Industrial power supplies (rated up to 5 A at 24 VDC)
Part Numbers and 37-pin DSUB Connector Accessories
| Product | Part # | Description |
| NI 9477 | 779517-01 | 32-CHANNEL 5 V TO 60 V, 8 US, SINKING DIGITAL OUTPUT MODULE |
| NI 9933 | 779103-01 | NI 9933 37-PIN CONNECTOR KIT WITH STRAIN RELIEF |
| SH37F-37M-1 | 778621-01 | 37-Pin Female to Male Shielded I/O Cable, 1 m |
| SH37F-37M-2 | 778621-02 | 37-Pin Female to Male Shielded I/O Cable, 2 m |
| CB-37FH | 778673-01 | 37-Pin Screw Terminal Block, Horizontal, DIN Rail Mount |
| CB-37FV | 778672-01 | 37-Pin Screw Terminal Block, Vertical, DIN Rail Mount |
| SH37F-P-4 | 778620-04 | 37-Pin Female to Pigtail Shielded I/O Cable, 4 m |
Related Links:
Learn more about CompactRIO
Connect your NI 9477 to an R Series intelligent DAQ device
Reader Comments | Submit a comment »
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
