
B–61803E–1/10
6. FUNCTIONS OF THE MACRO
EXECUTOR
PROGRAMMING
89
If Z is set to 0, no sign is displayed. (By default, a modal value
is used.)
(3) Address D specifies the numeric data to be output.
(4) Address P specifies the number of a block in the program specified
by #8509.
(5) Address K specifies a space code.
(Example)
G330 P24 F500 ; Opened in the write control mode
G336 K20 (FANUC) K20 ; Data write control
IF [#8539 NE 0] GOTO200 ; End of writing
G331 ; Memory card closed
GOTO 300
N200 Error ;
N300 Next processing ;
This command causes the following data to be written on the memory
card:
K20 –––> Space code 20 (feed)
(FANUC) –––> ”FANUC” (ASCII)
K20 –––> Space code 20 (feed)
To write data, open the card in the write control mode (P24).
This command reads and analyzes macro variable data input from a
memory card opened in the read control mode and sets the data in
appropriate variables.
G337 Pp (Qq) (R99) ;
(1) (2) (3)
(1) Address P specifies the head variable number of the variable string
to store the data. (optional)
(2) Address Q specifies the number of variables to be read.
When the data of variables specified in address Q is input, end code
99 is returned to notice that further reading can be performed. If %
(EOR) is read before all of the specified variables are read, normal
termination is notified. If address Q is omitted, the maximum number
is assumed.
(3) If R99 is specified, subsequent variable data can be read when an end
code is returned to notice that a specified number of variables are read.
If R99 of continuous reading is not specified, the data of a single
variable in the middle will be erased by a significant information
check (discarding data read before the first ;LF).
(Example)
G300 P14 L… ;
G337 P100 Q10 ; =>Data of first ten variables is
IF [#8539 NE 99] GOTO888 ; read into #100 to #109.
(If the data is normally read,
#8539is set to 99.)
G337 P15000 Q20 R99 ; =>Data of 20 variables is read
into #15000 to #15019.
(If the data is normally read,
#8539 is set to 99.)
6.5.2.5
Inputting Macro Variable
Data (G337)