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.2 Receive_Cmd

Description:
User can utilize this function to obtain the response string from the
modules in RS-485 Network. And this function provides a response string
without the last byte [0x0D].
Syntax:
long
Receive_Cmd
Parameter:
Cport::
szResult:
wTimeOut::
wCheckSum:
*wT:
Return Value:
NoError :
Others :
Example:
unsigned char
m_ComPort=3;
DWORD m_baudrate=9600;
char
m_databit=8;
char
m_parity=0;
char
m_stopbit=0;
char
m_szSend[100];
char
m_szReceive[100];
WORD m_TimeOut=100;
WORD m_Checksum=0;
WORD m_wT;
long
RET;
RET=Open_Com(m_ComPort, m_baudrate, m_databit, m_parity, m_stopbit);
memset(m_szSend, '\n', sizeof(m_szSend));
http://www.icpdas.com
[C
(unsigned char
WORD wChksum, WORD *wT)
[Input] 1=COM1, 2=COM2 .... , MAXPORT
[Output] Receiving the response string from the modules
[Input] Communicating timeout setting, time in ms Unit
[Input] 0=DISABLE, 1=ENABLE
[Output] Total time of receiving interval in ms Unit.
OK
Error code, please refer to "Appendix A Error Code".
//Com_port of PAC
MP-8x43 Function Reference V 1.0
++
]
cPort,
char
szResult[], WORD wTimeOut,
96 

Advertisement

Table of Contents
loading

Table of Contents