Discussion:
CAN BFF62008
(too old to reply)
Matisson
2008-04-22 12:40:09 UTC
Permalink
Hello Everyone, I'm using the Channel API of NI-CAN and I often have this error : 0xBFF62008. This means that there is an overflow of the write queue. There are solutions to solve this, by using the "WRITE_SUCCESS" flag but it doesn't exist in the Channel API.Do you know a way to solve this problem ?Thanks in advance !
DirkW
2008-04-23 13:40:11 UTC
Permalink
You know your sample rate and your baudrate and therefore how many frames you can write at a time. So the best would be to time your write correctly.
The shared memory queue for your channel write is 10 samples. Normaly the driver handles the transfer from your Host queue to this shared queue and buffers your samples to write. But it could happen, if you have Read operations running as well that the board becomes very busy in handling the read interrupts and thus your write queue is overflowing.
You could try to increase the write queue to 50 for example, to give some more room for the board to handle other tasks.
Therefore you have to open the nicanopt.ini file and to modify the following section:  CO_WQL =50 if you use a sample rate and NI_WQL =50 if your sample rate is zero.
 
[INTERNAL_CHANNEL_QUEUES]NI_RQL=80NI_WQL=50CO_RQL=0CO_WQL=50
 
You can find the file within the \National Instruments\NI-CAN\bin folder if you have the NI-CAN 2.5.2 driver installed.
 
DirkW
Matisson
2008-04-23 14:40:15 UTC
Permalink
OK Thanks a lot !
I think I solve my problem by using the "Output Recent" Mode in my CAN Init Start VI.But it is very helpful to know this *.ini file... Where can I find it without posting messages on the forums ??
I also have to send remote frames on my network, is it possible to do it with the Channel API ?I think not, so is there a way to mix the Channel and the Frame API in one VI ??
If you have any example, I'm looking forward to get a look on it !
Thanks !!
DirkW
2008-04-24 14:10:11 UTC
Permalink
Hi,
Yeah our documentation has some gaps sometimes. ;-) But as i said normally you should not touch these configurations.  Now that it is posted to the forum, other customers might profit from this information as well.
The channel api cannot work with the frame api at the same port. You would need to provide a port for each api. And only the frame api supports remote frames.
Perhaps you should consider using the frame api only and for your channels you could use the Conversion Library. See this Link for a free download: <a href="http://joule.ni.com/nidu/cds/view/p/id/884/lang/en" target="_blank">Library Download</a>
DirkW
Matisson
2008-04-25 14:40:09 UTC
Permalink
Hi, Thanks a lot for this library, I knew its existence but I didn't fid it yet...However, I have another question :)I have a CAN Network where a message is alternatively a Remote and a Data Frame (with the same ID evidently). I know that Channel API cannot send Remote Frames but Is it possible (using CAN READ.vi) to make the difference between the 2 types of frames. Because with this way of programming, I'm reading the data of the remote frames (every bit = 0) then the good data, etc etc etcThanks again !
Loading...