CNC4you Worldwide

Site Search

Menuclose
Related
Info
close
Complex tasks? No problem

Complex tasks? No problem

Complex tasks? No problem

CNC programmers increasingly face special tasks that take them to the limits of classic (DIN 66025) and graphical CNC programming. CNC high-level programming language with SINUMERIK provides valuable support in this area.

SINUMERIK high-level programming

Special tasks in CNC programming are common. Whether it be configurable CNC programs for component families that differ only in a few geometric sizes, certain components that require their own technology cycle because not all special tasks can be handled using standard cycles or a simple operator message to be generated from an ongoing CNC program that cannot be fully implemented using the instruction set offered by DIN 66025 or graphical CNC programming (e.g., ShopMill or ShopTurn), using a CNC high-level language offers new ways to respond quickly and flexibly.


Benefits of high-level languages

Unlike hardware-dependent assembler programming, high-level computer languages can be used to model complex program sequences in an easily readable format — that is, very transparently. This also applies to CNC programming. CNC high-level language complements machine-dependent DIN 66025 programming (G00, G01, G02, …). In the CNC market, the SINUMERIK high-level programming language offers fundamental properties of third-generation high-level computer languages such as C, C++, Visual Basic, Pascal or Java. In practice this means that it is possible to significantly increase the flexibility of CNC machining programs, allowing CNC programmers to implement challenging CNC applications.


Typical properties of high-level programming languages

A key prerequisite for programming using high-level languages is commands that are readable ("mnemonic") for the programmer, such as REPEAT, WHILE, CASE, etc. In addition, the programmer defines which variables are used in the program and which variable types they are to be assigned to. The variable type defines whether the variable should contain an axis position (floating-point number, type: REAL), a counter (whole number, type: INTEGER) or the result of a comparison (type: BOOLEAN). Control structures, such as conditional branches (IF, ELSE) or iteration loops (WHILE, REPEAT UNTIL), are also important for the mapping of the program sequence. Beyond the basic forms of calculation, high-level languages additionally offer higher-order mathematical functions, such as sine/cosine or a logarithm function. The operational scope also covers Boolean algebra, with functions such as AND, OR and NOT.


Easy to prepare with flow diagrams

When it comes to complex tasks, programmers use the flow diagram technique. First, the basic step-by-step sequence of the program is modeled and checked; then it is optimized "in theory" in an abstract, easy-to-follow format.
Not until the last step does the programmer translate the flow diagrams into concrete commands. The commands of high-level languages facilitate extremely efficient translation of flow diagrams.


More flexibility as a standard

A major benefit of the SINUMERIK high-level language is that it is a built-in feature of every SINUMERIK. This means that any CNC programmer can use it directly in the CNC editor without additional software. Alongside solutions for special tasks, this language also offers key benefits when it comes to training: working with the SINUMERIK high-level language increases the flexibility of CNC programs and gives trainees a fundamental understanding of how to handle higher-level programming languages. This enhances CNC training and increases aspiring specialists’ job opportunities.


The SINUMERIK high-level language

The SINUMERIK high-level language includes all the fundamental properties of third-generation programming languages. Following are a few examples:

Abstract data types

The following types of variables can be defined in SINUMERIK CNC programs:

NC-Code

Comment

INT
REAL
BOOL
CHAR
STRING
AXIS
FRAME

Whole number
Floating-point number
Logical value
ASCII character
Character string
CNC axis name
Coordinate displacement

Example


 

Control structures

The following control structures can be used in the SINUMERIK CNC high-level language:

NC-Code

Comment

IF, ELSE, ENDIF
LOOP, ENDLOOP
FOR, ENDFOR
WHILE, ENDWHILE
REPEAT UNTIL

Conditional branch
Infinite programming loop
For loop
Program loop
Program loop

Example


 

Operations in the SINUMERIK CNC high-level language

The following operations can be used in CNC programs (excerpt):

NC-Code

Comment

Comparative operation

 

==
<>
>
<
>=
<=

(equal to)
(not equal to)
(greater than)
(less than)
(greater than or equal to)
(less than or equal to)

Arithmetic Operation

 

+, -, *, /
SIN(), COS(), TAN(), ASIN(), ACOS(), ATAN()
SQRT(), POT()
LN(), EXP()
TRUNC(), ROUND()

 

Example



You are changing from the tablet to the classic version. Do you want to proceed?