Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

nicanopt.ini file guidelines

I had read previous posts in regards to changing this file.  I was able to resolve my problem through trial and error but would like to know the guidelines when changing the [INTERNAL_CHANNEL_QUEUES] section of this file.  Could you explain the differences between the NI and CO variables and when the file is loaded?  I rebooted each time after changing the numbers.  Is there a quicker way to reinitialize this file instead of rebooting?
0 Kudos
Message 1 of 4
(6,730 Views)

tfer1226--

I know the NI and CO variables refer to Network Interface and CAN Object, respectively. For instance, here's is an example break down for the acronyms:

[INTERNAL_CHANNEL_QUEUES]
NI_RQL=20
NI_WQL=5
CO_RQL=0
CO_WQL=5


The acronyms are defined by:

NI = Network Interface
CO = CAN Object
R = Read
W = Write
QL= QueueLength

 

Whenever you make changes, you may have to close and reopen the development environment or reboot your computer in order for changes to take affect.  I am not aware of a faster way than that.

 

Cheers!

--
Tyler C

0 Kudos
Message 2 of 4
(6,713 Views)
Thanks for the help.  I'm still trying to find some guidelines for setting the values.  I had added some messages to the MAX channel configuration and started getting 0xBFF6211E errors and messages stating that there were more periodic messages than what the board could handle.  After reading the forums, I found several responses that set the values different from the default.  I tried increasing the queue values but still had the same error.  For the heck of it, I decreased the values and my errors went away.  I can't explain it so I was hoping someone here could enlighten me.
0 Kudos
Message 3 of 4
(6,693 Views)

First of all, the nicanopt.ini file has defaults that should work for 95 % of the use cases. That means, you should only modify the numbers if you have experienced errors caused by memory limitations in the first place. Said that here some background information about the numbers.

 

The NI-CAN channel api uses the frame api in the background and therefore has the same memory limitations. The numbers from the file are referring to write and read queues used by the channel api tasks. The driver can roughly configure  300 messages for queues within the shared memory.

 

Whenever you have tasks that are not periodically (sample rate 0), the NI_RQL and NI_WQL numbers are used to set up the queues for write and read tasks, but only one per port used with your tasks.

 

For tasks  that have a sample rate assigned the CO_RQL and CO_WQL numbers are used to set up the queues for write and read tasks, one queue for every message contained in your task.

 

In the end if you add all the queue numbers together and you reach over 300, the error informs you about the limitation.

 

There are exceptions from this rule, which makes it difficult to always get it right but at least you can try, or better leave it with the default values.

 

DirkW

0 Kudos
Message 4 of 4
(6,688 Views)