A COMx driver is the board driver typically used for serial communications. Since version 2.01, the COMx driver allows you to dump debug information.
Three files are produced for each com port: a
write file, a read file and status file. The debug files are
configured by settings in the Citect.ini
and are written and are written to
the path specified in [CtEdit]Logs.
The following Citect.ini
entries are used:
Parameter | Default | Comments |
---|---|---|
WritePortName | (no value) | Port name as defined in the Ports form |
WriteFileSize | 1000 | Size in KB |
WriteDebugLevel | 0 | 1 to enable debugging, 0 to disable |
ReadPortName | (no value) | Port name as defined in the Ports form |
ReadFileSize | 1000 | Size in KB |
ReadDebugLevel | 0 | 1 to enable debugging, 0 to disable |
StatusPortName | (no value) | Port name as defined in the Ports form |
StatusFileSize | 1000 | Size in KB |
StatusDebugLevel | 0 | 1 to enable debugging, 0 to disable |
CharTimeOut | 11 | CharTimeOut specifies the maximum acceptable time (in milliseconds) to elapse between the arrival of two characters on the communication line. During a ReadFile operation, the time period begins when the first character is received. If the interval between the arrival of any two characters exceeds this amount, the ReadFile operation is finished and any buffered data is returned. A value of zero indicates that interval time-outs are not used. |
PassIfAnyInitPortsPass | 0 | Set to 1 if you wish to start when a COMx port is missing. |
Example
[COMx]
WritePortName=PORT_1,PORT_2
WriteDebugLevel=1
WriteFileSize=2000
ReadPortName=PORT_1
ReadDebugLevel=1
ReadFileSize=1000
StatusPortName=PORT_2
StatusDebugLevel=1
StatusFileSize=10
The above example would:
This would also result in the following text files being created:
In general, the format for the file names is "R", "W" or "S" followed by the Port name requested, followed by ".dat". The file names represent the corresponding "Read", "Write" and "Status" files.