Siemens SINUMERIK 840D sl Commissioning Manual page 696

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

Advertisement

Programming commands
6.1 Operators
6.1.2
Bit operators
Overview
Bit operators
BOR
BXOR
BAND
BNOT
SHL
SHR
SHL operator
Bits are shifted to the left using the SHL (SHIFT LEFT) operator. 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 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.
78
Identifier
Bit-serial OR
Bit-serial XOR
Bit-serial AND
Bit-serial NOT
Shift bits to left
Shift bits to right
value
increment
variable =
SHL
Shift Left
value
increment
; 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 to be shifted
number of shift increments
SINUMERIK Integrate Run MyScreens (BE2)
Programming Manual, 03/2013, 6FC5397-1DP40-3BA1

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents