Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with NI PCI-8512/2 card under NI-CAN 16.0 with compatibility pack

Hi all,

 

I am facing a very weird phenomenon with one NI PCI-8512/2 card. It is used with the NI-XNET 16.0 with NI-CAN compatibility pack installed and NI-CAN 16.0, operating system: Windows 7 32-bit. If I start the Computer without opening NI MAX, my CAN application written in ATEasy works very good. Once I open NI MAX (where I can see the card under NI-XNET & CAN Devices in the tree view) and hit NI-XNET and give Refresh + SelfTest to the card, everything is pass, I close NI MAX and my ATEasy application refuses to initialize the CAN test (it fails at ncConfig) with error 0xBFF62001 (TIMEOUT ERROR?!?!).

After it fails, I open NI MAX and I see under NI-XNET that instead of "CAN1,CAN2" resources, I have "CAN-1,CAN-1"... And if I hit SelfTest, the NI MAX retrieves the same 0xBFF62001 error...

Only a restart fixes everything again.

If I open the Computer and don't open NI MAX (which seems to latch the card in a buggy state), the tests are working very well in loop for awhile, but suddenly it fails again with the same error. Only a restart makes it to work again.

 

Anybody can give an idea, please?

 

Best regards,

Paul

0 Kudos
Message 1 of 5
(3,988 Views)

I'm not familiar with the ATEasy application or how it interfaces with the NI-CAN and XNET driver. Maybe it is possible that it is opening references that become invalid or stale once a self test is performed. When it tries to use them agian it corrupts the system. That is currently just a guess but we can test it by removing ATEasy from the equation. Simply restart your machine, run a single test without ATEeasy, and see if there are problems. 

Jeff L
National Instruments
0 Kudos
Message 2 of 5
(3,967 Views)

Hi Jeff,

 

Thank you for your feedback!

ATEasy shouldn't be a problem.

I just imported the nican.dll library like one can import in any other IDE (Visual C++, C# etc.) and the basic functions that this DLL exports are called (ncConfig with parameters, ncOpenObject for each interface, ncWrite from CAN0, ncRead from CAN1 - having a cable between Port 1 and Port2 of the same card etc.). I've guided myself using the NI-CAN examples provided at NI-CAN installation.

As I told you, it works most of the time (I'm just sending 8 bytes of data), but randomly it fails dramatically leaving me no other option than to shut-down the computer and restart it (cold reset).

And, for sure, opening the NI MAX and Refresh + SelfTest the card from NI-XNET interface gives me the bad experience...

 

Is there any way I can reset the card?

I know that other NI cards (such as NI-DAQmx cards NI-6528, 6723 etc.) have the NIDAQmxResetDevice(...) function. But this NI PCI-8512/2 NI-XNET card does not have such a function?

Maybe if I'll manage to reset it to its default state, I could fix the state in which NI MAX leaves the card... (faulty state, that is...).

 

Best regards,

Paul

 

0 Kudos
Message 3 of 5
(3,961 Views)

The closest equivilent to a reset that is available for XNET cards would be the self test.

Jeff L
National Instruments
0 Kudos
Message 4 of 5
(3,956 Views)

This doesn't help me. 😞

I need to work with my card programmatically but only using NI-CAN interface (nican.dll).

I didn't find anything related to Reset from the nican.dll.

 

Paul

0 Kudos
Message 5 of 5
(3,943 Views)