For this section, consider an example using the NI cDAQ-9178 chassis and the NI 9401 C Series digital I/O module. The procedure is similar when using a different measurement instrument or device.
Figure 8. NI cDAQ-9178 Chassis and NI 9401 Digital I/O Module
The NI 9401 has a DSUB connector that provides connections for the eight digital channels. Each channel has a digital I/O pin to which you can connect a digital input or output device. Access to the four counters of the CompactDAQ chassis is available in any of the slots of the chassis; if you are using the cDAQ-9172, access to its two counters is only available through slots 5 and 6, therefore insert the 9401 in slot 5. Figure 9 shows the pinout for this configuration, and Table 1 shows the default counter terminals.
Figure 9. NI 9401 Pinout (Slot 5)Table 1. Default Counter Terminals
According to these specifications, Wire A is connected to Pin 14, Wire B is connected to Pin 17, “5 VDC Power” is connected to any unused digital line set to “high,” and “Ground” is connected to any COM terminal. Getting to See Your MeasurementNow that you have your encoder connected to the measurement device, you can use NI LabVIEW graphical programming software to transfer the data into the computer for visualization and analysis.Table 1 shows an example of displaying the edge count and the corresponding position increments inside the LabVIEW programming environment.
Figure 10. LabVIEW Front Panel Showing Measurements
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.