240
12 FILE CONTROL
12.6 File Modification
Read file (command: 1828)
Read the content of a file.
Use the open/close command in order to prohibit access from other devices when this command is used.
Message format
The following shows the message format of the request data and response data of the command.
■Request data
■Response data
The data which have been read is stored.
Data specified by request data
■Command
■Sub command
■File pointer No.
Specify the file pointer No. obtained with the 'open file' (command: 1827). (Page 208 File pointer No.)
■Offset address
Specify the start address to start reading. (Page 208 Offset address)
■Number of bytes read
Specify the number of bytes to be read from file in the range of 0 to 1920. (Page 209 Number of bytes)
Specify it as one address/one byte.
When the file size is 1921 bytes or more, use an offset address and read data divide into multiple steps. The
file size can be checked by reading directory/file information (command: 1810).
Page 211 Read directory/file information (command: 1810)
Data stored in response data
■Number of bytes read
The number of data bytes read from file is stored. (Page 209 Number of bytes)
■Read data
The contents of the read file are stored.
ASCII code Binary code
ASCII code Binary code
Command Subcommand File pointer No. Offset address
Number of
bytes read
Number of
bytes read
Read data