EasyManua.ls Logo

Tormach PCNC 440 - 7.7.2.2 Subroutine Parameters; 7.7.2.3 Named Parameters; 7.7.3 Expressions; 7.7.3.1 Binary Operators

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
145
UM10372_PCNC440_Manual_0221A
PROgRAMMiNg
7.7.2.2 Subroutine Parameters
Subroune parameters are specically reserved for call arguments. By denion, these are
parameters #1-#30 and are local to the subroune.
7.7.2.3 Named Parameters
Named parameters work like numbered parameters but are easier to read and remember. All
parameter names are converted to lowercase and have spaces and tabs removed. Named parameters
must be enclosed with < > marks.
#<named parameter here> is a local named parameter. By default, a named parameter is local to
the scope in which it is assigned.
You can’t access a local parameter outside of its subroune. This is so two subrounes can use the
same parameter names without fear of one subroune overwring the values in another.
#<_global named parameter here> (i.e., name starng with an underscore) is a global named
parameter. They are accessible from within called subrounes and may set values within subrounes
that are accessible to the caller. As far as scope is concerned, they act just like regular numeric
parameters. They are not made persistent by storage in a le.
Examples:
Declaration of named global variable
#<_endmill_dia> = 0.049
Reference to previously declared global variable
#<_endmill_rad> = [#<_endmill_dia>/2.0]
NOTE: The global parameters _a, _b, _c, . . . _z are reserved for special use. Do not use these parameters.
Mixed Literal and Named Parameters
o100 call [0.0] [0.0] [#<_inside_cutout>-#<_endmill_dia>] [#<_Zcut>] [#<_
feedrate>]
7.7.3 Expressions
An expression is a set of characters starng with a le bracket ([) and ending with a balancing
right bracket (]). Located between the brackets are numbers, parameter values, binary operators,
funcons, and other expressions. An expression is evaluated to produce a number. An example of
an expression is:
[1 + acos[0] - [#3 ** [4.0/2]]]
All expressions on a line are evaluated when the line is read and before anything on the line is executed.
7.7.3.1 Binary Operators
Binary operators only appear inside expressions. There are three types of binary operators:
mathemacal, logical, and relaonal.

Table of Contents

Other manuals for Tormach PCNC 440