The text of a manual · part 7 of 9
Thermocouple/Millivolt Input Module (Cat. No. 1771-IXE Series D) User Manual, pages 61 to 70
Pages 61 to 70 of 85
The original document is the PDF (708 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-IXE
Page 61
Programming Examples
B–3
1.
Press [SHIFT][MODE] to display your ladder diagram on the industrial terminal.
2.
Press DD,03:0[ENTER] to display the block transfer write file. The industrial terminal screen should look like Figure B.2. Notice the highlighted block of zeroes. This highlighted block is the cursor. It should be in the same place as it appears in Figure B.2. If it is not, you can move it to the desired position with the cursor control keys. Once you have the highlighted cursor in the right place, you can go on to step 3.
3.
Enter the data corresponding to your bit selection in words 0 through 4.
4.
When you have entered your data, press [ENTER]. If you make a mistake, make sure the cursor is over the word you desire to change. Enter the correct data and press [ENTER]. Figure B.2 Write Block Transfer for a PLC-3 Processor
5.
PLC-5 Family Processors
! "
Press [CANCEL COMMAND]. This returns you to the ladder diagram.
The following is a sample procedure for entering data in the configuration words of the block transfer write instruction when using a PLC–5 processor. For a complete sample program, refer to Figure Figure 3.3.
-
Page 62
B–4
Programming Examples
1.
Enter the following rung: "
-
+1 2*( $''0(11 .) 2*( " 20$-1)(0
2.
Press [F8],[F5] and enter N7:60 to display the configuration block. The industrial terminal screen should like Figure B.3. Figure B.3 Sample PLC-5 Data File (Hexadecimal Data)
-
The above data file would configure the module as follow:
• • • • • • • •
6
”K” thermocouples on all inputs temperature scale of Celsius output data in BCD format real time sampling set to a 1 second scan rate all channel alarms ON all channel minimum alarm values set to –40 all channel maximum alarm values set to +85 all calibration values set to 0
3.
Enter the data corresponding to your bit selections and add alarm and calibration values, if so desired.
4.
[ESC] returns you to the main menu.
Page 63
Appendix
4-Digit Binary Coded Decimal (BCD)
C
The 4–digit BCD format uses an arrangement of 16 binary digits to represent a 4–digit decimal number from 0000 to 9999 (NO TAG). 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 (NO TAG). 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 64
C–2
Data Table Formats
Table C.A BCD Representation 23 (8)
Signed-magnitude Binary
Place Value 22 (4) 21 (2)
Decimal Equivalent
20 (1)
-
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
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
Page 65
Data Table Formats
C–3
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 66
C-4 Data Table Formats
Publication 1771-6.5.130 - May 1999
Page 67
Appendix
D
Block Transfer (Mini-PLC-2 and PLC-2/20 Processors) Multiple GET Instructions - Mini-PLC-2 and PLC-2/20 Processors
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 read 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 NO TAG 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) that designates where the data will be 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 this is a block transfer read operation (if this were a block transfer write operation, ”07” would be replaced by ”06”.) 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 6 words or channels, and is expressed as 110 in binary notation.
Page 68
D–2
Block Transfer (Mini–PLC–2 and PLC–2/20 Processors)
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 D.1 Multiple GET Instructions (Mini-PLC-2 and PLC-2/20 Processors Only) 010 Data Table
07
Output Image Table
Control Byte
1
012
R 017
1
2
0
Timer/Counter Accumulated Values Area
027 030
060
Output Image Table Control 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
110 Status Byte
1 R 0
112 117
6
0
Timer/Counter Preset Values Area
130
Input Image Table Status Byte Contains Done Bit Storage Location Contains File Address in BCD
R = Read 07 = Bit
-
-
-
-
-
- - 12172
Setting the Block Length (Multiple GET Instructions only)
"
The input module transfers a specific number of words in one block length. The number of words transferred is determined by the block length entered in the output image table control byte corresponding to the module’s address.
Page 69
Block Transfer (Mini–PLC–2 and PLC–2/20 Processors)
D–3
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, NO TAG shows if your input module is set up to transfer 6 words, you would set bits 01 and 02 of the lower image table control byte. The binary equivalent of 6 words is 000110. You would also set bit 07 when programming the module for block transfer read operations. Bit 06 is used when block transfer write operations are required. Figure D.2 Setting Block Length (Multiple GET Instructions only) Block Transfer Read Enable Bit
1
For Block Transfer Active Operations Only
Read 6 Words from Module
0 0 0 0 1 1
0
010 Data Table Control Byte
1
Output Image Table
Output Image Table Control Byte Contains Read Enable Bit and Block Length in Binary Code
012
R 017
1
2
027 030
0
Data Address Contains Module Address in BCD -
Number of Words to Transfer
Binary Bit Pattern Lower Output Image Table Byte 05
04
03
02
01
00
-
-
:
:
Page 70
D-4 Block Transfer (Mini-PLC- - 2 and PLC-2/20 Processors)
Publication 1771-6.5.130 - May 1999