PT630 Programming Reference Guide
Page 65 of 59
------------------------------------------------------------------------------------------------------------------
2.4.4
Communication Configuration ( ESC C )
Format:
⇒
STX ESC ‘C’ <comtable> CS1 CS2 ADDR
⇐
STX ESC ‘C ‘ <retcode> CS1 CS2 ETX
;<retcode>= 00H successful
; 01H error
⇒
ACK or NAK
Description: The command writes <comtable> to PT630 communication control table.
<comtable> is defined as:
typedef strut {
char
baud_rate; //
‘0’~’9’/‘A’:
110/150/300/600/1200/2400
//
4800/9600/
9200/38400/57600
char
stop_bit,
//
‘1’/’2’:
1/2
stop
bits
char
data_bit
//
‘7’/’8’:
7/8
data
bits
char
parity;
//
‘N’/’O’/’P’:
None/Odd
/Even
parity
char flow_control; // ‘X’/’C’/’F’: XON XOFF/RTS CTS/NONE
char
protocol;
//
‘M’/’F’
MULTIPOINT/None
char
address
//
‘A’~’Y’
or
‘0’~’6’
char
reserved;
char
reserved;
char
timeout
; //
communication
time-out
}
comtable;
The new communication control table takes effect immediately after the command has been
successfully received. The PT630 will reinitialize the corresponding communication port with its
new parameters. For
Example
, if the command instructs the RS-232 port to change the baud rate
from 9600 to 1200 the PT630 will switch to 1200 right after the command has been received. The
next host communication will use 1200 baud rate.
2.4.5
Get File Directory in RAM Disk ( ESC D )
Format:
⇒
STX ESC ‘D’ CS1 CS2 ADDR
⇐
STX ESC ‘D’ <filename,filename…> CS1 CS2 ETX
⇒
ACK or NAK
if
If
the
last
character
of
<filename,filename…>
is it mean directory list is too big
for single packet. Please issue ESC D command again
⇒
STX ESC ‘D’ CS1 CS2 ADDR
⇐
STX ESC ‘D’ <filename,filename…> CS1 CS2 ETX
⇒
ACK or NAK
Description: PT630 will send its file directory to the host.