
Programmable Serial-to-Ethernet Device Server
PDS Series User Manual, Version 2.5, Mar. 2019
-
141 -
7.3.3
Send_Receive_Cmd()
This function sends a DCON command string and receives the response.
Syntax:
Send_Receive_Cmd
(unsigned char
cPort
, char
szCmd[ ]
, char
szResult[ ]
, WORD
wTimeOut
,
WORD
wChksum
, WORD
*wT
);
Parameters:
cPort
COM Port number (1 ~ 255)
szCmd[ ]
The send string, 1024 bytes maximum, without a zero (0x0D) character
szResult[ ]
The result string recevied, 1024 bytes maximum, with one zero or 0x0D
terminal character
wTimeOut
Timeout for receiving the result string.
Unit: ms
wChksum
0
: add one 0x0D byte to the end of the szCmd
<>0
: add two check sum bytes and one 0x0D byte to the end of the
szCmd
*wT
Return a reference number to identify the performance
Returns:
0
No error
Others
Error codes