SmartWAV2-SerialMode_R1
SMARTWAV 2
Serial Mode
Vizic Technologies ©2020 | 97
9.2 Read File - 0x46, 0x52hex - ‘F, ‘R’ ascii
Commands (host)
byte(s)
1.- 0x46 (hex), F (ascii). *FAT command.
2.- 0x52 (hex), R (ascii). *Read File.
3.- Workspace 0x00 to 0x0D (hex) 0-13 (ascii).
4.- Number of Bytes to Read - High Byte.
5.- Number of Bytes to Read - Low Byte.
*Number of bytes to read parameter could be any
value from 1 up to 512 bytes per command call.
Responses (device)
byte(s)
1 to Bytes to Read.-
File Requested to Read Data Bytes.
Bytes to Read + 1.-
Successfully Read Bytes - High Byte.
Bytes to Read + 2.-
Successfully Read Bytes - Low Byte.
Bytes to Read + 3.-
0xXX - FAT ACK/NAK List Byte Reply.
Bytes to Read + 4.-
0x4F (hex), O (ascii) - Success ACK or
0x46 (hex), F (ascii) - Fail NAK.
Description
The Read File command reads the
requested number of Bytes to Read data
from the file open / allocated in the received
workspace#, the file must be open with
“Read Only” or “Read+Write” access mode
for this command to succeed.
The returned parameter Successfully Read
Bytes must always be considered; the
processor always replies (In bytes) the
requested number of Bytes to Read,
however 2 cases could happen: