PT630 Programming Reference Guide
Page 63 of 59
------------------------------------------------------------------------------------------------------------------
2.3.2 Host Send File to PT630 ( Download ) from specified file position
⇒
STX ESC ‘L’
<filename>
[offset] CS1 CS2 ADDR
⇐
ACK or NAK
; if NAK, retry or abort the command
⇒
STX ESC ‘Y’ <data> CS1 CS2 ADDR ; if ACK, loops until file is transmitted
⇐
ACK or NAK
; if NAK, send the packet again
⇒
STX ESC ‘Z’ CS1 CS2 ADDR
; end of file transfer
⇐
ACK or NAK
Note :
[offset]
mean file’s starting pointer.
[offset]
E.x. [1000] mean to start download specified
file from 1000st bytes.
2.3.3 Cancel Current Downloading File Command (ESC z)
Format:
⇒
STX ESC ‘z’ CS1 CS2 ADDR
⇐
ACK or NAK
2.3.4 Host Requests File from the PT630 ( Upload )
Format:
⇒
STX ESC ‘U’ <filename> CS1 CS2 ADDR
⇐
ACK or NAK
; if NAK, retry or abort
⇒
STX ESC ‘Y’ CS1 CS2 ADDR
; loops until ESC ‘Z’ is
⇐
STX ESC ‘Y’ <data> CS1 CS2 ETX ; received
⇒
ACK or NAK
⇐
STX ESC ‘Z’ CS1 CS2 ETX
; end of file transfer
⇒
ACK or NAK
Description: For uploading, the host must know the filename on PT630. Get Directory
Command (ESC ‘D’) can be used to view all filenames on PT630 (see 4.4 Host Commands).
2.3.5 Host Requests File from the PT630 ( Upload ) from specified file positon
Format:
⇒
STX ESC ‘U’
<filename>
[offset] CS1 CS2 ADDR
⇐
ACK or NAK
; if NAK, retry or abort
⇒
STX ESC ‘Y’ CS1 CS2 ADDR
; loops until ESC ‘Z’ is
⇐
STX ESC ‘Y’ <data> CS1 CS2 ETX ; received
⇒
ACK or NAK
⇐
STX ESC ‘Z’ CS1 CS2 ETX
; end of file transfer
⇒
ACK or NAK
Note :
[offset]
mean file’s starting pointer.
[offset]
E.x. [1000] mean to start download
specified file from 1000st bytes.
Description: For uploading, the host must know the filename on PT630. Get Directory
Command (ESC ‘D’) can be used to view all filenames on PT630 (see 4.4 Host Commands).
2.3.6 Cancel Current Uploading File Command (ESC y)
Format:
⇒
STX ESC ‘y’ CS1 CS2 ADDR
⇐
ACK or NAK