Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Error in NI-CAN Configure Network Interface Object

Hi, I have started receantly to learn LabVIEW and NI-CAN. Im using version 8.2.

I have read the NI-CAN Manual, and look at the examples.  I have tried sending can Frames with LabView and checking them with CAN Analyzer on another computer.

I use the following configuration

ncConfigCANNet -> ncOpen -> ncWriteNet -> ncClose, my problem is that sometimes these configuration works and some times it doesnt, For example I run it and it works, then I stop it change one of the configuration settings of the config.vi, and when I run the application again I get Error (Hex 0xBFF62007)  for the ncConfigCANNet which states that I tried to make changes in the configuration while the object  was still running. But I made the changes after stoping the application, so I dont know why I get this error.
can someone please tell me what am I doing wrong?
 
thanks a lot
0 Kudos
Message 1 of 5
(5,782 Views)

well the error only appears if the port is allready open and you try to set attributes. If you could post your code, i could have a look to it.

be sure to open the port only ones and if you need to use the set attribute function , open the handle with nc config start on open = false and start the communication after setting all attributes using the nc action start function.

DirkW

Message 2 of 5
(5,777 Views)
Hi, Here is the VI I have created it is a very simple one, but I dont know why I get the error in the ncconfigCANNet funktion.
I also recorded the process with NI-Spy
 
This is what I did:
 
1. Run the VI -> It does RUN
2. Change the Write and Read queu to "0"; RUN The VI -> Doesnt RUN - ncCOnfigCANNet Error
3. Change the Write and Read queu back to defaukts "10"; Run the VI-> It works again
 
If you could have a look at them it would be great, thanks a lot
 
 
Download All
0 Kudos
Message 3 of 5
(5,773 Views)
Hi, Here is the VI I have created it is a very simple one, but I dont know why I get the error in the ncconfigCANNet funktion.
I also recorded the process with NI-Spy

This is what I did:
 
1. Run the VI -> It does RUN
2. Change the Write and Read queu to "0"; RUN The VI -> Doesnt RUN - ncCOnfigCANNet Error
3. Change the Write and Read queu back to defaukts "10"; Run the VI-> It works again
 
If you could have a look at them it would be great, thanks a lot
 
 
Download All
0 Kudos
Message 4 of 5
(5,761 Views)

Hi,

Had a look to your VI and implemented a wait to wait until the message is written to the bus , otherwise it could happen that the close is killing the handle before the message left.

But i could not reproduce the error you got. Perhaps you should install the newest CAN driver as well.

DirkW

Message 5 of 5
(5,751 Views)