Siemens Simatic S7-200 System Manual page 298

Programmable controller
Hide thumbs Also See for Simatic S7-200:
Table of Contents

Advertisement

Instruction Set
Decode
L
A
EN
D
IN
S
T
DECO
L
212
214
Encode
L
A
EN
D
IN
S
T
ENCO
L
212
214
Segment
L
A
EN
D
IN
S
T
SEG
L
212
214
(IN)
Segment
LSD
Display
0
1
2
3
4
5
6
7
Figure 10-52
10-110
The Decode instruction sets the bit in the output word (OUT)
that corresponds to the bit number (Bit #), represented by the
DECO
least significant "nibble" (4 bits) of the input byte (IN). All other
bits of the output word are set to 0.
OUT
Operands:
IN, OUT
215
216
The Encode instruction writes the bit number (bit #) of the least
significant bit set of the input word (IN) into the least significant
ENCO
"nibble" (4 bits) of the output byte (OUT).
OUT
Operands:
IN, OUT
215
216
The Segment instruction generates a bit pattern (OUT) that
illuminates the segments of a seven-segment display. The
SEG
illuminated segments represent the character in the least
significant digit of the input byte (IN).
OUT
Operands:
IN, OUT
215
216
Figure 10-52 shows the seven segment display coding used by
the Segment instruction.
(OUT)
- g f e
d c b a
0 0 1 1
1 1 1 1
0 0 0 0
0 1 1 0
0 1 0 1
1 0 1 1
f
0 1 0 0
1 1 1 1
e
0 1 1 0
0 1 1 0
0 1 1 0
1 1 0 1
0 1 1 1
1 1 0 1
0 0 0 0
0 1 1 1
Seven Segment Display Coding
IN:
VB, IB, QB, MB, SMB, AC, Constant,
*VD, *AC, SB
OUT:
VW, T, C, IW, QW, MW, SMW, AC,
AQW, *VD, *AC, SW
IN:
VW, T, C, IW, QW, MW, SMW, AC,
AIW, Constant, *VD, *AC, SW
OUT:
VB, IB, QB, MB, SMB, AC, *VD, *AC,
SB
IN:
VB, IB, QB, MB, SMB, AC, Constant,
*VD, *AC, SB
OUT:
VB, IB, QB, MB, SMB, AC, *VD, *AC,
SB
(IN)
Segment
LSD
Display
8
a
9
A
b
g
B
c
C
d
D
E
F
S7-200 Programmable Controller System Manual
C79000-G7076-C230-02
(OUT)
- g f e
d c b a
0 1 1 1
1 1 1 1
0 1 1 0
0 1 1 1
0 1 1 1
0 1 1 1
0 1 1 1
1 1 0 0
0 0 1 1
1 0 0 1
0 1 0 1
1 1 1 0
0 1 1 1
1 0 0 1
0 1 1 1
0 0 0 1

Advertisement

Table of Contents
loading

Table of Contents