EasyManua.ls Logo

Tormach PCNC 440 - Page 142

Tormach PCNC 440
183 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...
Chapter 7
142
UM10372_PCNC440_Manual_0221A
PROgRAMMiNg
Parameter Scope
The scope of a parameter is either global or local within a subroune. The scope of each parameter is
inferred from its syntax. Subroune parameters and named local parameters have local scope. Named
global parameters and all numbered parameters starng from #31 are global in scope. RS274/NGC uses
lexical scoping. In a subroune only the local parameters dened therein, and any global parameters
are visible. The local parameters of a calling procedure are not visible in a called procedure.
Behavior of Uninialized Parameters
Uninialized global parameters and unused subroune parameters return the value zero when used
in an expression. Uninialized 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 Volality
Parameters can either be persistent or volale. When the operang system is powered o, volale
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 operang system is powered on again. All
parameters except numbered parameters in the current persistent range (5163 to 5390) are volale.
Intended Usage
Numbered parameters in the range #31-#5000, named global, and local parameters are available
for general-purpose storage of oang-point values, like intermediate results, ags, etc., throughout
program execuon. They are read/write (can be assigned a value). Subroune parameters,
numbered parameters #1-#30, and system parameters are read-only and not available for general
use. Subroune parameters are used to hold the actual parameters passed to a subroune.
Numbered parameters in the range of #1-#30 are used to access osets of coordinate systems.
System parameters are used to determine the current running version and are read-only.

Table of Contents

Other manuals for Tormach PCNC 440