Debugging a TCP/IP Driver
- Last UpdatedFeb 06, 2024
- 2 minute read
A TCPIP driver is the board driver typically used for serial communications. It might be over Ethernet, Token Ring or Arcnet. This driver communicates between Plant SCADA and Winsock, so it uses the normal networking functionality of Windows.
TCP/IP driver events are logged in the following file:
syslog.IOServer.<Cluster name>.<IO Server name>.dat
This file is located in the directory specified by the [CtEdit]Logs parameter in the citect.ini file.
The TCPIP driver can log different combinations of trace levels. This is achieved by setting the following Citect.ini parameters:
|
[TCPIP] Parameter |
Description |
Allowable Values |
Default Value |
|
DebugLevel |
The trace level used for the log file. |
Any combination of the following, separated by a pipe character (|): ERROR For example, ERROR | TRACE. |
- |
|
DebugCategory |
The categories used for the log. |
The TCPIP driver supports one category: PROT = protocol level debug |
- |
|
PortName. |
This parameter allows you to implement the TCPIP driver option "-Maa.bb.cc.dd" in the Citect.ini file. This may be necessary if you have run out of characters in the Special Options field of the Ports settings, which is limited to 16 characters. |
You need to specify the following in the Citect.ini file: [TCPIP] PortName. Where: PortName = the name of the port as entered in the Ports settings aaa.bbb.ccc.ddd = the multicast Class D IP address |
|
|
NoBufferSleepTime |
Sleep time in milliseconds (ms) to wait AFTER getting a WSAENOBUFS (no system buffers message) before reading another buffer. There is no need to adjust this. |
- |
0 |
|
Timeout |
Defines the timeout period between connection retries. |
1000 (ms) |
The log file size and log file rollover process is controlled by the [Debug]SysLogSize and [Debug]SysLogArchive ini parameters.
When the log file reaches a specified size (100000 kilobytes by default), it may be rolled over into a timestamped file when [Debug]SysLogArchive is set to 1, otherwise it will be overwritten.
Note: The more detailed the logging, the larger the amount of log data that will be generated.
This could create a large, cumbersome log file, or cause multiple wraparounds that
write over data. Also when the number of pending messages to process exceeds the value
set by the [Kernel]ErrorBuffers parameter, these messages are no longer logged. Messages not logged can be monitored
in the General Kernel Window under the item "Lost Errors". It is recommended to use
the following DebugLevel and DebugCategory settings:
[TCPIP]DebugLevel=ERROR|WARN|TRACE
[TCPIP]DebugCategory=PROT