Use COM modules to add ports to your controller. A COM module cannot follow an I/O module. COM modules must be placed next to the CPU, or may be placed next to each other.
Use the module's struct to monitor and manage communications, and the properties to configure the port to your needs.
In the properties, use the Initialize Port For drop-down option to initialize the port for general communications, serial MODBUS or for use with a modem.
Struct
Parameter Name |
Data Type |
Description |
Success |
Bit |
Turns ON when message is sent successfully and the Send Status parameter=0. |
Fail |
Bit |
Turns ON when a message fails to be sent. |
Send Status |
INT16 |
Messages 0 - No Errors 1 - Function started 2 -Function in Progress -1 - General COM Error -10 - Tx start failed -11 - Insufficient space in buffer |
Tx Packet Counter |
UINT32 |
Read/Write Initialized at power-up. |
Rx Packet Counter |
UINT32 |
Read/Write Initialized at power-up. |
RTx Drop Counter |
UINT32 |
Read/Write Initialized at power-up. |
Number of Bytes Waiting |
UINT32 |
Number of bytes in the COM Rx buffer ( up to 1024 bytes) |
Time from First Byte |
UINT32 |
Time in milliseconds from the first byte received. Initialized each time the COM Rx function runs. |
Last Bytes Waiting in Buffer |
UINT8 |
Last 4 bytes in the Rx buffer. |