Function
To meet the various technological demands of modern machine tools, a CNC high-level language has been implemented in SINUMERIK CNCs that provides a high degree of programming freedom.
System variables
The system variables ($.) can be processed in the part program (read, partially write). System variables allow access to, for example, machine data, setting data, tool management data, programmed values, and current values.
User variables
If a program is to be used flexibly, variables and parameters are used instead of constant values. SINUMERIK CNCs give you the option of executing all CNC functions and addresses as variables. The names of the variables can be freely defined by the user. Read and write access protection can also be assigned using attributes. This means that part programs can be written in a clear and neutral fashion and then adapted to the machine as required, for example, free selection of axis and spindle address designations.
User variables are either global GUD or local LUD. LUD can also be redefined via machine data to make them into global program user variables (PUD). They are displayed in the Parameters operating area under the user data softkey, where they can also be changed. Global user variables GUD are CNC variables that are set up by the machine manufacturer. They apply in all programs.
Local user variables LUD are available to the user for parameterizing part programs. These data can be redefined in every part program. These variables make programming more user-friendly and allow the users to integrate their own programming philosophy.
Indirect programming
Another option for the universal use of a program is indirect programming. Here, the addresses of axes, spindles, R parameters, etc., are not programmed directly, but are addressed via a variable in which their required address is then entered.
Program jumps
The inclusion of program jumps allows extremely flexible control of the machining process. Conditional and unconditional jumps are available as well as program branches that depend on a current value. Labels that are written at the beginning of the block are used as jump destinations. The jump destination can be before or after the exit jump block.
Program coordination in several channels
Program coordination makes it possible to control the time-related execution in parallel operation of several CNC channels using plain text instructions in the part program. Programs can be loaded, started and stopped in several channels. Channels can be synchronized.
Arithmetic and trigonometric functions
Extensive arithmetic functions can be implemented with user variables and arithmetic variables.
In addition to the 4 basic arithmetic operations, there are also:
- Sine, cosine, tangent
- Arc sine, arc cosine, arc tangent
- Power of 2 (squared), square root
- Absolute value
- Integer component, round to integer
- Exponential function, natural logarithm
- Offset, rotation, mirroring
- Scale modification
Comparison operations and logic combinations
Comparison operations with variables can be used to formulate jump conditions.
The comparison functions that can be used are:
- Equal to, not equal to
- Greater than, less than
- Greater than or equal to
- Less than or equal to
- Concatenation of strings
The following logic combinations are also available: AND, OR, NOT, EXOR (EXclusive OR). These logic operations can also be performed bit by bit.
Macro techniques
Using macros, single instructions from a programming language can be grouped together to form a complex instruction. This shortened instruction sequence is given a freely definable name and can be called in the part program. The macro command is executed in the same way as the single instructions.
Control structures
The CNC normally processes the CNC blocks in the order in which they are programmed. Control structures allow the programmer to define additional alternatives and program loops as well as program jumps. The commands make structured programming possible, and make the programs much easier to read:
- Choice of 2 alternatives IF-ELSE – ENDIF
- Continuous loop control LOOP
- Counting loop FOR
- Program loop with start condition WHILE
- Program loop with end condition REPEAT
|