
6. FUNCTIONS OF THE MACRO
EXECUTOR
B–61803E–1/10
PROGRAMMING
88
NOTE
1
The length of string for a file name is fixed to 12 characters. If a
file name is shorter than 12 characters, be sure to fill the remaining
spaces with code 32 (space).
2 Specify a file name and extension with alphanumerics. If code 32
(space) is specified at the head of the file name, end code 122 is
returned.
3 In the write control mode, address F (file number) cannot be
specified.
G331;
This command terminates memory card control.
The memory card close processing always terminates normally. (End
code= 0)
G335 Pp;
Address P specifies the number of the variable to store data.
One–byte data of a memory card is read into the variable area specified
by address P. The data is read from the beginning of a file on a memory
card in bytes. To read data in bytes, open the memory card in the read
control mode (P14).
(Example)
G330 P14 F500 ; Opened in the read control mode
N100 G335 P100 ; Read into #100
IF [#8539 NE 0] GOTO200 ; End of reading
(#100 : Read data)
G331 ; Memory card closed
GOTO300;
N200 IF [#8539 EQ 255]
GOTO100 ; Error
N300 Next processing
G336 Data to be written Ff Zz Dd Pp Kk ;
(1) (2) (3) (4) (5)
The data to be written can be specified in either of the following ways:
(c...) –––> String command 1
(*hh.. *) –––> String command 2
(1) Address F specifies the numeric output format.
(2) Address Z specifies whether macro variable data is zero–suppressed.
Z = 0: Leading zeros are not suppressed.
Z = 1: Leading zeros are suppressed.
6.5.2.2
Closing a Memory Card
(G331)
6.5.2.3
Reading Bytes (G335)
6.5.2.4
Writing Data (G336)