L-force | plc designer - softmotion – Lenze PLC Designer PLC-Designer (R2-x) SoftMotion User Manual
Page 63

L-force | PLC Designer - SoftMotion
CNC editor
Supported and extended elements of the CNC language of DIN66025
63
L
DMS 5.2 EN 03/2011 TD17
The CNC program is written to a data structure as a list (OUTQUEUE structure) of
GEOINFO structure objects and this means that it can be entered into the interpolator
directly. As a result, the decoder and path preprocessing function POU no longer needs
to be called as in the case of a). However, it also means that the program cannot be
changed at runtime.
The CNC program is written to the control of the file system using either method a) or
b). Step-by-step processing is employed for read-out and conversion at runtime. This
method is primarily suitable for large programs which the memory is unable to
accommodate in full.
4.1
Supported and extended elements of the CNC language of DIN66025
In order to give programmers an easy means of creating geometric paths, SoftMotion
supports parts of the CNC language of DIN 66025. As the entire SoftMotion concept is
embedded in the much more powerful language of IEC 61131, only the parts of DIN 66025
used to create paths are supported.
Specified structure of a CNC program
A »SoftMotion« CNC program has to start with a percentage sign (%). A program name can
appear on the same line but has to be separated by a blank space or a TAB character. The
actual CNC program comprises a number of records.
The number of words in a record (line) is not limited.
A word comprises a letter (word identifier) followed by a number (e.g. G01; see
). The format is not case-sensitive and leading zeros are ignored (G01 = g1).
The first word in every record represents the number of the record (N
"N01", comprising the record's letter and number. The words in a record are separated by
blank spaces or TAB characters. The record number is currently of no relevance but is
required for reasons of conformity. The remaining words in each record are processed from
right to left. With the exception of the travel command (G
), when each word is processed, the word number is written to a variable
in accordance with its letter and this variable is then accessed by the travel command
during subsequent execution.
Each record can only contain one travel command which must appear directly to the right
of the record number. If a record does not contain a travel command, the one used in the
last record is added automatically.
%
N
...
N
Example:
%1 example
N10 G01 X100 Y100 E100 F100 E-200
N20 G01 Z40 F20
N30 G03 X-100 R200 F100
...