COM Module Ports

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.
The Send Status parameter will be negative.

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
The number of packets sent, increments each time a message is successfully sent via a Send Tx function.

Initialized at power-up.

Rx Packet Counter

UINT32

Read/Write
The number of packets received each time COM Rx receives a message.

Initialized at power-up.

RTx Drop Counter

UINT32

Read/Write
The number of packets dropped.

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.

 

 

Related Topics

Panel USB Port

PC-PLC COM

Downloading/Uploading a project

MODBUS

Windows XP: USB Driver

Protocols: Third-party

TCP Server

Protocol Third-party Functions