12 | ni.com | BNC-2120 Installation GuideUsing the Quadrature EncoderThe BNC-2120 contains a mechanical quadrature encoder circuit that produces 96 pulses perencoder revolution. Two outputs, PULSES and UP/DN, are at the screw terminals located belowthe quadrature encoder knob.PULSES outputs a pulse train generated by rotating the encoder shaft. It provides four pulses perone mechanical click of the encoder. UP/DN outputs a high or a low signal indicating rotationdirection. When the direction is counterclockwise, UP/DN is low. When the direction isclockwise, UP/DN is high.To use the quadrature encoder with counter 0 of the DAQ device, connect the PULSES terminalto PFI 8 and connect the UP/DN terminal to the P0.6 digital I/O terminal, the up/down pin ofcounter 0. To use the quadrature encoder with counter 1, connect the PULSES terminal to PFI 3and connect the UP/DN terminal to the P0.7 digital I/O terminal, the up/down pin of counter 1.Refer to Table 2 for more information about PFI 3 and PFI 8. Refer to the Connecting DigitalI/O Signals section for more information about the digital I/O terminals and LEDs.You can use the Count Digital Events VI from the LabVIEW Example Finder (Hardware Inputand Output»DAQmx»Counter Measurements»Count Digital Events) with the BNC-2120quadrature encoder. After opening the VI, select Externally Controlled in the Count Directioncontrol. The VI retrieves the count from the counter. You can convert the count into total degreesrotated using the following formula:Total Degrees Rotated = PULSES × 3.75°/pulsewhere3.75°/pulse = 360°/96 pulsesCalculate the number of revolutions and remaining degrees by dividing the total degrees rotatedby 360°. The calculated quotient is equal to the number of revolutions and the remainder is equalto the remaining degrees.