SmartWAV2-SerialMode_R1
SMARTWAV 2
Serial Mode
Vizic Technologies ©2020 | 100
9.3 Write File - 0x46, 0x57hex - ‘F, ‘W’ ascii
Commands (host)
byte(s)
1.- 0x46 (hex), F (ascii). *FAT command.
2.- 0x57 (hex), W (ascii). *Write File.
3.- Workspace 0x00 to 0x0D (hex) 0-13 (ascii).
4.- Number of Bytes to Write - High Byte.
5.- Number of Bytes to Write - Low Byte.
6 to Bytes to Write .- Data Bytes to Write.
*Number of bytes to write parameter could be any
value from 1 up to 512 bytes per command call.
Responses (device)
byte(s)
1.- Successfully Written Bytes - High Byte.
2.- Successfully Written Bytes - Low Byte.
3.- 0xXX - FAT ACK/NAK List Byte Reply.
4.- 0x4F (hex), O (ascii) - Success ACK or
0x46 (hex), F (ascii) - Fail NAK.
Description
The Write File command writes the requested
number of Bytes to Write data to the file
open / allocated in the received
workspace#, the file must be open with
“Write Only” or “Read+Write” access mode
for this command to succeed.
The returned parameter Successfully Written
Bytes must always be considered as those
are actually the correctly written bytes to the
file data.
The current File Pointer value will be
increased by the number of Successfully
Written bytes from the last pointer position.