Fundamental Principles of NC Programming
2.2 Language elements of the programming language
Fundamentals
Programming Manual, 10.2004 Edition, 6FC5 298-7AB00-0BP1
2-13
In arithmetic expressions, the execution order of all the operators can be specified by
parentheses, in order to override the normal priority rules.
Value assignments
Values can be assigned to the addresses. The method of value assignment depends on the
type of address identifier.
An "=" sign must be inserted between the address identifier and the value if
• The address identifier comprises more than one letter,
• The value includes more than one constant.
The "="-sign can be omitted if the address identifier is a single letter and the value consists
of only one constant. Leading signs are allowed and separators are permitted after the
address letter.
Example of value assignments
X10 ;Value assignment (10) to address X, "=" not required
X1=10 ;Value assignment (10) to address (X) with
;numeric extension (1), "=" required
FGROUP(X1, Y2) ;Axis names from passed parameters
AXDATA[X1] ;Axis name as an index when accessing axis data
AX[X1]=10 ;Indirect axis programming
X=10*(5+SIN(37.5)
)
;Value assignment by means of a numeric expression
;"=" required
Note
A numeric extension must always be followed by one of the special characters "=", "(", "[",
")", "]", ",", or an operator, in order to distinguish an address name with numeric extension
from an address letter with a value.
Names
Identifiers can also be used to describe words (in compliance with DIN 66025). The
identifiers have the same meaning as the words within an NC block. Identifiers must be
unique. The same identifier must not be used for different objects.
Identifiers can stand for:
• Variable
– System variable
– User variable
• Subprograms