CM578-CN CANopen® Communication Module CAN Queues

../_images/71b4b26f46008c0c0a33139000eba54e

The several received CAN identifiers with their message contents are assigned to their different input buffers (Nodeguard input queue, Management input queue, emergency input queue).

A received message is interpreted directly after it has been received from the CAN Controller. This message will be transferred to the corresponding queue while they are written to the output buffer, if the CAN chip is just sending a message. A main loop is interpreting these messages and deletes them or the Interrupt Handler sends the next message. The input buffer handler has 3 parameters. Their content are displayed by Automation Builder.

bInner is the number of currently saved messages.

bFront is a pointer where the next message will be saved.

bRear is a pointer where the next message will be deleted from the queue body.

In a running system, the value of bInner normally should decrease to 0 and bFront and bRear should have equal values.

Parameter Description
bRear Position of the next read access to the puffer of received CAN telegrams
bFront Position of the next write access
bInner Number of CAN telegrams which are actual included in the buffer