Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Maximum number of NI-CAN Objects

Hello Folks,

What is the maximum number of Ni-CAN objects supported by Ni - CAN boards ?
What is the maximum size of the write queue buffer supported by the boards ?

It seems there is a problem.
I am not able to open more than 32 CAN objects, with a write Queue length of 60 arbitration IDs

Note: I don´t what to use Frames !!!
0 Kudos
Message 1 of 10
(5,525 Views)
I could be thinking of something else here, but it seems the maximum number of Objects is dependent on timing of the writing.

I think there needs to be a 2ms 'pause' between writes according to the CAN spec. So you could have 1 Object writing ever 2ms, 20 Objects writing every 10ms, 32 Objects every 16ms...

I couldn't find anything in the documentation to support this, so I may be totally off base.

On the ncConfigCANObj.vi, the Write Queue Length control has a maximum value of 1000 set in it's properties, so I would think that's the max write queue buffer.

Hope this helps.

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 2 of 10
(5,524 Views)
Hi,

Here is a document that explains the memory resources available on the NI-CAN boards: How Large Can I Make the Read and Write Queues for NI-CAN?.

Hope this information helps.

DiegoF
National Instruments.
Message 3 of 10
(5,524 Views)
I still can't find any documentation on the max number of objects.

Maybe somebody at NI could chime in on this because I'm wondering if I'm correct or not about the number depending on the write timing.

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 4 of 10
(5,524 Views)
Hello DiegoF

At first thanks for your answer. But the document explains only the memory recources and is in conflict with the reality about the number of CAN objects.

Assume I want to use the maximum of possible CAN objects (in this example only for transmitting on one Port)
According to your Document:
Network Interface (lenght = 0)Resource = 52 + 44 Bytes
--> Memory for Objects 6600 - 96 = 6504

--> one CAN object periodic transmit no queue = 46 Byte
That means possible Objects = 6504 / 46 = 141

I have written a very simple console
Application to verfiy this but after
opening 49 Objects the next ncOpen
fails with the error code 0xbff62100 (Maximum number
of CAN objects reached)

Can you explain that ?

Greetings
From the Lak
e Of Constance
Juergen
0 Kudos
Message 5 of 10
(5,524 Views)
Hi,
here is the answer to your problem.
One board, no matter having one port can have 50 Objects configured.
But the Network Configuration is an Object too.
So for a Two port board , using two ports you can configure max 48 CAN objects.
But the queue length is also very important, because you can only have about 350 messages configured for all queues. So if you use 48 Objects and also the Network Objects the max queue length, using the same for every object, is 6 or 7 messages .
Hope that helps.
0 Kudos
Message 6 of 10
(5,525 Views)

Hi Dirk !

Just a question about the queue length. You wrote you can have 350 messages defined for all queues... Is it 350 messages for read/ write queue of one board ? One port ? All  boards ???

Hmm.. about the number og object that can be defined... I tought it was 255 objects for all cards ...

0 Kudos
Message 7 of 10
(5,108 Views)

Hi,

It is a question of how you use the onboard memory as mentioned aerlier in this thread. In the end it is aprox. 350 messages for all queues but can differ .

The number of objects (50) is for one board, no matter using one port or two.

DirkW

0 Kudos
Message 8 of 10
(5,095 Views)

Hello Dirk,

I also want to point out the issue of maximum number of CAN objects. For our application, we intended to use the Channel API, with timestamp for each frame we receice. In this case, we discovered it was compulsory to create one object for each frame.

Our NI local support indicated us that there was a maximum of 50 CAN objects per card. For the dbc files we expect to use, having a 50 frame limitation is really a problem.

However, I tested the real limitation with latest version of NI-CAN driver used on a PXI-RT controller, and what I found is that there is a limitation of 127 objects, but global for the whole system. So 2 ports on 2 different boards would have to share these 127 objects.

To do this benchmark, I created plenty of ncd files and created 1 object for each ncd. Each channel could be used for reading or writing.

Have I something wrong in my benchmark setup ? Where would this 49 or 50 objects limitation come from.

In my understanding 127 was also considering the maximum of 32 CAN cards therotically supported. With 2 ports per card and 2 objects created for each port, that would lead to 2x32x2 indeed.

Now we use the Frame API, using a dedicated dll to perform channel to frame conversion, but I think NI CAN limitations are really unclear...

0 Kudos
Message 9 of 10
(5,092 Views)

Hi Impriser,

Ok we have to take care not mixing Frame and Channel API facts. The 50 Objects Limit is related to the onboard memory used by Objects created with the Frame API.

The Channel API with Sample Rate 0 mainly uses the RAM memory and therefore other Limits apply. The Channel API allows you to create max 128 Tasks, that means you can create 128 Task Handles using the Initialize Function and the 128th would cause an error message.

The second Limit for the Channel API is that the max number of messages in your tasks is limited to 272 minus the number of Tasks you are using.

DirkW

0 Kudos
Message 10 of 10
(5,073 Views)