Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

I am trying to run the obj to obj example for VB, however I get errors when i run it.

As an answer to the question asked of me, I was trying to run the obj2obj.vbp file. Initially it gives me an error of "ambiguous name detected" and it seems to have the following defined twice, so i just commented the second definition out.
NC_ST_READ_AVAIL = &H1&
NC_ST_WRITE_SUCCESS = &H2&
NC_ST_STOPPED = &H4&
NC_ST_ERROR = &H10&
NC_ST_WARNING = &H20&
However, after i fixed this i get the following error when i run it and have it connected to my external CAN device (A Gryphon built by the Dearborn Group)

ERROR : ncOpenObject CAN1::STD5 (transmitting) : Object already open in another application

and when it has a connection between th
e two ports on the card, as i believe the program is designed to do, I receive the same error.

However I only recently started getting this error. Before I was getting a function timeout for ncWaitForState. Perhaps some program is running in the background that is keeping the CAN bus open?
0 Kudos
Message 1 of 3
(5,585 Views)
Thanks for the prompt reply. In order to find out if the nican.dll is being launched by another application , please run the dllview utility ( can be downloaded from www.sysinternals.com)before running the VB code and then again after launching the VB code.
Also uninstall the NI CAN drivers on your computer and install the latest drivers ( 1.4.2 ) from the main ni web site ( www.ni.com).
Also if possible do test the CAN card and the VB code on another computer.
Message 2 of 3
(5,585 Views)
I appreciate the help. As it turns out the ends of the cabl were inproperly terminated. The program works fine now. (I still have the ambiguous error, did someone just accidentally define those variables twice?) Thanks.
0 Kudos
Message 3 of 3
(5,585 Views)