Page 231 - CNC Robotics
P. 231
CNC Robotics
Table 10.2 M-code Description
M-Code Commands
M30 Program End and Reset
(continued)
M60 Program Stop
M98 Call Macro subroutine (not available in KCam 4.0)
M-code Description
Table 10.3
User-defined M-codes Mxx Engage user-defined output
Mxx Disengage user-defined output
Mxx Engage user-defined output
Mxx Disengage user-defined output
Mxx Engage user-defined output
Mxx Disengage user-defined output
Note: "xx" represents the number specified by the user,
If you want to know more about the process of w riting G-code. I
suggest a trip to the local library or bookstore ; pick up a volume
dedicated to CNC programming. Most of these G- cod e and M -code
commands are self- explanatory and you will learn more about
how they are useful to you as you experim ent. The best way to
understand how the G-code works is to create a file in a drawing
program and import it into KCam. then go through the code and
see how it is put together. That brings us to the import function of
KCam .
How to Create a File to Import
The two file formats I have been generating are HPGL and DXF: th e
former is more frequently used than the latter. HPGL is an abbre-
viation of Hewlett-Packard Graphics Language. a command language
to control plotters and printers. An HPGL fil e is onl y two- di men-
sional, and w hile KCam imports this file ty pe it uses the informa-
tion in the Table Setup w indow to generate the cutt ing depth and
222