L-force | plc designer – Lenze PLC Designer PLC Designer (R2-x) User Manual

Page 475

Advertising
background image

L-force | PLC Designer

IEC Operators and additional norm extending functions



DMS 3.2 EN 02/2011 TD29

473

Example in ST:

PROGRAM ror_st

VAR
in_byte : BYTE:=16#45;
in_word : WORD:=16#45;
erg_byte : BYTE;
erg_word : WORD;
n: BYTE :=2;
END_VAR

erg_byte:=ROR(in_byte,n); (* Result is 16#51 *)

erg_word:=ROR(in_word,n); (* Result is16#4011 *)

Example in FBD:

Example in IL:

LD 16#45

ROR 2

ST erg_byte

Advertising