EasyManua.ls Logo

Tormach 1100MX - Programming Overview

Tormach 1100MX
270 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
10.1 PROGRAMMING OVERVIEW
Read the following sections for a G-code overview:
10.1.1 About G-Code Programming Language 166
10.1.2 G-Code Formatting Reference 166
10.1.3 Supported G-Codes Reference 170
10.1.1 About G-Code Programming Language
A G-code program is made up of one or more lines of code.
Each line of code is called a block, and can include commands
to the machine. Blocks are collected into a file, which makes a
program.
A block is normally made up of an optional line number at the
beginning, followed by one or more words, which groups the
elements together into a single statement.
A word is a letter followed by a number (or, something that
evaluates to a number). A word can either give a command or
provide an argument to a command.
A program is one or more blocks, each separated by a line
break. Blocks in a program are executed either:
l Sequentially (from the top of the program to the
bottom)
l Until an end command (M02 or M30) is encountered
E X A M P L E :
G01 X3 is a valid line of code with two words:
l G01 is a command: the machine should move in a
straight line at the programmed feed rate.
l X3 provides an argument value: the value of X
should be 3 at the end of the move.
Most commands start with either G (general) or M
(miscellaneous) G-codes and M-codes.
There are two commands (M02 and M30) that end a program.
A program can end before the end of a file. If there are lines in
a file after the end of a program, they're not meant to be
executed in the normal flow (they're generally parts of
subroutines).
Comments and Messages
You can add comments or messages to lines of G-code to help
clarify the intention of the programmer: to embed a comment
in a line, use parentheses; to add a comment to the end of a
line, use a semicolon.
Note: The semicolon is not treated as the start of a
comment when it's enclosed in parentheses.
Comments can appear between words, but they can't be
between words and their corresponding parameter.
E X A M P L E :
S100(set speed)F200(feed) is okay, but S
(speed)100F(feed) is not.
If the comment occurs on a line with M00 or M01, and contains
a file name with a .jpg or .png extension, PathPilot displays the
image in the Tool Path display when the program reaches the
M00 or M01 break.
10.1.2 G-Code Formatting Reference
A permissible block of input code is made up of the following
programming elements, in order, with the restriction that
there is a maximum of 256 characters allowed on a line:
1. (Optional) Block delete character (/)
2. (Optional) Line number
3. Any number of words, parameter settings, and
comments
4. End of line marker (carriage return or line break)
Programs are limited to 999,999 lines of code.
Spaces and tabs are allowed anywhere on a line of code and
do not change the meaning of the line, except inside
comments. Blank lines are allowed in the input, but they're
ignored. Input is not case sensitive (except in comments), so
any letter outside a comment may be in uppercase or
lowercase without changing the meaning of a line.
E X A M P L E
G00 x +0. 12 34y 7 is equal to G00 x+0.1234
y7
A line may have:
l Any number of G words, but two G words from the same
modal group may not appear on the same line.
l Zero to four M words, but two M words from the same
modal group may not appear on the same line.
l For all other legal letters, a line may have only one word
beginning with that letter.
©Tormach® 2020
Specifications subject to change without notice.
Page 166 Tormach 1100MX Operator's Manual (Version 0720A)
For the most recent version, see tormach.com/support
10: PROGRAMMING

Table of Contents

Other manuals for Tormach 1100MX

Related product manuals