91
96-8000 Rev AC
May 2010
Programming
;
;
#1101=0
Round Off
The control stores decimal numbers as binary values. As a result, numbers
stored in variables can be off by 1 least significant digit. For example, the num
-
ber 7 stored in macro variable #100 may later be read as 7.000001, 7.000000,
or 6.999999. If the statement was, “IF [#100 EQ 7]…”, it may give a false read
-
ing. A safer way of programming this would be, “IF [ROUND [#100] EQ 7]…”.
This issue is usually only a problem when storing integers in macro variables
where it is expected to see a fractional part later.
o
Peration
n
oteS
Macro variables can be saved or loaded through the RS-232 or the optional
floppy drive DNC, much like settings, and offsets.
Variable Display Page
The macro variables are displayed and can be modified through the current
commands display. To get to the pages, press CURNT COMDS and use the
page up/down key.
As the control interprets a program, the variable changes are displayed on the
variable display page and results can be viewed.
The macro variable is set by entering a value and then pressing the Write/Enter
button. Macro variables can be cleared by pressing the Origin key, which will
clear all variables.
Entering the macro variable number and pressing the up/down arrow will
search for that variable.
The variables displayed represent values of the variables during running of the
program. At times, this may be up to 15 blocks ahead of actual machine ac
-
tions. Debugging programs is easier when inserting a G103 at the beginning of
a program to limit block buffering and then removing the G103 after debugging
is completed.
Macro Arguments
The arguments in a G65 statement are a means of sending values to and set
-
ting the local variables of a macro subroutine.
In the previous example 2, the arguments (values of) X and Y are passed to
the macro subroutine local variables. Local variable #24 is associated with X
and is set to 0.5. Similarly, Local variable #25 is associated with Y and is set to
Summary of Contents for 96-8000
Page 15: ...6 96 8000 Rev AC May 2010 Mill Warning Decals ...
Page 16: ...7 96 8000 Rev AC May 2010 Safety Lathe Warning Decals ...
Page 41: ...32 96 8000 Rev AC May 2010 ...
Page 93: ...84 96 8000 Rev AC May 2010 ...
Page 129: ...120 96 8000 Rev AC May 2010 ...
Page 133: ...124 96 8000 Rev AC May 2010 ...
Page 268: ......
Page 269: ......