UniCAN

UniCAN is Unitronics' proprietary CANbus protocol.
UniCAN enables fast data communications. Via UniCAN, a UniStream PLC can exchange data with up to 60 other networked PLCs, including Vision PLCs. It is also the protocol used for EX-RC1 remote I/O communications.

UniCAN is controlled by configuration. The controller automatically sends messages according to the time intervals that you set in the UniCAN configuration.

UniCAN uses 29-bit extended identifiers.

 

Configuring UniCAN

  1. On the Solution Explorer tree, click PLC Communications to expand it, then Protocols, and then UniCAN; this opens the configuration.

  2. The Properties window shows the Unit ID of the controller. Note that this number must NOT match the number of any of the UniCAN nodes.

  3. Click Add New UniCAN Node. Note that UniLogic automatically assigns a Node ID number to each node.


    Node Parameters

Name

Definition

Node Name

The name  of the remote network node.

Node ID

The ID number of the remote node on the network

Tx Time (ms)

Enter the time intervals for the controller to send messages to this node..

Tx

Select the tag or struct that the controller will send.

Tx Size

Read-only. This shows the byte length of the data to be sent.

Rx

Select the tag or struct that the controller use to store the data received from this node.

Rx Size

Read-only. This shows the byte length of the tag or struct that is to store the received data.

 

UniCAN UniStream -Vision

In order to communicate with Vision controllers, check the property Vision Support. This enables UniStream:

.

Note

  • The Rx MI default is 1000. Note that if you are working with certain controllers the MI range may not reach 1000. In Samba, for example, the MI range is 0-255.

  • Vision controllers can send and receive up to 32 bytes per message.
    UniStream controllers can send and receive up to 64 bytes.
    Note that you can use the VisiLogic parameter Offset in Buffer to manage sending longer messages to UniStream.

 

UniCAN Structs

When you configure UniCAN, UniLogic creates two structs that enable you to manage and monitor UniCAN, plus an individual struct for each node.

UniCAN General Struct

Name

Data Type

Definition

Initialization Status

UINT32

0= OK

If there is any other value, check the parameter Initialization Status in each UniCAN Node struct in order to see the error.

UniCAN ID

UINT32

Read-only. This is the number from the UniCAN configuration

Number of Nodes

UINT32

Read-only. This is the number of Nodes defined in the configuration

Alive Error Exists

Bit

Each 0.5 seconds, a unit sends an 'Alive' signal to the CANbus network. If any unit is faulty, and does not send an Alive signal, this bit turns ON.

 

UniCAN Statistics Struct

Name

Data Type

Definition

UniCAN ID

UINT32

This is the ID of this controller

Rx Counter

UINT32

The total number of Rx messages received by this controller

Tx Counter

UINT32

The total number of Tx messages sent by this controller

Rx Alive Counter

UINT32

The total number of Alive signals received by this controller

Tx Alive Counter

UINT32

The total number of Alive signals sent by this controller

Rx Error Counter

UINT32

This is the total number of errors received from all nodes by this controller, including: Message size mismatch, Message received from undefined node ID, MI received that is not defined in the Rx MI parameter

Tx Error Counter

UINT32

Total number of messages that could not be sent

Rx Alive Error Counter

UINT32

The total number of Alive errors received by this controller

Tx Alive Error Counter

UINT32

The total number of Alive errors sent by this controller

Alive Bitmap 1-31

UINT32

When a Keep Alive signal is not received from a specific node, the corresponding bit indicating the node ID turns ON. (Nodes 1-31)

Alive Bitmap 32-63

UINT32

When a Keep Alive signal is not received from a specific node, the corresponding bit indicating the node ID turns ON. (Nodes 32-63)

 

UniCAN Node Struct

Name

Data Type

Definition

Initialization Status

UINT32

Contact support  = 0x02,

TX_ALIGNMENT_MSG_ERROR  = 0x03,

RX_ALIGNMENT_MSG_ERROR = 0x04,

TX_MI_ERROR   = 0x03,

RX_MI_ERROR  = 0x04,

Node ID

UINT32

The ID of this specific node

Tx Time Interval (Ms)

UINT32

Read/write. Tis is the interval at which this node sends message (Note that Tx enable must be ON)

Tx Size (bytes)

UINT32

Read-only

Rx Size (bytes)

UINT32

Read-only

Rx Error Counter

UINT32

This is the total number of errors for this node, including: Message size mismatch, Message received from undefined node ID, MI received that is not defined in the Rx MI parameter

Keep Alive Bit

Bit

1= OK . This means that a Keep Alive signal was received for this node.

0= No Keep Alive received for this node

Receive Bit

Bit

A message is in the Rx parameter tag. Initialized by user.

Note that this will not turn ON until all of the bytes in the Rx message have been received.  

Tx Action Bit

Bit

Turn this ON to force a message to be sent without regard to the defined interval.  (Note that Tx enable must be ON)

Tx Enable

Bit

0= Disable Send

1= Enable Send