Logging
- Last UpdatedJul 09, 2024
- 2 minute read
The MELSECQ driver can log combinations of trace levels across different categories. This is achieved by setting the following INI parameters.
[MELSECQ]DebugLevel
This parameter allows you to define the trace level. The options include:
|
Option |
Description |
|---|---|
|
WARN |
Output warning messages. |
|
ERROR |
Output error messages. |
|
TRACE |
Output trace messages. |
|
DEBUG |
Output debug messages. |
|
ALL |
All of the above. |
[MELSECQ]DebugCategory
This parameter allows you to enable logging for a particular category of trace. The options include:
|
Option |
Description |
|---|---|
|
PROT |
Trace of communication between the driver and the lower level protocol. |
|
UNIT |
I/O device trace. |
|
ENTRY |
Driver entry trace. |
|
DCB |
Front end driver trace. |
|
MISC |
Any other debugging. |
|
ALL |
All of the above. |
In both cases, you can use any combination of the available options separated by a pipe character ( | ).
Example
[MELSECQ]
DebugLevel=WARN|ERROR|TRACE
DebugCategory=ALL
In most cases, you can set the DebugLevel and DebugCategory parameters to ALL. If this results in a large, cumbersome log file that causes older data to be overwritten, you can consider refining the debug options.
Note: These parameters do not have a value specified by default. To enable logging for this driver, you need to manually configure these parameters in your INI file.
The events generated by the MELSECQ driver are logged in the following Plant SCADA syslog file:
syslog.IOServer.<Cluster name>.<IO Server name>.dat
This file is located in the directory specified by the Citect.ini parameter [CtEdit]Logs. By default, this location will be:
%PROGRAMDATA%\AVEVA Plant SCADA <VersionNumber>\Logs
The size of the syslog file and its rollover process is configured via the [Debug]SysLogSize and [Debug]SysLogArchive INI parameters. For more information, see the topic Debug Parameters in the Plant SCADA documentation.
Note: If the number of messages being processed for a driver exceeds the value specified by the Plant SCADA parameter [Kernel]ErrorBuffers, the pending messages will not be logged. If this occurs, you can increase the value of this parameter so that all the messages generated by the driver are reported. The number of messages that are not logged can be monitored via the Kernel's General window under the item "Lost Errors". If you adjust [Kernel]ErrorBuffers and Lost Errors are still occurring, you may need to adjust the level of system logging.