EasyManua.ls Logo

Tormach 1100MX - Parameter Scope; Behavior of Uninitialized Parameters; Parameter Mode; Persistence and Volatility

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...
Parameter Scope
The scope of a parameter is either global or local within a
subroutine. The scope of each parameter is inferred from its
syntax. Subroutine parameters and named local parameters
have local scope. Named global parameters and all numbered
parameters starting from #31 are global in scope. RS274/NGC
uses lexical scoping. In a subroutine, only the local parameters
defined therein and any global parameters are visible. The
local parameters of a calling procedure are not visible in a
called procedure.
Behavior of Uninitialized Parameters
Uninitialized global parameters and unused subroutine
parameters return the value zero when used in an expression.
Uninitialized 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 left-hand side of an assignment statement.
Persistence and Volatility
Parameters can either be persistent or volatile. When the
operating system is powered off, volatile parameters lose their
values and are reset to zero. The values of persistent
parameters are saved in a disc file and restored to their
previous values when the operating system is powered on
again. All parameters except numbered parameters in the
current persistent range (5163 to 5390) are volatile.
Intended Use
Numbered parameters in the range #31-#5000, named global,
and local parameters are available for general-purpose storage
of floating-point values, like intermediate results, flags, etc.,
throughout program execution. They are read/write (can be
assigned a value). Subroutine parameters, numbered
parameters #1-#30, and system parameters are read-only and
not available for general use. Subroutine parameters are used
to hold the actual parameters passed to a subroutine.
Numbered parameters in the range of #1-#30 are used to
access offsets of coordinate systems. System parameters are
used to determine the current running version and are read-
only.
Numbered Parameters Reference
A numbered parameter is recognized by the pound symbol (#)
followed by an integer between 1 and 5399. The parameter is
referred to by this integer, and its value is whatever number is
stored in the parameter. A value is stored in a parameter with
the (=) operator.
Example: #3 = 15 (set parameter 3 to 15)
A parameter setting does not take effect until after all
parameter values on the same line have been found. For
example, if parameter 3 has been previously set to 15 and the
line: #3=6 G01 X#3 is interpreted, a straight move to a point
where X = 15 occurs before the value of parameter 3 is set to
6.
The # symbol takes precedence over other operations. For
example, #1+2 means the number found by adding 2 to the
value of parameter 1, not the value found in parameter 3. Of
course, #[1+2] does mean the value found in parameter 3.
The # character may be repeated; for example ##2 means the
value of parameter whose index is the (integer) value of
parameter 2. PathPilot maintains a number of read-only
parameters. Only parameters for the relevant axes are
maintained: (X Y Z A) for mill and (X Z) for mill. The remaining
parameters for unused axes are undefined.
Read-Only Parameters
l 1-30: Subroutine local parameters of call arguments.
These parameters are local to the subroutine. For further
information, see Programming with Subroutines later in
this chapter
l 31-5000: G-code operator parameters. These
parameters are global in G-code file
l 5061-5070: Result of G38.2 probe (X Y Z A B C U V W)
l 5161-5169: G28 home for (X Y Z A B C U V W)
l 5181-5189: G30 home for (X Y Z A B C U V W)
l 5210: 1 if G92 offsets are active, 0 if not
l 5211-5219: G92 offset (X Y Z A B C U V W)
l 5220: Current coordinate system number 1-9 for G54 -
G59.3
l 5221-5230: Coordinate System 1, G54 (X Y Z A B C U V W
R) R denotes XY rotation angle around Z-axis
l 5241-5250: Coordinate System 2, G55 (X Y Z A B C U V W
R)
©Tormach® 2020
Specifications subject to change without notice.
Page 190 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