Shift Register Bit - Siemens Simatic S7 Series System Manual

Hide thumbs Also See for Simatic S7 Series:
Table of Contents

Advertisement

Example: Shift and Rotate instructions
LAD
7.14.2

Shift register bit

The Shift Register Bit instruction shifts a bit value into the Shift Register. This instruction
provides an easy method for sequencing and controlling product flow or data. Use this
instruction to shift the entire register one bit, once per scan.
LAD / FBD
STL
SHRB DATA,
S_bit, N
S7-200 SMART
System Manual, 09/2015, A5E03822230-AC
Description
The shift register bit instruction shifts the bit value of DATA into the Shift Register.
S_BIT assigns the location of the least significant bit of the shift register. N assigns
the length of the Shift Register and the direction of the shift (Shift Plus = N, Shift
Minus = -N).
Each bit value shifted out by the SHRB instruction is copied to the overflow memory
bit SM1.1.
The shift register bits are defined by both the least significant bit S_BIT location and
the number of bits assigned by the length N.
STL
Network 1
LD I4.0
RRW AC0, 2
SLW VW200, 3
Program instructions
7.14 Shift and rotate
317

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart series

Table of Contents