20
Basic operation — setting bytes (8-bits)
8-bit output patterns (bytes)
Each I/O channel is set as an output port in an 8-bit binary output pattern (byte). Bit 7 (B7) of each port is the most significant
bit (MSB) and Bit 0 (B0) is the least significant bit (LSB).
An 8-bit output pattern for each port is set by entering a value that is the equivalent of the desired binary bit pattern. From the
front panel, the entered value can be in the decimal, hexadecimal, or octal format. The decimal (ASCII) format is the factory
and *RST default.
lists the decimal weights for the bits of an 8-bit output pattern. To determine the decimal value for an output pattern,
simply add up the decimal weights for the bits to be set to ‘1’. As shown in
, the decimal equivalent for output binary
pattern ‘10100101’ is the sum of the decimal weights for B7, B5, B2, and B0.
Figure 16
Decimal weighting for 8-bit output pattern (byte)
For remote programming, the following command is used to set the 8-bit output pattern for each output port:
OUTP:BYTE <NRf|NDN>,<clist>
Valid channels for the byte <clist> parameter include channels 11, 12, 13, and 14.
Like front panel operation, the decimal equivalent of the binary pattern can be used to set the port. The pattern can also be set
using the binary, octal, or hexadecimal equivalent. For details, see “
.
Channel 11, 12, 13, or 14
Digital I/O line:
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Bit position:
B7
B6
B5
B4
B3
B2
B1
B0
Binary bit pattern*:
0/1
0/1
0/1
0/1
0/1
0/1
0/1
0/1
Decimal weight:
128
(2
7
)
64
(2
6
)
32
(2
5
)
16
(2
4
)
8
(2
3
)
4
(2
2
)
2
(2
1
)
1
(2
0
)
* 0 = line set low, 1 = line set high.
Example – Determine decimal value for binary output pattern ‘10100101’ (bits B7, B5, B2 and B0 to be set high to logic ‘1’):
Bit position:
B7
B6
B5
B4
B3
B2
B1
B0
Binary bit pattern:
1
0
1
0
0
1
0
1
Decimal weight of bits set high:
128
—
32
—
—
4
—
1
Decimal value for bit pattern:
= B7 + B5 + B2 + B0
= 128 + 32 + 4 + 1
= 165
Содержание 7707
Страница 55: ...52 Specifications 7707 Multiplexer Digital I O Module...
Страница 58: ......