The text of a manual · part 2 of 7
Encoder/Counter Modules User Manual (Cat. Nos. 1771-IJ and 1771-IK), pages 11 to 20
Pages 11 to 20 of 68
The original document is the PDF (388 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Allen-Bradley 1771-IK
Page 11
Introduction
1–3
The encoder/counter module is shipped with two 12 terminal gold-plated Field Wiring Arms (cat. no. 1771-WB). Unless otherwise noted, this manual refers to both versions of the module.
Status Indicators
There are seven status indicators (Figure 1.2) on the front of the left half of the module. The four indicators, corresponding to channel A, channel B, marker, and switch inputs, illuminate when their respective input signals are high. The next two indicators show the state of the outputs. An output indicator is on when the output circuit is activated. The bottom indicator illuminates when the module detects a fault. Figure 1.2 Red LED Status Indicators
Channel A Channel B Marker Limit Output 1 Output 2 Fault
15943
When system power is turned on, the module runs a self-test. During power-up, it is normal for the fault indicator to flash on momentarily. If the FAULT LED does not turn off, the module has detected a fault. The self-test includes checks to make sure that all counters and registers have been reset to zero and memory is cleared. If a breakdown of communication occurs during block transfer, the FAULT LED will also light. Bit 14, the diagnostic bit in the input status word, is also set anytime the FAULT LED is on. After power-up, the module will stay in its reset state (outputs disabled and counter held reset) until the necessary control bits are set in the program.
Publication 1771-UM006B-EN-P - June 2002
Page 12
1–4
Introduction
System Power
System power is supplied through the I/O chassis backplane from the 5V dc chassis power supply. The module requires a current of 1.4A. The sum of the current requirements of all modules in the chassis must not exceed the power supply or backplane rating.
External Power
The module requires an external power supply connected to the field wiring arm. For the 1771-IJ, the supply must be able to deliver 140mA at 5V dc +0.25V with less than 50mV ripple, peak-to-peak. The 1771-IK requires 110mA at 12V dc or 200mA at 24V dc, with less than 50mV ripple, peak-to-peak. These requirements are for the module only. The current requirements of all output devices, if they are to be driven directly from the module, must be added to the requirements of the module. It is also possible to drive output devices from a separate load supply, using the output on the module only as a switch. When the output is on and conducting, a maximum of 0.5V dc is dropped across it. The load supply voltage should not exceed 30V dc. Refer to Figure 1.3 for the necessary modifications to the wiring diagram. Figure 1.3 Modification of Output Circuit for Application of Separate Load Power Supply +
Module External Supply
+
-
Load Power Supply
-
Right Swing Arm External Module Module
Load 11 Output Return 2 or 4
Output Transistor 12
Common
If multiple sources are used, maintain isolation between supplies. 15944
The power for the input device can be provided by the module’s external power supply, but, unlike the power for the output device, this is not available through the module. If a high degree of isolation is needed, use a separate input power supply. If a limit switch is used, the limit switch input is configured to accept an “on” voltage of 12 to 48V dc, requiring a maximum of 10mA at 48V dc.
Publication 1771-UM006B-EN-P - June 2002
Page 13
Chapter
2
Preliminary Adjustments General
The module has programming options (Table 2.A) that are selected by setting the five switches on the programming option switch assembly (SW-1). These options include the choices between encoder and counter operation, block transfer or single transfer, BCD or binary data formats and count resolution in the encoder mode. Table 2.A Programming Option Switch Assembly SW-1
On
Off
Block Transfer/Single Transfer
1
2, 3
4
5
Single Transfer
See Table 2.B Multiplier for Count Resolution
Encoder Mode
Binary
Counter Mode
BCD
Block Transfer
Block transfer/single transfer (switch 1) - Use single transfer programming only when the module is in a local I/O chassis. This type of programming shifts a single word of data each program scan from the processor’s data table to the module. It therefore takes three program scans to send a new control word and the two preset values to the module. However, once new data has been sent to the module, it will remain active until another transfer updates it. The input status word will always appear at the proper address location in the input image table. To use single transfer programming, switch 1 must be set to single transfer (on). Block transfer moves all three data words from the processor to the module in a single scan. Since the module has bidirectional block transfer, the processor must also be programmed to read for block transfer, or the data table will not display the status word. To use block transfer, switch 1 must be set for block transfer (off).
Publication 1771-UM006B-EN-P - June 2002
Page 14
2–2
Preliminary Adjustments
Count Resolution
Count resolution (switches 2 and 3) - In the encoder mode, the accuracy of a quadrature type encoder can be improved by allowing the module to count the pulse trains at both channel inputs. This doubles the number of pulses counted for the same degree of rotation at the encoder. A further improvement can be made by letting the module count the leading and trailing edges of both pulse trains, thereby counting four times (times 4) for the same degree of rotation. Certain applications may need the actual count and module should be set for times 1 (the pulse is counted on its rising edge as high true). The count resolution setting affects the total count kept at the module and as it is sent back in the status word. Programming manipulations of the status word and the preset values must account for the multipliers. The count resolution setting may also be limited by the program scan time if the carry or borrow bits are used to cascade counters. Note: In the counter mode, the count resolution setting (Table 2.B) has no effect on the count. Table 2.B Count Resolution Settings
Encoder Counter Selection
Publication 1771-UM006B-EN-P - June 2002
Multiplier
Switch 2
Switch 3
Times 1
On
On
Times 2
On
Off
Times 4
Off
Off
Encoder/counter selection (switch 4) - In the encoder mode, the module counts the number of input pulses entering on channel A from a quadrature type encoder. By comparing the phase relationship between input pulses on channel A and pulses appearing at channel B, it knows whether to add or subtract the incoming count from the total (that is, whether to count up or down). The phasing (Figure 2.1) between the channels is determined by the direction in which the encoder is turned. To use the module in the encoder mode, switch 4 must be set to encoder (on).
Page 15
Preliminary Adjustments
2–3
Figure 2.1 Input Pulses Time Channel A Encoder Channel B
Up Pulsed to Counter x1 x2 x4
Channel A Encoder
Channel B x1 Down Pulsed to Counter x2 x4
15945
In the counter mode, the module adds the incoming pulses on channel A. The count is incremented on the rising edge of the pulse (high true). The direction of the count can be controlled with either the control word or an external switch wired to channel B. Channel B must be left unconnected if the count direction is to be software controlled. Typical input device counting might be high speed static switches and incremental encoders. Mechanical switches are not recommended as input counting devices used with the 1771-IJ because the contact bounces might be counted as pulses. However, the 1771-IK can be used with a mechanical switch, provided the module is configured for mechanical counting (filter has been put in) and the counting frequency does not exceed 50Hz. To use the module in the counter mode, switch 4 must be set to counter (off).
Publication 1771-UM006B-EN-P - June 2002
Page 16
2–4
Preliminary Adjustments
Binary/BCD Data Format
Binary/BCD data format (switch 5) - The preset values and the accumulated total in the status word have the option of appearing in either BCD or binary formats. If the BCD format is selected, the processor can directly manipulate these values in comparisons or arithmetic functions but the accumulated value is limited to a count between 000 and 999. The binary option allows an increased range of 0000 to 409510. With some processors, the programming must reconstruct a BCD number from the binary value. To select binary mode, set switch 5 on. To select BCD mode, set switch 5 off. Because different types of input devices are compatible with different voltage ranges, the 1771-IJ (5V dc) and 1771-IK (12-24V dc) input channels are configured differently.
1771-IJ
Because the 1771-IJ module is designed to work with 5V TTL type devices, each input channel and the marker input can be set for single ended or differential line inputs (Table 2.C). The input device should be capable of providing 16mA of sink current. The module detects a voltage of 2.4V dc or above at either channel as logic “1” or true. A voltage below 0.6V dc is considered as logic “0” or false. Table 2.C Input Configuration Switch Assembly 1771-IJ SW-2 1
2
3
Marker
Chan. B
Chan. A
On
Single ended
Single ended
Single ended
Off
Differential
Differential
Differential
The marker input registers as true when the input pulse from the encoder is high. The limit switch input senses a voltage of greater than 10 volts dc as logic “1” (on), and less than 5 volts dc as logic “0” (off). The input voltage that appears through the switch should be from a 12 to 48V dc external supply capable of supplying 10mA of source current at 48V dc. The limit switch input has a signal delay of 16ms (+7ms) because of the filtering needed to protect against contact bounce. The channel B input can be used in the counter mode to select count direction. If the channel B input terminal is not connected, the control word in the output program selects the direction of the count. For external hardware control, the count direction bit in the control word must be set to count up. Then if channel B is allowed to float high or is driven high, the module counts up; if it is pulled low, either through a gate or a transistor switch, it will count down.
Publication 1771-UM006B-EN-P - June 2002
Page 17
Preliminary Adjustments
2–5
No special filtering is provided on channel B, since the filtering necessary for a mechanical switch would defeat the purpose of a very fast count direction change that is not dependent on the processor scan time. Therefore, a transistor switch or gate should be used to pull the channel B input low. The gate or switch must sink 14ma of current to pull the channel B input low. The count changes direction in less than 0.01ms from the time channel B input changes state.
1771-IK
The 1771-IK module is designed to accept several types of devices that will operate in the 12 to 24V dc range (Figure 2.2). Since most high voltage quadrature encoder outputs produce signals through an open collector output, the module is configured for a pull-up on channel B. Channel A must be set for a pull-up by setting switch 1 on and switch 2 off. Some counting devices may also use a pull-up arrangement. Figure 2.2 Input Configuration for Channel A of the 1771-IK Showing Functions of Switch Assembly SW-2
Switch Assembly SW2
Module External Voltage
Switch 1 -- Pull up Switch 2 -- Pull down Switch 3 -- Filter
Switch 1 Channel A Channel A
Switch 2 Sensing Circuits
Common Switch 3
15946
The settings on the input configuration switch assembly SW-2 are not the same on the 1771-IJ as they are for 1771-IK. Refer to Table 2.D for switch settings.
Publication 1771-UM006B-EN-P - June 2002
Page 18
2–6
Preliminary Adjustments
Table 2.D Input Configuration Switch Assembly (1771-IK) SW-2 Switch 1
Switch 2
Switch 3
On
PullĆup
PullĆdown
Filter in (50 Hz)
Off
Float
Float
Filter out (50K Hz)
Certain counting devices may need an input designed to pull current down through the device. Switch 2 should be set on for pull-down and switch 1 left off. The module detects a minimum of 7.2V dc at its input channels as true for a 12V dc external supply and 14.4V dc at 24V dc external supply. A signal with a maximum voltage of 4.8V dc is considered false for a 12V dc supply and 9.6V dc is false for a 24V dc supply. Each input channel sinks 10mA at 12V dc and 20mA at 24V dc. If it is necessary to debounce a contact type of device, such as a switch, the filter can be added across the inputs by setting switch 3 on. By adding the filter to the circuit, the maximum counting frequency the module will detect is 50Hz. Channel B input and the marker input are for open collector encoder drivers (the channel B input has an internal pull-up) and are not switch selectable. The marker input reads a signal as high true. The limit switch input senses a voltage of greater than 10 volts dc as a logic “1” (on), and less than 5 volts dc as a logic “0” (off). The input voltage that appears through the switch should be from a 12 to 48V dc external supply that is capable of supplying 10mA of source current at 48V dc. The limit switch input has a signal delay of 16 ms (+7ms) because of the filtering needed to protect against contact bounce. The channel B input can be used in the counter mode to select count direction. If the channel B input terminal is not connected, the control word in the output program selects the direction of the count. For external hardware control, the count direction bit in the control word must be set to count up. Then if channel B is allowed to float high or is driven high, the module counts up; if it is pulled low, either through a gate or a transistor switch, it will count down. Any gate or switch should be compatible with the external voltage supply (12 to 24V dc).
Publication 1771-UM006B-EN-P - June 2002
Page 19
Preliminary Adjustments
2–7
No special filtering is provided on channel B, since the filtering necessary for a mechanical switch would defeat the purpose of a very fast count direction change that is not dependent on the processor scan time. Therefore, a transistor switch or gate should be used to pull the channel B input low, sinking 10mA at 12V dc or 20mA at 24V dc. The count changes direction in less than 10 microseconds from the time channel B input changes state. Refer to the connection diagrams (Figures 3.1 and 3.2) for interfacing different devices.
Switch assembly settings-these features are selected on two switch assemblies that are located on the circuit board underneath the component cover. To select these options, proceed as follows: 1. Take off the left-side cover by removing the four slotted screws. 2. Refer to Figure 2.3. Identify the programming option switch assembly (SW-1) and the input configuration switch assembly (SW-2). Figure 2.4 Location of Switch Assemblies
O N O F F
Programming Options Switch Assembly SW-1
O N O F F
Setting Switch Assemblies
Input Configuration Switch Assembly SW-2
1 59 47
Publication 1771-UM006B-EN-P - June 2002
Page 20
2–8
Preliminary Adjustments
3. Set the switches of SW-1 (Table 2.E) according to the desired programming options. The settings for the count resolution switches (times 1, 2, or 4) do not matter if the counter mode has been selected. The tip of a ball point pen can be used to set the rocker arm of a switch. Do not use a pencil because the point can break off and jam the switch. 4. Set the three switches of SW-2 (Table 2.E) according to the input configurations that have been chosen. 5. Replace the component cover and tighten the screws. Table 2.E Programming Option Switch Assembly SW-1
On
Off
Publication 1771-UM006B-EN-P - June 2002
1
2, 3
4
5
Single Transfer
See Table 2.B Multiplier for Count Resolution
Encoder Mode
Binary
Counter Mode
BCD
Block Transfer