beckhoff TwinCAT 3 — 11.1.4.1.1 Fast CAN Queue (unbuffered)

CAN | CAN Interface maximum buffer value. If this is always or in almost every cycle at the maximum value, then this indicates that more data are being received than can be recorded per cycle. Remedy: Shorten the task cycle time or enlarge the buffer of the CAN queue. Example A CAN telegram with 11-bit identifier and 8 bytes of user data needs about 260 µs at 500 Kbit/s. If one assumes a 100% bus load in the worst case, it would be maximally 3 telegrams with 1 ms. This means that a buffer of maximally 4 would be adequate in this case. If a task time of 5 ms is used instead of 1 ms, the buffer should be at least 20 (5000 µs / 260 µs).

It must be remembered here that in this study only the data in one direction are considered and that the CAN data always have 8 bytes. Since a 100% bus load is not usually assumed, one can also evaluate the variable NoOfRxMessages and see whether it lies in most cases below the maximum number of buffers created. If NoOfRxMessages is often at the maximum value, the task time should be shortened or the buffer enlarged. Worst case However, the CAN interface is designed such that, as a rule, the data can always be fetched faster than they run into the buffer. Example 1 MBaud data length 0 means 50 µs per CAN message.

With a 1 ms task time this would be 1000 µ / 50 µs = 20 This means that even in this extreme worst case a buffer of 20 would be adequate to receive all CAN telegrams. Table for the telegram runtimes with 11-bit ID [ms] 1) 1) Data from CIA 11.1.4 Functionalities | Functionalities 11.1.4.1 CAN queues | CAN queues 11.1.4.1.1 Fast CAN Queue (unbuffered) | Fast CAN Queue (unbuffered) Received messages are no longer buffered on the EL6751. The RxQueue should therefore be large enough to hold all messages that could theoretically be received within a single EtherCAT cycle. The received messages no longer have to be confirmed. The EL6751 increments the RxCounter when new messages are received.

In the transmission direction, only data dependent on the changed TxCounter and the NoOfTxMessages is copied, so that the number of parallel messages in the queue should no longer affect the runtime (only the NoOfTxMessages). Since the EL6751 operates in 3-buffer mode (so that it always has a buffer in which to copy received CAN messages), the unused messages may contain incorrect or old data. I/O 30 Version:

2.3.0 Bit rate [kbit/s] Data length in bytes 0 1 2 3 4 5 6 7 8 50 1.09 1.28 1.47 1.66 1.86 2.05 2.24 2.34 2.62 125 0.44 0.51 0.59 0.67 0.74 0.82 0.90 0.97 1.05 250 0.22 0.26 0.29 0.33 0.37 0.41 0.45 0.49 0.52 500 0.11 0.13 0.15 0.17 0.19 0.21 0.22 0.24 0.26 1000 0.05 0.06 0.07 0.08 0.09 0.10 0.11 0.12 0.13