Programming
2.8 Operators
Expanding the user interface
Commissioning Manual, 11/2006, 6FC5397-0DP10-0BA0
2-113
Example
PRESS(VS1)
VAR01 = 16 SHL 2
; Result = 64
VAR02 = VAR02 SHL VAR04
; 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.
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:
variable =
value SHRincrement
Description:
Shift Right
Parameters:
value
value to be shifted
increment
number of shift increments
Example
PRESS(VS1)
VAR01 = 16 SHR 2
; Result = 4
VAR02 = VAR02 SHR VAR04
; 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.
END_PRESS
Summary of Contents for SINUMERIK
Page 6: ...Preface Base software and HMI Advanced 6 Commissioning Manual 03 2009 6FC5397 0DP10 3BA0 ...
Page 96: ......
Page 562: ...Index Expanding the user interface Index 4 Commissioning Manual 11 2006 6FC5397 0DP10 0BA0 ...
Page 566: ...Table of contents Online Help HE1 4 Commissioning Manual 11 2006 6FC5397 0DP10 0BA0 ...
Page 598: ...Online Help HE1 Commissioning Manual 11 2006 6FC5397 0DP10 0BA0 36 ...