Data Manipulation Instructions
Chapter 6
68
logic continuity. Condition instructions can be programmed before the Get
Byte instruction or after the Limit Test instruction, but not between them
(Figure 6.10).
Figure 6.10
Get Byte/Limit Test Comparison
||
06
()
05
120 010
| B |
YYY
0451
| L |
050
When 170
8
≤
YYY
8
≤
200
8
, comparison is true and 010/05 is energized.
170
200
Reference Values
The Get Byte instruction addresses either the upper or lower byte of a data
table word. A 1 is entered after the word address for an upper byte; a 0 is
entered for the lower byte.
The Limit Test instruction addresses one data table word that stores both
the upper and lower limits. The upper limit is stored in the upper byte and
the lower limit is stored in the lower byte. The upper byte of word 045
would be addressed as 0451 (Figure 6.10).
The PC processor makes a duplicate of the upper or lower byte of the word
addressed by the Get Byte instruction. The octal value stored in that byte
is then compared to the upper and lower octal values of the Limit Test
instruction. If the Get Byte value is equal to or between the Limit Test
values, the comparison is true and logic continuity is established.
The Get Byte instruction is programmed in the condition area of the ladder
diagram rung. It tells the processor to make a duplicate of all 8 bits in the
addressed byte. When the rung containing the Get Byte–Put instructions
goes true, the data is transferred to the lower byte of the word address of
the Put instruction (Figure 6.11). Do not use the upper byte of the Put
instruction because it is a random value.
The Get Byte instruction can be programmed either at the beginning of a
rung or with one or more condition instructions preceding it (Figure 6.11).
Condition instructions, however, should not be programmed after a Get
Byte instruction. When one or more condition instructions precede the Get
Byte instruction, they determine whether the rung is true or false.
6.2.3
Get Byte-Put Instruction
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com