Chapter 7
132
UM10350_PCNC770_Manual_0916A
Programming
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>
Parameter Scope
The scope of a parameter is either global or local within a subroune. The scope of each parameter
is inferred from its syntax. Subroune parameters and named local parameters have local scope.
Named global parameters and all numbered parameters starng from #31 are global in scope.
RS274/NGC uses lexical scoping. In a subroune, only the local parameters dened therein and any
global parameters are visible. The local parameters of a calling procedure are not visible in a called
procedure.
Behavior of Uninialized Parameters
Uninialized global parameters and unused subroune parameters return the value zero when used
in an expression. Uninialized named parameters signal an error when used in an expression.
Parameter Mode
The mode of a parameter can either be read/write or read-only. Read/write parameters may be
assigned values within an assignment statement. Read-only parameters cannot be assigned values.
They may appear in expressions, but not on the le-hand side of an assignment statement.
Persistence and Volality
Parameters can either be persistent or volale. When the operang system is powered o, volale
parameters lose their values and are reset to zero. The values of persistent parameters are saved in
a disc le and restored to their previous values when the operang system is powered on again. All
parameters except numbered parameters in the current persistent range (5163 to 5390) are volale.