Download Sect 18-Macros - Flint Machine Tools, Inc.

Transcript
Fadal
User Manual
EXAMPLE:
N3245 G0 G90 G49 Z0
N3246 E0 X0 Y0
N3247 #START 7 This calls a jump to program O7
WAIT
This command temporarily pauses processing of the program lines at the line
with the WAIT command. Processing will continue when the execution buffer is
completely exhausted. This might be used to Print out a message when the
program is completely finished. The control will print out through the RS-232
port during the preprocess period unless the WAIT command is used. The
WAIT command is also used to have the machine absolutely stationary before
printing out the current location of the machine using the axis variables.
EXAMPLE:
N256 G1 G31 Z-30. F1.
N257 # WAIT
N258 # SPRINT “POINT #”,V5,": X",AX," Y",AY
In line N257 the control will stop processing the program and wait for the
execution buffer to be exhausted before executing line N258 which would print
out the current location of the machine.
Note: The execution buffer is a part of memory used by the control to store
processed program data. When the control “looks ahead”, this processed
data is stored in the execution buffer. Using the SETP command allows the
programmer to vary the size of the buffer. On the machine parameter page
the term “Binary buffer” is used for the execution buffer.
AND, OR, and NOT
AND, OR, and NOT are logical operators that allow the programmer to
construct compound tests from one or more expressions. In BASIC, a
compound Boolean expression is created by connecting two Boolean
expressions with a “logical operator”. The FADAL macro language allows
“logical operators”. The number of logical operators in a statement is limited
by the maximum number of characters allowed on a single line, 63. This
includes all spaces and the pound sign (#).
A good rule for writing compound expressions is to always verify that the
statement will evaluate to both a TRUE and a FALSE condition. The items being
compared must be segregated with parentheses to avoid confusion in lengthy
or complex statements. This will also ensure that the statement’s components
are evaluated in the order that the programmer intended.
EXAMPLE:
Example 1:
AND
April 2003
Section 18: Macros
423