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

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

Advertisement

4.2.2 Receive_Binary

Description:
This function is used to receive binary data from the serial port with the
fixed length.
Syntax:
long
Receive_Binary
Input Parameter:
cPort:
szResult:
wTimeOut:
wLen:
*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];
int
m_length=10;
WORD m_TimeOut=100;
WORD m_wlength=10;
WORD m_wT;
long
RET;
RET =Open_Com(m_ComPort, m_baudrate, m_databit, m_parity, m_stopbit);
http://www.icpdas.com
[C
(unsigned char
wTimeOut, WORD wLen, WORD *wT)
[Input] 1=COM1, 2=COM2 .... , MAXPORT
[Output] The receiving binary data from the module
[Input] Communicating timeout setting in ms Unit
[Input] The length of result binary data.
[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
90 

Advertisement

Table of Contents
loading

Table of Contents