
16-3
Ladder Logic (LAD) for S7-300 and S7-400
C79000-G7076-C504-02
15... ...8 7... ...0
0 1 0 1
0 1 0 1 0 1 0 10 0 0 0
0 1 0 01 1 0 1
IN
N
OUT 0 0 0 0
1 1 1 1
0 0 0 0 1 1
6 places
Parameters:
The signal state of the bit that is shifted out
last is stored in bit CC 1 of the status word
(same as the signal state of ENO).
These five bits
are lost.
The vacated places
are filled with zeros.
Table 16-1 Shift Left Word Box and Parameters
LAD Box
Parameter Data Type Memory Area Description
EN BOOL I, Q, M, D, L Enable input
_
EN ENO
ENO BOOL I, Q, M, D, L Enable output
IN
T
IN WORD I, Q, M, D, L Value to shift
N
N WORD I, Q, M, D, L Number of bit positions by which to shift
OUT WORD I, Q, M, D, L Result of shift operation
Status Word Bits
BR CC 1 CC 0 OV OS OR STA RLO FC
Write x x x 0 – x 1 x x
I 0.0
A signal state of 1 at input I 0.0
activates the instruction.
Memory word MW0 is shifted to the
left by the number of bits specified in
memory word MW2.
The result is put into memory word
MW4. If the signal state of the bit
shifted last was 1, output Q4.0 is set.
Q 4.0
SHL_W
N
OUT
EN ENO
MW2
IN
Function is executed (EN = 1):
MW4
MW0
S
Figure 16-1 Shift Left Word
Shift and Rotate Instructions
Kommentare zu diesen Handbüchern