Receive_str, Send_receive_str – Measurement Computing CB-NAP-7000P User Manual
Page 31
27
6.7 Receive_Str
Description:
This DLL will receive a re sult string from a general purpose RS-232 device. This DLL is very similar to
Receive_Cmd except that this DLL will not check result string terminator, 0x0d.
z Syntax:
WORD Receive_Str(char cPort, char szReceive[], WORD wTimeOut, WORD wLenR)
z Input Parameter:
cPort: 1=COM1, 2=COM2, 3=COM3, 4=COM4, others = invalidate
szReceive: the starting address of the original command string (terminated with 0)
wTimeOut: constant for time-out control, unit = 1ms
wLenR: string length of receive-string
z Return Value:
NoError : OK
others = Error code, refer to 7000W31.H
6.8 Send_Receive_Str
Description:
This DLL will send a command to a general purpose RS-232 device and receive the response string. This DLL will
call Send_Cmd first. Then call Receive_Cmd next.
z Syntax:
WORD Send_Str(char cPort, char szCmd[], char szResult, WORD wTimeOut, WORD wLenT, WORD wLenR)
z Input Parameter:
cPort: 1=COM1, 2=COM2, 3=COM3, 4=COM4, others = invalidate
szCmd: the starting address of the original command string (terminated with 0)
szResult: the starting address of the result string (terminated with 0)
wTimeOut: constant for time-out control, unit = 1ms
wLenT: string length of send-string
wLenR: string length of receive-string
z Return Value:
NoError : OK
others = Error code, refer to 7000W31.H