Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Embedded CAN Driver Receive Queue Size?

Solved!
Go to solution

It seems the max value of the receive queue for the embedded CAN driver is 64 even when using the sbRIO 9607, is this true?  I would like to increase the buffer size to a few hundred frames if possible.

 

The receive queue for the embedded CAN driver has a default value of 5 (set via the CAN Create Interface VI):

 

InitiEmbeddedCAN.png

 

 

The documentation says this about it:

 

receive queue size specifies the number of frames to store in the receive queue. Refer to the Receive Queue Size property for the proper values. The default is 5.

 

Use receive queue size for the Single-Board RIO hardware. Do not use this control for CompactRIO with built-in CAN port hardware, because the hardware has a built-in receive queue in size of 64.

 

The "Receive Queue Size property" documentation says this:

 

If Receive Queue Size is greater than 5, the receive interrupt is enabled and a receive queue is allocated in RAM. When a frame is received, it is pushed into the receive queue. The timestamp when it was moved also is stored and is returned when you use the CAN Read VI. If Receive Queue Size is 5, the receive interrupt is disabled, and a hardware receive queue is used. A frame is retrieved from the hardware receive queue each time you use the CAN Read VI.

 

 

It seems to me that if the receive queue is allocated in RAM then there should be a way around the 64 frame limit, but trying to set a higher value via the property node results in it being coerced to 64.  I think the buffer is indeed at 64 frames since when I send messages that have a higher frame count I sometimes get receive queue overflows (error -35008).

 

Thanks,

John Passiak
0 Kudos
Message 1 of 3
(3,088 Views)
Solution
Accepted by topic author John_P1

Hi John,

 

It appears that the sbRIO 9607 should actually be included in the "CompactRIO with built-in CAN port hardware". I suppose that help is a little unclear since this is a sbRIO, but it has a built-in CAN port. Still, I believe the max value is 64 frames. 

Brian.D
NI Product Owner
VeriStand
0 Kudos
Message 2 of 3
(3,059 Views)

Yeah that makes sense based on the behavior, thanks for the confirmation.

John Passiak
0 Kudos
Message 3 of 3
(3,055 Views)