Omega Engineering OMB-NETSCAN 1500 User Manual page 194

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

Advertisement

nIOLock
Function: int nIOLock (long session, short iotype, short channel, short lock);
Parameters:
Long
Short
Short
Short
Returns: 0 if successful, error code if not.
Description: This function is used to lock the serial port of the NetScan adapter so that another session can't have
access to it. If a serial port is left unlocked, then another session could gain access to that port, causing unpredictable
results.
Example:
ErrVal = nIOLock(session, 9, 1, 1);
nSERIALConfigure
Function: int nSERIALConfigure (long session, short port, long baudrate, short parity,
short databits, short stopbits, short flowctrl, long reserved);
Parameters:
Long
Short
Long
Short
Short
Short
Short
Long
Parameter Values:
Port:
Baud Rates:
Parity Settings:
Data Bits:
Stop Bits:
Flow Control:
Returns: 0 if successful, error code or warning if command not completed.
Description: This function is used to configure the selected serial port parameters of the NetScan ethernet interface.
The parameters used must match the NetScan serial port configuration switches on the rear of the unit. 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);
session
iotype
port
lock
session
port
baudRate
parity
databits
stopbits
flowControl
reserved
Aux = 0
NetScan = 1
300, 1200, 2400, 4800, 9600, 19200, 28800, 38400, 57600,
115200.
odd = 79
Even = 69
None = 78
7, 8
1,2
none = 0
Xon/Xoff = 1
Dtr/Dsr = 2
Rts/Cts = 3
ErrVal = nSERIALConfigure(session, 1, 38400, 78, 8, 1, 3, 0);
The session handle of the NetScan
Always a 9
The serial port being locked (1 for the netscan,
0 for the AUX port)
0 to unlock, 1 to lock
The session handle of the NetScan
The serial port being configured
The baud rate to be used
The parity setting to be used
The number of data bits to be used
The number of stop bits to use
The handshaking method to use
Always 0

Advertisement

Table of Contents
loading

This manual is also suitable for:

Omb-netscan

Table of Contents