SmartWAV2-SerialMode_R1

SMARTWAV 2
Serial Mode
Vizic Technologies ©2020 | 107
9.7 Truncate File - 0x46, 0x56hex - ‘F, ‘V’ ascii
Commands (host)
byte(s)
1.- 0x46 (hex), F (ascii). *FAT command.
2.- 0x56 (hex), V (ascii). *Truncate 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
The Truncate File command cuts all data
bytes up from the current File Pointer Position
of the file in the received workspace#.
Once this command is acknowledged, the
current File Pointer Position will now be the
last data byte of the file, therefore this
command reduces the total file size.
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,56,02- Truncate file data bytes / contents
up from the current file pointer position of
workspace# 2.
Received data:
-00,4F- OK, OK. File in workspace# 2 size was
reduced to the current filer pointer position
bytes.
*All data is in hex.