Send_Receive_Cmd - ICP DAS USA MP-8 43 Series Function Reference

Hide thumbs Also See for MP-8 43 Series:
Table of Contents

Advertisement

4.3.3 Send_Receive_Cmd

Description:
This function sends a command string to RS485 Network and receives the
response from RS485 Network. If the wCheckSum =1, this function
automatically adds the two checksum bytes into the command string and also
check the checksum status when receiving response from the modules. Note
that the end of sending string is added [0x0D] to mean the termination of every
command. This Send_Receive_Cmd is not a multi-task DLL.
Syntax:
long
Send_Receive_Cmd
szResult[], WORD wTimeOut, WORD wCheckSum, WORD *wT,
WORD wSTimeOut=0)
Parameter:
cPort:
szCmd:
szResult:
wTimeOut:
wCheckSum:
*wT:
performance.
[wSTimeOut]:
http://www.icpdas.com
[C
(unsigned char
[Input] 1=COM1, 2=COM2 .... , MAXPORT
[Input] 1023(no check sum, 1021 with check sum) Bytes
maximum, without zero (0x0D) terminal character.
[Input] 1023(no check sum, 1021 with check sum) Bytes
maximum, with one zero or 0x0D terminal character.
[Input] Communicating timeout setting, time in ms Unit
[Input]
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
[Output] return a reference number for identify the
*wT --> 0 :good
Optional
[Input] for the sending timeout in ms Unit.
Before use this, you must enable the flow control first.
MP-8x43 Function Reference V 1.0
++
]
cPort,
char
szCmd[],
char
98 

Advertisement

Table of Contents
loading

Table of Contents