08/2005 Expanding the Operator Interface (BE1)
3 Syntax
© Siemens AG, 2005. All rights reserved
SINUMERIK 840D sl/840D/840Di/810D HMI Installation and Start-Up Guide (IAM) – 08/2005 Edition
BE1/3-95
3.6.9 Operators and functions
Table 3-11
Mathematical operators
+
Addition
-
Subtraction
*
Multiplication
/
Division
MOD
Modulo operation
( )
Parentheses
AND
AND operator
OR
OR operator
NOT
NOT operator
Example:
VAR1.VAL = 45 * (4 + 3)
Bit-serial operators
BOR Bit-serial OR
BXOR Bit-serial XOR
BAND Bit-serial AND
BNOT Bit-serial NOT
SHL Shift bits to left
SHR Shift bits to right
SHL operator
Syntax:
variable = value SHL increment
value value to be shifted
increment number of shift increments
Function:
Bits are shifted to the left using the function SHL. 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.