Siemens SINUMERIK 840DE sl Commissioning Manual page 1111

Basesoftware and operating software
Hide thumbs Also See for SINUMERIK 840DE sl:
Table of Contents

Advertisement

VAR01 = 16 SHL 2
VAR02 = VAR02 SHL VAR04
END_PRESS
SHR operator
Bits are shifted to the RIGHT using the SHR (SHIFT RIGHT) function. You can specify both
the value to be shifted and the number of shift increments directly or via a variable. If the limit
of the data format is reached, the bits are shifted beyond the limit without displaying an error
message.
Use
Syntax:
Description:
Parameters:
Example
PRESS(VS1)
VAR01 = 16 SHR 2
VAR02 = VAR02 SHR VAR04
END_PRESS
SINUMERIK Integrate Run MyScreens (BE2)
Programming Manual, 12/2017, 6FC5397-1DP40-6BA1
; Result = 64
; Convert content of VAR02 to 32-bit unsigned
, and shift content to left by number of bits specified
in VAR04. Then convert 32-bit value back to format of
variable VAR02.
value SHR increment
variable =
Shift Right
value
value to be shifted
increment
number of shift increments
; Result = 4
; Convert content of VAR02 to 32-bit unsigned
, and shift content to right by number of bits
specified in VAR04. Then convert 32-bit value back
to format of variable VAR02.
Programming commands
6.1 Operators
125

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840d sl

Table of Contents