384
MACROS
96-8000
June 1999
As the control interprets a program, the variable changes are displayed on the variable display page and results
can be viewed.
Pages contain up to 32 variables and the display can be paged by pressing the left/right arrow keys.
Setting of a variable is accomplished by entering a value and then pressing the WRITE key. The variable that is
highlighted on the screen is the variable that is affected.
Searching for a variable can be done by entering the variable number and pressing the up/down arrow. The page
will change to the one that contains that variable and the entered variable will become the highlighted item.
The variables displayed represent the values of the variables at program interpretation time. At times, this may
be up to 15 blocks ahead of the actual machine activity. Debugging of programs can be made easier by
inserting a G103 at the beginning of a program to limit block buffering and then removing the G103 block after
debugging is completed.
Editing
For the most part, the editing of macro programs from the control is the same as before. There are a few
peculiarities to be aware of.
Editing macro statements is more open than previously. For instance, it is possible to place a floating point
constant within a standard G-code block, but it doesnîš’t make much sense, and the control will raise an alarm
at runtime. For all instances of improperly structured or improperly placed macro statements, the control will
raise an appropriate alarm. Most of these alarms have been put off until runtime so that operator editing can be
more flexible. Be careful when editing expressions. Brackets must be balanced and you will not receive an
alarm until runtime.
The DPRNT[ ] function can be edited much like a comment. You can delete it or move it as a whole item, or
you can edit individual items within the brackets. Variable references and format expressions must be altered
as a whole entity. If you wanted to change [24] to [44], place the cursor so that [24] is highlighted, enter [44]
and press the write key. Remember, you can use the crank handle to maneuver through long
DPRNT[ ] expressions.
Addresses with expressions can be somewhat confusing. In this case, the alphabetic address stands alone.
For instance, the following block contains an address expression in X:
G1 G90 X [ COS[ 90 ] ] Y3.0 (CORRECT) ;
Here, the X and brackets stand alone and are individually editable items. It is possible, through editing, to
delete the entire expression and replace it with a floating point constant.
G1 G90 X 0 Y3.0 (!!! WRONG !!!) ;