
4. CONVERSATIONAL MACRO FUNCTION
B–62073E–2/03
112
For address P/B/S/C specification, see the description of G330
(opening a line).
Note that read control (101/102/ . . .) must be specified in address P,
and ISO(0) must be specified in address C.
Select address L, F, or A according to the desired processing.
(i) Searching for a file by file name
By specifying the first variable number of a variable string
containing a file name with address L, the desired file can be
searched for by file name.
A file name is to be set by using ASCII codes converted to
decimal in a string of 17 variables beforehand, and the first
variable number is to be specified with address L.
Example: Searching for a file named ABCD
In 17 variables from #100 to #116, set 65 (A), 66 (B), 67 (C),
68 (D), 32, . . . , 32 (space).
G330 P101 B10 S12 C0 L100 ;
Notes
1 A file name must always be 17 characters long. A file name
shorter than 17 characters must be padded on the right with
spaces (32) to make a name 17 characters long.
2 A file name must consist of alphanumeric characters and
spaces. However, completion code 20 is returned if a file
name starts with a space code (32).
(ii) Searching for a file by file number
By specifying the file number (1 to 9999) of a desired file
with address F, the file can be searched for by file number.
Example: Searching for a file with file number 3
G330 P101 B10 S12 C0 F3 ;
(iii)Searching for the next file
By specifying address A, the file immediately following the
file that is currently searched for can be found. This function
can be used to read files in succession.
Always specify A1 for address L. Otherwise, completion
code 20 is returned.
Example: Searching for the file next to the file currently
searched for
G330 P101 B10 S12 C0 A1 ;
2) File creation and data write (G330)
G330 Pp Bb Ss Cc (Ll/Ff);
By specifying address L or F when opening a line in the transmission
control mode, a new file can be created on the FANUC Cassette so
that data can be written to the file.
For address P/B/S/C specification, see the description of G330
(opening a line).
Note that read control (201/202/ . . . ) must be specified in address P,
and ISO(0) must be specified in address C.
Select address L or F according to the desired processing.
(i) Creating a file by file name
By specifying the first variable number of a variable string
containing a file name with address L, a new file can be
created under the specified name on the FANUC Cassette so
that data can be written to the file.
A file name is to be set by using ASCII codes converted to
decimal in a string of 17 variables beforehand, and the first
variable number is to be specified with address L.