Download User Manual - ICP DAS USA`s I

Transcript
7.3.3

Send_Receive_Cmd ()
Description:
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
Return:
0  no error
Others  error codes
Programmable Device Server User Manual (V2.0, Feb. 2013)
- 111 -