User manual

IEC61131 User and Reference Manual
April 22, 2008
229
cominfo
Serial port status
Description
The cominfo function block provides diagnostic data about a specific serial port.
comX
clearErrorCntrs
cominfo
parityErrors
framingErrors
charOverrunError
portIOLineStatus
bufferOverrunErr
Arguments
Inputs
Type
Description
comX
Integer
Communication port to get status information.
Valid values are 1 to 4.
clearErrorCntrs
Boolean
Serial port counters are cleared when TRUE.
Serial port counters accumulate when FALSE.
Outputs
Type
Description
framingErrors
Integer
Serial port framing errors are the number of received
bytes where too few or too many bits were received.
This indicates that data is being garbled or lost on the
communication medium or that there is noise on the
medium.
parityErrors
Integer
Serial port parity errors are the number of received
bytes where the parity bit did not match the parity of the
data bits. This indicates that data is being garbled or lost
on the communication medium or that there is noise on
the medium.
charOverrunError
Integer
Serial port character overrun error are the number of
times a character was received before the previous
character could be read. If this occurs, the processor is
too busy to read the serial port. This may be caused by
noise, especially if it occurs in conjunction with parity
and framing errors.
bufferOverrunErr
Integer
Serial port buffer overrun errors are the number of
characters discarded because the 512 byte receive
buffer is full. If a protocol is running on the port, this
indicates that the message sent to the controller is too
long. If no protocol is running, this indicates that the
application program that should be reading the data
from the port isn't.