4 extending the cnc program, Extending the cnc program, Getting started – Lenze ETC Motion Control User Manual
Page 50

Getting started
Creating a CNC sample program
Extending the CNC program
2.10
2.10.4
l
50
EDSTCXN EN 2.0
2.10.4
Extending the CNC program
The sample program ("test.din") executes a circular profile. The actual target
of a CNC program is to switch on a tool while executing a program. Thus, the
sample program is extended by the corresponding M−functions M14 and
M15, which lift or lower the tool when the profile is executed. The
M−functions are programmed in a separate PLC program.
M−function
Target function
Programming of a separate PLC program
M14
Lower tool
An output for lowering the tool is to be set. Switchover to
the next command only after one of the lower limit
switches has been activated.
M15
Lift tool
An output for lifting the tool is to be set. Switchover to the
next command only after one of the upper limit switches
has been activated.
Starting point: The cursor flashes in the top right of the text editor and the
graphic area is displayed. In the control system, the program (e.g. test.din.)
is loaded.
1. Press
2. Select the program (e.g. test.din) and press
3. Press
4. Add the M−functions according to the following table.
Input in the text editor
Meaning
%1
G1 F10000
G17
M15
Lift tool
G0 X10 Y10
M14
Lower tool
G2 X20 Y20 R10
G1 X30
G2 X40 Y10 R10
G1 Y0
G2 X30 Y−10 R10
G1 X20
G2 X10 Y0 R10
G1 Y10
M15
Lift tool
G0 X0 Y0
M30
5. Press
1. Press
2. Press
Exit ETC−MMI