Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 8 of 9

Analog Output Module User Manual (Cat. No. 1771-OFE Series B), pages 71 to 80

Pages 71 to 80 of 84

The original document is the PDF (555 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-OFE1

Page 71

Appendix

B

Block Transfer with Mini-PLC-2 and PLC-2/20 Processors Multiple GET Instructions

Programming multiple GET instructions is similar to block format instructions programmed for other PLC-2 family processors. The data table maps are identical, and the way information is addressed and stored in processor memory is the same. The only difference is in how you set up block transfer write instructions in your program. For multiple GET instructions, individual rungs of ladder logic are used instead of a single rung with a block transfer instruction. A sample rung using multiple GET instructions is shown in Figure B.1 and described in the following paragraphs.

Rung 1 This rung is used to set four conditions:

• EXAMINE ON Instruction (113/02) - This is an optional instruction. When used, block transfers will only be initiated when a certain action takes place. If you do not use this instruction, block transfers will be initiated every I/O scan. • First GET Instruction (030/120) - Identifies the module’s physical address (120) by rack, group, and slot and where in the accumulated area of the data table this data is to be stored (030). • Second GET Instruction (130/060) - Indicates the address of the first word of the file (060) to which or from which the data is transferred. The file address is stored in Word 130, 1008 above the data address. • OUTPUT ENERGIZE Instruction (012/07) - Enables the block transfer read operation. If all conditions of the rung are true, the block transfer read enable bit (07) is set in the output image data table control byte. The output image table control byte contains the read enable bit and the number of words to be transferred. The OUTPUT ENERGIZE instruction is defined as follows: • “0” indicates that it is an output instruction. • “1” indicates the I/O rack address. • “2” indicates the module group location within the rack. • “07” indicates that the module is in the lower slot and that this is a block transfer read operation (if this were a block transfer write operation, “07” would be replaced by “06”). Important:

The OUTPUT ENERGIZE Address 012/07 in this example indicates that the module is in Slot 0. The address could be 012/17, which indicates that the module is in Slot 1 (012/06 or 012/16 for a write operation).

Page 72

B-2

Rungs 2 and 3 These OUTPUT ENERGIZE instructions (012/01 and 012/02) define the number of words to be transferred. This is accomplished by setting a binary bit pattern in the module’s output image table control byte. The binary bit pattern used (Bits 01 and 02 energized) is equivalent to six words or channels and is expressed as 110 in binary notation.

Rung Summary Once the block transfer read operation is complete, the processor automatically sets Bit 07 in the input image table status byte and stores the block length of the data transferred. Figure B.1 Multiple GET Instructions Data Table

010

07

Output Image Table

Control Byte

1 R

1

Output Image Table Control

012 017

2

0

Timer/Counter Accumulated Values Area

027 030 060

Byte Contains Read Enable Bit and Block Length in Binary Code Data Address Contains Module Address in BCD First Address, Destination of Transferred Data

065 07

Input Image Table

R 0

Timer/Counter Preset Values Area

1

030 G

130 G

02

120

060

3

Publication 1771-6.5.30 - November 1998

110 112 117

6

0

130

Input Image Table Status Byte Contains Done Bit Storage Location Contains File Address in BCD R = Read 07 = Bit

113

2

Status Byte

1

012 07 012 01 012 02

12994

Page 73

B-3

Setting the Block Length (Multiple GET Instructions Only)

The output module is capable of transferring up to 13 words in one program scan. The number of words transferred is determined by the block length entered in the output image table control byte. The bits in the output image table control byte (Bits 00-05) must be programmed to specify a binary value equal to the number of words to be transferred. For example, Figure B.2 shows if your output module is set up to transfer five words, you would set Bits 00 and 02 of the lower output image table control byte. The binary equivalent of five words, as stated in the look-up table, is 000101. Figure B.2 Setting Block Length

",*( /'!

-

-!)#.$ %) !

-

-

/'! ,!-- %)

Binary Bit Pattern Lower Output Image Table Byte

Number of Words to Transfer

05

04

03

02

01

00

-

2

-

Page 74 read from a scan by OCR; it may hold reading errors

B-4

Publication 1771-6.5.30 - November 1998

Page 75

Appendix

C

Data Table Formats 4-Digit Binary Coded Decimal (BCD)

The 4-digit BCD format uses an arrangement of 16 binary digits to represent a 4-digit decimal number from 0000 to 9999 (Figure C.1). The BCD format is used when the input values are to be displayed for operator viewing. Each group of four binary digits is used to represent a number from 0 to 9. The place values for each group of digits are 20, 21, 22 and 23 (Table C.A). The decimal equivalent for a group of four binary digits is determined by multiplying the binary digit by its corresponding place value and adding these numbers. Figure C.1 4-Digit Binary Coded Decimal

--

- -

-- - -

-

-

-- - -

-

--

- -

