Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

What is ths maximum PDO read buffer size using the Series 2 CAN cards?

Does anyone know the maximum size for the PDO read buffer when using a Series 2 PCI NI-CAN card?
0 Kudos
Message 1 of 5
(4,804 Views)
Hi
The maximum size for a single PDO does not depent on the series of your board it is depending on what else you are doing with the CANopen Library.
The board uses a specific shared memory to transfer messages between driver and hardware. The size of this memory fits nearly 350 messages.
The CANopen Config takes 100 messages for different services like NMT. That means the maximum size for a single PDO would be approx. 250 messages.
Or for 5 different PDOs 50 each. But normaly you can leave the buffer size to zero, thus the PDO Read would allways read the newest data.
This calculation is true for the board. That means you have 350 messages per board and 2 ports whould need to share the memory.

DirkW
Message 2 of 5
(4,799 Views)
If I set the buffer to zero, will that also eliminate any lost frame errors due to buffer overflow?  Also, if you don't mind me asking, the only difference between setting the buffer to zero and using the wait for PDO is that setting the buffer to zero is "non-blocking" (i.e. the vi won't hold until new data is available or the PDO Wait for Read times out)?
0 Kudos
Message 3 of 5
(4,798 Views)

The PDO wait uses  a wait internaly to block the thread until a message has arrived for this PDO. Thus you can specify a timeout value.

If you set the buffer to zero this changes internaly from queue to non queue handling, which means there is only one message space for the PDO and a new message will overwrite the last one. And you are right , it eliminates the buffer overflow error.

Thats the same behavior for PDO Read and PDO wait.

DirkW

Message 4 of 5
(4,793 Views)
Great!  Thanks for your help.  It would be great of the help files for the CANopen library were a little more substantial 🙂
0 Kudos
Message 5 of 5
(4,791 Views)