181
11-2-9 SINGLE FILE WRITE
Writes a new file to the file device connected to the PC Card Unit or appends/
overwrites an existing file stored in the file device. Designation can be made to
protect existing files if an attempt is made to create a new file of the same name
as an existing file.
Note Do not create any files on the memory card that begin with “TMP...”. The system
uses this prefix.
Command Block
Disk no.
Command
code
Data length
File offset
File name
Parameter
File data
12 bytes
? byte
Parameters
Disk no. (command): Specify the file device to which to write (in the PC Card
Unit) as follows:
G drive (slot 1): $0006 H drive (slot 2): $0007
Parameter (command): As follows:
0000: Writes a new file. If a file with the same name already exists, the new
file will not be created.
0001: Writes a new file. If a file with the same name already exists, it will be
overwritten.
0002: Appends data to an existing file. (Appended to the end of the file.)
0003: Overwrites an existing file.
File name (command): The name of the file to be written (in capital letters).
Set as: File name of up to eight l 3-letter extension. One-byte
alphanumeric code is used. When there are not enough letters to fill all 12 bytes,
fill the remaining bytes with spaces ($20).
File offset (command): The number of bytes from the start of the file from which
to start writing (files start at 00000000). To create a new file or append data to an
existing file, specify 00000000 as the file offset.
Data length (command): The number of bytes to be written.
File data (command): The data to be written to the file. The data is written in
sequence from the file offset through the specified data length.
Response Block
Response
code
Command
code
Note
1. If the data length is set to 0000 when creating a new file, a file with capacity of
0 (no data) will be created.
2. If the data length is set to 0000 when overwriting an existing file, the com-
mand will check whether there is any data at the file offset.
3. When the data exceeds the file device’s remaining capacity SINGLE FILE
WRITE cannot be executed. In this case the contents of the existing file will
be left unchanged.
4. When a SINGLE FILE WRITE is executed, the PC Card Unit’s time data will
be used to record the time and date of the file.
Response code
Refer to Appendix E FINS Response Codes from the PC Card Unit.
PC Card Unit Commands and Responses
Section 11-2
Summary of Contents for SYSMAC C200HW-PCS01-EV1
Page 1: ...Cat No W313 E1 3 PC Card Unit SYSMAC C200HW PCU01 C200HW PCS01 EV1 OPERATION MANUAL...
Page 2: ......
Page 3: ...SYSMAC C200HW PCU01 C200HW PCS01 EV1 PC Card Unit Operation Manual Revised January 2000...
Page 4: ......
Page 6: ......
Page 10: ......
Page 12: ......
Page 18: ......
Page 34: ......
Page 38: ......
Page 60: ......
Page 80: ......
Page 82: ......
Page 88: ......
Page 120: ......
Page 148: ......
Page 178: ......
Page 214: ......
Page 220: ......
Page 232: ......
Page 234: ......
Page 236: ......
Page 238: ......
Page 240: ......