SmartWAV2-SerialMode_R1

SMARTWAV 2
Serial Mode
Vizic Technologies ©2020 | 106
9.6 Save File - 0x46, 0x53hex - ‘F, ‘S’ ascii
Commands (host)
byte(s)
1.- 0x46 (hex), F (ascii). *FAT command.
2.- 0x53 (hex), S (ascii). *Save File.
3.- Workspace 0x00 to 0x0D (hex) 0-13 (ascii).
Responses (device)
byte(s)
1.- 0xXX - FAT ACK/NAK List Byte Reply
2.- 0x4F (hex), O (ascii) - Success ACK or
0x46 (hex), F (ascii) - Fail NAK.
Description
This command sync/saves any changes of
the file in the received workspace#. The
changes to save are normally written or
truncated data bytes to the file, this
command is suitable for applications that
require to have opened files for a long time
in “Write Only” or “Read+Write” modes, such
as long-time data loggers.
Performing sync / save file periodically or
immediately after a “Write File” command
can minimize the risk of data loss due to a
sudden blackout or an unintentional disk
removal. A file must be already
opened/allocated in the selected
workspace for this command to work.
Examples (sent and
received commands)
Example 1:
Sent data:
-46,53,02- Save changes to file in
workspace# 2.
Received data:
-00,4F- OK, OK. Changes made to file in
workspace# 2 are saved.
*All data is in hex.