Priority Of The Operations - Siemens SINUMERIK 840D sl Programming Manual

Job planning
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Flexible NC programming

1.8 Priority of the operations

Example: calculate and evaluate the quotient of both operands
R1=61.01 R2=61.02 R3=0.01
IF ABS((R2-R1)/R3)-1) > 10EX-5 GOTOF
ERROR
M30
ERROR: SETAL(66000)
1.8
Priority of the operations
1.8
Function
Each operator is assigned a priority. When an expression is evaluated, the operators with
the highest priority are always applied first. Where operators have the same priority, the
evaluation is from left to right.
In arithmetic expressions, the execution order of all the operators can be specified by
parentheses, in order to override the normal priority rules.
Order of operators
From the highest to lowest priority
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
Note
The concatenation operator ":" for Frames must not be used in the same expression as other
operators. A priority level is therefore not required for this operator.
Example: IF statement
If (otto==10) and (anna==20) gotof end
1-24
NOT, B_NOT
*, /, DIV, MOD
+, –
B_AND
B_XOR
B_OR
AND
XOR
OR
<<
==, <>, >, <, >=, <=
;Assignment of initial values
;Jump not executed
;End of program
Negation, bit-serial negation
Multiplication, division
Addition, subtraction
Bit AND
Bit-serial exclusive OR
Bit-serial OR
AND
Exclusive OR
OR
Concatenation of strings, result type STRING
Comparison operators
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
Job planning

Advertisement

Table of Contents
loading

Table of Contents