xLadder user manual-V2.0.0.6

6.13.7 SHRB

Input/output Operand

Data type

DATA, S_BIT

I, Q, M, SM, T, C, V, S, L

Boolean

N

VB, IB, QB, MB, SB, SMB, LB, AC,constant, *VD, *LD, *AC

Boolean

SHRB instruction moves the DATA value to the shift

register. S_BIT specifies the lowest bit of the shift

register.N specifies the length of the shift register and the

shift direction (shift plus = N, shift minus = - N).The moved

out bit is placed in the overflow memory bit (SM1.1).The

instruction is defined by S_BIT and N.

error conditions:

0006

Indirect address

0091

Operating number is out of range

0092

Count field error

Special memory bit:

SM1.1

Overflow bit

Example:

When the value of M0.0 is 1 , the value of M10.0 is moved to V0.0 , the value of V0.0 is moved to V0.1 , the value of V0.1 is moved to V0.2 , the value of V0.2 is moved to V0.3 , the value of V0.3 is moved to SM1.1.

If N is negative, the shift direction is opposite.

182

Made with FlippingBook - Online magazine maker