Discussion:
CAN error(0xBFF62130)
(too old to reply)
laixunian
2008-05-14 06:40:07 UTC
Permalink
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&nbsp;refer to the thread:"PCMCIA 2port high speed CAN card".<a href="http://forums.ni.com/ni/board/message?board.id=30&amp;message.id=3452" target="_blank">http://forums.ni.com/ni/board/message?board.id=30&amp;message.id=3452</a>
DirkW
2008-05-14 13:40:07 UTC
Permalink
See the attached example for a periodic write of 1Hz for 20 messages.
DirkW


Write multiple_channel_periodic Folder.zip:
http://forums.ni.com/attachments/ni/30/3454/1/Write multiple_channel_periodic Folder.zip
laixunian
2008-05-15 01:10:08 UTC
Permalink
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.
&nbsp;
Lai
DirkW
2008-05-15 18:40:06 UTC
Permalink
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.
&nbsp;
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:
&nbsp;
[INTERNAL_CHANNEL_QUEUES]NI_RQL=20NI_WQL=5CO_RQL=0CO_WQL=5
&nbsp;
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.
&nbsp;
Hope that helps.
&nbsp;
DirkW
laixunian
2008-05-16 02:40:05 UTC
Permalink
Hi DirkW,
According to your explanation. I change the file "nicanopt.ini ". Then I ran the programm I&nbsp;wrote before. Yes, I get it!
Thank you very much for your help!:smileyvery-happy:
&nbsp;
Lai
&nbsp;

Loading...