nIOLock
Function: int nIOLock (long session, short iotype, short channel, short lock);
Parameters:
Long
session
The session handle of the NetScan
Short
iotype
Always a 9
Short
port
The serial port being locked (1 for the netscan,
0 for the AUX port)
Short
lock
0 to unlock, 1 to lock
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
session
The session handle of the NetScan
Short
port
The serial port being configured
Long
baudRate
The baud rate to be used
Short
parity
The parity setting to be used
Short
databits
The number of data bits to be used
Short
stopbits
The number of stop bits to use
Short
flowControl
The handshaking method to use
Long
reserved
Always 0
Parameter Values:
Port:
Aux = 0
NetScan = 1
Baud Rates:
300, 1200, 2400, 4800, 9600, 19200, 28800, 38400, 57600,
115200.
Parity Settings:
odd = 79
Even = 69
None = 78
Data Bits:
7, 8
Stop Bits:
1,2
Flow Control:
none = 0
Xon/Xoff = 1
Dtr/Dsr = 2
Rts/Cts = 3
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 {
ErrVal = nSERIALConfigure(session, 1, 38400, 78, 8, 1, 3, 0);
} while (errVal == -801);
Summary of Contents for OMB-NETSCAN 1500
Page 6: ...iv NetScan User s Manual...
Page 18: ...1 12 Configuring and Starting NetScan NetScan User s Manual Notes...
Page 38: ...3 8 General Information and Specifications NetScan User s Manual Notes...
Page 82: ...4 44 ChartView Software Reference NetScan User s Manual Notes...
Page 118: ...6 20 Calibration NetScan User s Manual...
Page 140: ...A ii NetScan User s Manual...
Page 192: ...API Command Reference Appendix A A 52 NetScan User s Manual Notes...
Page 237: ...Appendix D Registers Data Formats Queries NetScan User s Manual D 13...
Page 244: ...NetScan Program Examples Appendix E E 2 NetScan User s Manual...
Page 248: ...ASCII Code Summary Appendix F F 4 NetScan User s Manual Notes...
Page 250: ...NetScan Error Messages Appendix G G 2 NetScan User s Manual Notes...
Page 252: ...Abbreviations Appendix H H 2 NetScan User s Manual Notes...
Page 254: ...NetScan User s Manual...