Omega Engineering OMB-NETSCAN 1500 User Manual page 196

Ethernet/internet-based data logging & control instrument
Table of Contents

Advertisement

nSerialSend
Function: int nSERIALSend (long session, short port, unsigned short flush, long timeout,
short terminator, short length, char FAR *data, short FAR *xlength, unsigned short
FAR *status);
Parameters:
Long
Short
Unsigned short
long
Short
Short
Char FAR *
Short FAR *
Unsigned short FAR *
Parameter Values:
Port
Flush
Terminator
Returns: 0 if successful, error code or warning if command not completed.
Description: This function's primary use is to send data to the NetScan's ethernet interface. The secondary use is to
flush all characters from the NetScan's ethernet interface receive buffer. Because this function may take some time
to complete, the return value must be tested to see if the command has completed. The return value for command
pending is –801.
Example:
Do {
} while (errVal == -801) ;
nSessionEnd
Function: int nSessionEnd (long session);
Parameters:
long
Returns: 0 if successful, error code if not.
Description: This function is used to end an active session. When operations with the NetScan are
completed, this function should be called to end the session.
nSwDeinit
Function: int nSWDeinit (void);
Parameters: None
Returns:0 if successful, error code if not.
Description: This function is used to de-initialize all resources allocated by the nSWInit function.
This is the last function that should be called.
session
port
flush
timeout
terminator
length
data
xlength
status
NetScan = 1
Aux = 0
retain = 0
Empty = 1
none = -1
CRLF = -3
User defined = 0 to 255
ErrVal = nSERIALSend(session, 1, 0, 1000, 13, 100, &dataBuffer,
&xlength, &status);
session
The session handle of the NetScan
The port being read from.
Flag to indicate if the receive buffer should
be cleared.
The time, in milliseconds, to wait for
received data.
The terminator to be used for serial input.
The maximum number of characters to be
Transmitted from the data buffer.
A buffer where the transmitted
Data resides.
The number of characters that were sent.
Not used
The session handle of the NetScan

Advertisement

Table of Contents
loading

This manual is also suitable for:

Omb-netscan

Table of Contents