B-63324EN/03 PROGRAMMING 17.CUSTOM MACRO
- 581 -
- Common variable #100 - #199, #500 - #999
Just as a local variable is used locally in the macro, a common variable
is in common use throughout the main program, throughout each
subprogram called from the main program, and throughout each macro.
That is, #i used in a certain macro is the same as #i used in another
macro. Accordingly, the calculated value of a common variable #i in a
certain macro can be used in another macro. The common variables
basically have the read/write attribute. However, the common variable
of a variable number specified by a parameter (No. 7036 to 7039) can
be protected (for read-only). The application of common variables is
not specified by the system, but can be specified as necessary by the
user. The user can choose any of the common variables described
(a) 600 common variables (usable only with the custom macro options)
Common variables 100 to 199 and 500 to 599 can be used.
When the power is turned off, common variables 100 to 199 are
cleared, but common variables 500 to 599 are retained.
(b) 900 common variables (usable with the custom macro options and
900 common variable options)
Common variables #100 to #199, #200 to #499, and #500 to #999
can be used. The values of #100 to #199 are cleared when the
power is turned off. The values of #200 to #499 and #500 to #999
are held even when the power is turned off.
- System Variables
The applications of the system variables are determined by the system.
Each system variable has one of three attributes : read-only, write-only,
- System Constants
System constants can be referenced in the same way as variables.
System constants have the read-only attribute.
- Omission of the decimal point
When a variable value is defined in a program, the decimal point can be
When #1=123;is defined,the actual value of variable #1 is 123.000.
- Referencing variables
A number following an address can be replaced with a variable. When
<address>#i or <address>-#i is programmed, the value of the variable
or the complement of the value of the variable is used as the specified
value of the address.
[Example]F#33:When #33 = 1.5, this is equivalent to specifying F1.5.
Z-#18 : When #18 = 20.0, this is equivalent to specifying
G#130 : When #130 = 3.0, this is equivalent to specifying
Variables cannot be referenced by address/, : , O and N.
[Example] O#27 and N#1 cannot be programmed.