Chapter 7
141
UM10372_PCNC440_Manual_0221A
PROgRAMMiNg
7.6.3 Change Tool Number – T
It is the programmer’s responsibility to ensure that the carriage is in a safe place for changing tools,
for example by using G30. This allows opmizaon of moon which can save me, especially with
gang tooling. A pause for manual intervenon can always be provided by an M00 or M01 before the
tool change. It is an error if:
• A negave T number is used or a T number larger than 54 is used
7.7 Advanced Programming with Parameters and Expressions
This secon describes the parameter and expression programming language features of PathPilot.
You may wish to skip this secon on rst reading as these features are not used in common G-code
applicaon (hand coding), G-code created by the PathPilot conversaonal programming interface,
or the majority of third-party CAM-programming systems.
NOTE: There are signicant dierences between controls in the way parameters work. Do not assume that
code from another control works in the same way with the operang system. Tormach advises against
wring parametric G-code as this is dicult to debug and very dicult for another operator to understand.
Modern CAM virtually eliminates the need for it.
7.7.1 Parameters
The RS274/NGC language supports parameters. Parameters are analogous to variables in other
programming languages. PathPilot maintains an array of 10,320 numerical parameters. Many of
them have specic uses. The parameters that are associated with xtures are persistent over me.
Other parameters are undened when the operang system is loaded. The parameters are preserved
when the interpreter is reset. Parameters 1 to 1000 can be used by the code of part-programs.
There are several types of parameters of dierent purpose and appearance. The only value type
supported by parameters is oang-point; there are no string, Boolean or integer types in G-code
like in other programming languages. However, logic expressions can be formulated with Boolean
operators (AND, OR, XOR, and the comparison operators EQ, NE, GT, GE ,LT, LE), and the MOD,
ROUND, FUP and FIX operators support integer arithmec.
Parameter Syntax
There are three types of parameters, numbered, named local, and named global. The type of the
parameter is dened by its syntax:
numbered - #4711
named local - #<localvalue>
named global - #<_globalvalue>