03-11-2010 12:32 PM
Hi
I am writing a C app using NI-CAN virtual interfaces. One instance of app configs/opens CAN256 port and other CAN257.
The app works one time, but then I keep getting this internal driver error on ncConfig() call and reboot of PC is only way to make it work again. The app has one rx thread and one tx thread. RX simply prints received msgs from other app and TX reads from a log file and writes to the virtual port(toother app). ncConfig is simply passed in only one attr: NC_ATTR_START_ON_OPEN=NC_TRUE.
I have NI-CAN USB-8473 (but it should not matter), correct?
Error:
NI-CAN: (Hex 0xBFF62002) An internal error occurred in the NI-CAN driver.
A description is located in the file NicanErr.txt in your ..\NI-CAN\bin folder (typically located at C:\Program Files\Na
tional Instruments\..). Solution: Email or fax the NicanErr.txt file to National Instruments for technical support.
Thanks.
-HRP
03-11-2010 09:06 PM
03-12-2010 10:38 AM
Thanks. Actually I got past this issue but now on to next issue.
Basically virtual interface only accepts network i/f objects and not can objects.
So, in my ncWrite()'s I was writing raw 8 bytes CAN data payload. Funny thing is that NI-CAN does not
return error code for the write or read calls. So, you think all is well. But it was not.
So, now I pass in NCTYPE_CAN_FRAME structure and this problem went away.
This interface is so state based, so now I need to pay more attention to state flags.