Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN error(0xBFF62130)

Hello Marshall R,
 
I open and run multiple periodic tasks at the same time, each periodic task for a frame CAN message of different ID. The development environment is LV8.0, and I use CAN Channel API. What I want to do is , the PXI 8464 2-port CAN card can send periodically 10 frames message from port0,and send 9 frames from port1 at the same time. But the LV told me the error. If I reduce a frame message to send , that's to say ,send 18 frames at the same time, then there will be no error, and I detect CAN buses, all the message are sent out periodically and correctly. So I doubt the PXI 8464 can open and run no more than 18 periodic tasks(frames). Is that true?
 
Lai
 
 
Please refer to the thread:"PCMCIA 2port high speed CAN card".http://forums.ni.com/ni/board/message?board.id=30&message.id=3452
0 Kudos
Message 1 of 5
(6,953 Views)

See the attached example for a periodic write of 1Hz for 20 messages.

DirkW

0 Kudos
Message 2 of 5
(6,940 Views)

DirKW,

I downloaded and ran the example. When it uses the same port(such the port0 of PXI 8464),the 20 frames message can be sent out successfully. But when I use two ports,for example,use port0 to send 10 messages and port1 to send 10 messages at the same time, the error happens again. I hope you also to have a try.

 

Lai

0 Kudos
Message 3 of 5
(6,933 Views)
Ok, i see what your problem is and what the reason is. You are running out of resources.
The channel api uses the frame api a s underlaying code and therefore it shares the same limitations.
The driver has a shared memory with the board that fits approximately 300 messages for both ports read and write.
This memory can be configured in queues for write and read operations.
The Frame Api has this Queue configured in their API (configure function).
The Channel Api uses a config file to configure the shared memory queues. It is somewhat hidden because normally you do not need to change them.
But in your case you have to reduce the queue size a little bit to allow more tasks to be configured for periodic output.
 
Here is the explanation:
The driver can configure a maximum of 48 periodic messages or tasks. That's the maximum limit for one or two ports together.
To reach this limit you need to modify the "C:\Program Files\National Instruments\NI-CAN\bin\nicanopt.ini file.
The following section needs to be modified to the following numbers:
 
[INTERNAL_CHANNEL_QUEUES]
NI_RQL=20
NI_WQL=5
CO_RQL=0
CO_WQL=5
 
For a single port that leads to 24 tasks with 5 messages Queue, which translates to 120 messages overall queue size.
For a second port add another 120 messages and then we have the Port configuration with 20 messages per Port for the ReadQueue and 5 for the Write Queue.
Do not set that to zero.
The overall shared memory used is then 290.
that's below 300 and the driver should be able to handle the 48 tasks on both ports.
 
Hope that helps.
 
DirkW
0 Kudos
Message 4 of 5
(6,909 Views)

Hi DirkW,

According to your explanation. I change the file "nicanopt.ini ". Then I ran the programm I wrote before. Yes, I get it!

Thank you very much for your help!Smiley Very Happy

 

Lai

 

0 Kudos
Message 5 of 5
(6,906 Views)