Enables the debugging of raw data that is transferred between Citect and a selected driver. Protocol traffic is displayed in the Kernel window and logged to the SysLog.DAT file.
Syntax
Debug<Port> <Mode> [<Display>]
Where:
<Port>
A port name configured in the project (using the Ports form)
<Mode>
The mode:
ALL - Trace low-level communication traffic to the Kernel window.
READ - Trace the low-level communication traffic of read commands to the Kernel window.
WRITE - Trace the low-level communication traffic of write commands to the Kernel window.
ERROR - Trace any low-level communication traffic that contains a protocol error. This mode only generates traces when an error is detected, so you can leave this option on for long periods of time (to find difficult problems).
OFF - Stop the debug trace of any type of command.
Note: The TO and FROM modes are now obsolete.
<Display>
Optionally the display scenario:
MONO - Send the debug to a monochrome monitor (if one is attached) as well as the Kernel.
MONOONLY - Send the debug to the monochrome monitor only.
To place a port in debug mode, enter DEBUG followed by the port name and the mode you require. If you do not know the name of the port, enter DEBUG (without any arguments), and Citect displays a list of available ports.
Only the I/O Server communicates with the I/O Devices, so this command is generally used only on the I/O Server.
When you enable a debug trace mode, Citect displays protocol traffic in the Kernel window and logs it to the SysLog.DAT file. This tends to reduce Citect's performance (as there may be a lot of data), and therefore not enable debug trace on an I/O Server that is important to your current operation. Use this command only during commissioning or on a non-vital section. Excessive use of this command may cause the I/O Device to go offline.
|
UNINTENDED EQUIPMENT OPERATION Do not enable or use the Debug Trace mode in an operational environment. This mode is only for use during commissioning. Failure to follow these instructions can result in death, serious injury, or equipment damage. |
When the debug trace is sent to a Monochrome monitor, it is displayed directly from the interrupt routine of the driver and therefore at a much faster rate. This trace (if MONOONLY is used) causes less CPU overload of Citect while the trace is active, and provides instantaneous output. This method is useful if you are developing your own driver and your driver crashes before the debug trace is displayed in the Kernel.
You can use the Shell command to create an extra command window while the trace is active. This allows you to enter more commands (in the new window).
You can use the Pause command to stop the debug output (to view the data).
See Also
Published June 2018