Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 0xbff6211d (CanErrNoNetIntfConfig); Network Interface or CAN Object configuration is missing

What can produce this error (cofiguration missing) if really the application has configured previus and correctetly the network?
 
05-09-2005 12:01:06:484 :     : CAN1: CAN Network Interface Object has resed
05-09-2005 12:01:07:390 :     : CAN1: CAN Network Interface Object has configured
05-09-2005 12:01:08:515 :     : CAN1::STD0x575: CAN Object has configured
05-09-2005 12:01:08:531 :     : CAN1::STD0x300: CAN Object has configured
05-09-2005 12:01:08:531 :     : CAN1::STD0x381: CAN Object has configured
05-09-2005 12:01:08:531 :     : CAN1::STD0x402: CAN Object has configured
05-09-2005 12:01:08:531 :     : CAN1::STD0x3b5: CAN Object has configured
05-09-2005 12:01:08:546 :     : CAN1::STD0x403: CAN Object has configured
05-09-2005 12:01:08:546 :     : CAN1::STD0x4b9: CAN Object has configured
05-09-2005 12:01:08:546 :     : CAN1::STD0x404: CAN Object has configured
05-09-2005 12:01:08:562 :     : CAN1::STD0x4bd: CAN Object has configured
05-09-2005 12:01:08:562 :     : CAN1::STD0x405: CAN Object has configured
05-09-2005 12:01:08:625 :  *  : CAN function "ncOpenObject()" called into "Can::OpenNetwork()" failds for "CAN1":
 
Error 0xbff6211d (CanErrNoNetIntfConfig); Network Interface or CAN Object configuration is missing. All attributes of an object are deleted when the object is closed. Solutions: Call Config before every Open of an object; Config the Net Interface prior to all Open calls (even if only CAN Objects)
0 Kudos
Message 1 of 7
(5,197 Views)
Hi,

Form your log file, it looks like as if the Network Interface gets configured (at 12:01:07:390), but let’s see what is actually communicated to the NI-CAN driver.
Before you run your application, launch NI Spy (Start » Programs » National Instruments), make sure that the NI-CAN API is monitored (Spy » Options… » View Selections) and start the capture. Now run your application. NI Spy is now logging all calls to the NI-CAN driver including the status of those calls. When your application reports the error, stop NI Spy and save the capture to a file (File » Save).

There should be no errors logged by NI Spy before the ncOpenObject() call that causes that error.

Can you post that Spy capture?

-B2k
0 Kudos
Message 2 of 7
(5,191 Views)

Thank's again biker.

I will try to obtain NI-CAN API log when occurs the error and report it

 

Salutacions, Alexandre.

 

 

 

 

0 Kudos
Message 3 of 7
(5,187 Views)

Hi again,

upload NI Spy file captured with NICAN 2.3 version, view at "19:17:39.187" and at "19:22:24:500".

 

 

0 Kudos
Message 4 of 7
(5,169 Views)
Hi Alexandre,

The spy capture explains it: Take a look at the lines (CAN calls) just before the first error occurs:
1894.  ncReset ("CAN0", 0)
Status: 0 (VI_SUCCESS)
1895.  ncConfig ("CAN0", 10, {0x80000006,0x80000007,...},
Status: 0 (VI_SUCCESS)
1896.  ncReset ("CAN1", 0)
Status: 0 (VI_SUCCESS)
1897.  ncConfig ("CAN0::STD0x575", 6, {0x80000013,0x80000014,...}, {0x00000000,0x00000000,...})
Status: 0 (VI_SUCCESS)
1898.  ncConfig ("CAN1", 10, {0x80000006,0x80000007,...}, {0x00000001,0x000186A0,...})
Status: 0 (VI_SUCCESS)
[…]
1917.  ncOpenObject ("CAN0", 0)
Status:
0xBFF6211D

The problem here is the ncReset() call. I assume that “CAN0” and “CAN1” are on the same CAN card? ncReset() does reset the entire CAN card, so the configuration of both ports (in case of a 2-port card). So when line 1896 is executed, the effects of line 1895 (configure “CAN0”) are reset, so “CAN0” is no longer configured. When you then try to open “CAN0” (line 1917), the ncOpen returns the appropriate error.
Because of this (and other problems), the ncReset() was really intended for debugging purposes only:
"This VI completely resets the CAN card and ensures that all handles for that card are closed.
[...]
If an NI-CAN application is terminated prior to closing all handles, the CanErrNotStopped or CanErrAlreadyOpen error might occur when the application is restarted. This often occurs in LabVIEW when the toolbar Stop button is used, or when a wiring problem with ObjHandle exists. By making this the first NI-CAN VI called in your application (preceding all ncConfig.vi), you can avoid problems related to improper termination.

You can only use ncReset.vi if you plan to run a single NI-CAN application. If you run more than one NI-CAN application, each with ncReset, the second ncReset call will close all handles for the first application. You should only use ncReset.vi as a temporary measure. After you update your application so that it successfully closes NI-CAN handles on termination, it should no longer be used."


However, the ncReset() is in most cases no longer required. The NI-CAN driver (2.3) has become ‘smart’ and clears up pretty much anything, when there are no NetworkInterface objects (ports) open on a card anymore, so when ncClose(“CAN0”) and ncClose(“CAN1”) is called.

I hope this helps you with the application.

Does this fix the other problem you are having (Error 0xbff62002 (CanErrDriver); An internal error occurred in the NI-CAN driver)?

Salut, B2k.

PS: ‘B2k’ is short for biker2000 (2 kilo =2000)
0 Kudos
Message 5 of 7
(5,158 Views)
Hi biker,
 
Yes, CAN0 and CAN1 are ports of the same card. I have 2 instances of my program running at the same time. One works with the port CAN0 and the other with the CAN1. The program has make in Visual C++ and uses nican.dll
 
If ncReset, reset the 2 ports, it's sure that i will have problems.  I will try to resolve this and explain the results later.
 
 
Salut2
Alexandre
0 Kudos
Message 6 of 7
(5,151 Views)
Hi,
 
I deleted the call to ncReset() and don't have more the error of configuration is missing, but the internal error persist.
 
Few questions please:
It's sure than ncReset clears the two ports??
Then... why the function needs the port name as parameter??
 
I'm not sure for the moment, buf if possible that the internal error will be fixed when i syncronize the two applications and dont' call nican.dll functions at the same time. I tried it into my PC and (if the applications are running together-without the call to ncReset()-) the internal error be comes again into my face, directly from the card to my eyes.
 
But if i run the two applications blocking the calls to the nican.dll functions the problem will be missing. And this dangereus and ugly words:  "Internal Error" are lost of my view.
 
So, i hope that this combination: delete ncReset() and block calls from the 2 applications to the driver will be the final solution of my problems with 2 Ports CAN Boards.
 
 
I like to do some test with bloking and calling ncReset function again, but now i don't have any card here. I will test this one after the weekend.
 
 
God say: One call, not problem. More calls, any problems or pay tax.
:))
 
 
PS. Fun weekend!
0 Kudos
Message 7 of 7
(5,142 Views)