-

-

Page 76

C-2

Table C.A BCD Representation

SignedĆmagnitude Binary

23 (8)

Place Value 22 (4) 21 (2)

20 (1)

Decimal Equivalent

-

Signed-magnitude binary is a means of communicating numbers to your processsor. It should be used with the PLC-2 family when performing computations in the processor. It cannot be used to manipulate binary 12-bit values or negative values. Example: The following binary number is equal to decimal 22. 101102 = 2210 The signed-magnitude method places an extra bit (sign bit) in the left-most position and lets this bit determine whether the number is positive or negative. The number is positive if the sign bit is 0 and negative if the sign bit is 1. Using the signed magnitude method: 0 10110 = +22 1 10110 = -22

-

Page 77

C-3

Two's Complement Binary

Two’s complement binary is used with PLC-3 processors when performing mathematical calculations internal to the processor. To complement a number means to change it to a negative number. For example, the following binary number is equal to decimal 22. 101102 = 2210 First, the two’s complement method places an extra bit (sign bit) in the left-most position, and lets this bit determine whether the number is positive or negative. The number is positive if the sign bit is 0 and negative if the sign bit is 1. Using the complement method: 0 10110 = 22 To get the negative using the two’s complement method, you must invert each bit from right to left after the first “1” is detected. In the above example: 0 10110 = +22 Its two’s complement would be: 1 01010 = -22 Note that in the above representation for +22, starting from the right, the first digit is a 0 so it is not inverted; the second digit is a 1 so it is not inverted. All digits after this one are inverted. If a negative number is given in two’s complement, its complement (a positive number) is found in the same way: 1 10010 = -14 0 01110 = +14 All bits from right to left are inverted after the first “1” is detected. The two’s complement of 0 is not found, since no first “1” is ever encountered in the number. The two’s complement of 0 then is still 0.

Page 78 read from a scan by OCR; it may hold reading errors

c-4

Publication 1771-6.5.30 - November 1998

Page 79

B Block Length, Default, 4-10 Block Length, Setting, 4-10

-

Default Block Length, 4-10 Defaults, module, 3-4 Diagnostics, 4-2, 7-1

Block Transfer Boundary Word, 4-11 Multiple GET Instructions, B-1 Programming Formats, 4-1 Read, 4-2 Write, 4-2, 4-7, 4-8, 4-9

Fault Indicator LED, 2-12, 7-1 block transfer, 1-3 write, 1-3

Formats, Block Transfer, 4-1 block transfer read, 5-1 Buffering Data, 4-2, 4-7

C cable requirements, 2-11 Calibration Preparation, Current Version, 6-5, 6-9 Preparation, Voltage Version, 6-1 Resistor Pot Adjustment, 6-5 Resistor Pot Location, 6-4, 6-8 Tools, 6-1 Configuration Plugs, 2-4 Scaling, 3-6 Word, 3-3 configuration plugs, 2-3 Connections Extender Board, 6-2, 6-5 User Devices, 2-10 current output version, 2-3

D Data Buffering, 4-2, 4-7 Data Formats BCD, 3-4 Binary, 3-4 data formats 2's complement binary, C-3 4-digit binary coded decimal, C-1 signed-magnitude binary, C-2 Data Polarity, 4-10

F Features, 1-2 Field Wiring Arm, 2-10, 6-1, 6-6, 6-9 Formats, Data, 3-4

G grounding, 2-11

I installation, of module, 2-8 Installing the Module, 2-2

K keying bands, 2-8

L last state configuration plugs, 2-3 LED Indicators, 2-12, 7-1

M Module Configuration, 3-1 Module Defaults, 3-4 module installation, 2-8 module location, 2-3 Module Troubleshooting, 7-2 Multiple GET Instructions, 4-1, B-1

O Output Ranges, 1-2 data polarity, 3-3

Publication 1771-6.5.30 - November 1998

Page 80

I–2

Table of Contents

Polarity Data, 4-10 Scaling, 3-6 power requirements, 2-2 pre-installation considerations, 2-2 Preparation for Calibration, 6-1, 6-5, 6-9 Programming Formats, Block Transfer Multiple GET Instructions, PLC-2, -2/20, B-1 PLC-2 Family Processors, 4-2 PLC-3 Family Processors, 4-6 PLC-5 Family Processors, 4-8 Programs, Sample, 4-2, 4-7, 4-8

RBT Status Words, 7-1

Sample Programs, 4-2, 4-7, 4-8 Scaling, 3-6 Maximum and Minimum Values, 3-6 Status Words, RBT, 7-1

Publication 1771-6.5.30 - November 1998

Test Equipment, 6-1 Troubleshooting, 7-2

Update Time, 4-13

- voltage output version, 2-3 voltage range configuration plugs, 2-6

Word Block Transfer Boundary, 4-11 Configuration, 3-3 Scaling, 3-6