Send_receive_cmd, Send_str – Measurement Computing CB-NAP-7000P User Manual
Page 30

26
6.5 Send_Receive_Cmd
Description:
This DLL will send a command stri ng to CB-7000 then receive the result string from I 7000. This DLL will call
Send_Cmd first. Then call Receive_Cmd next.
z Syntax:
WORD Send_Receive_Cmd(char cPort, char szCmd[], char szResult, WORD wTimeOut, WORD wCheckSum)
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
wCheckSum: 0=DISABLE, 1=ENABLE
z Return Value:
NoError : OK
others = Error code, refer to 7000W31.H
6.6 Send_Str
Description:
This DLL will send a command to a general purpose RS-232 device. This DLL is very sim ilar to Send_Cmd except
that this DLL will not add any char to the input string.
z Syntax:
WORD Send_Str(char cPort, char szCmd[], WORD wTimeOut, WORD wLenT)
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)
wTimeOut: constant for time-out control, unit = 1ms
wLenT: string length of send-string
z Return Value:
NoError : OK
others = Error code, refer to 7000W31.H