Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Change baud rate

Hi,
 
I have a CANopen-IO-Module which I want to test, I want to change the baudrate and check communication.
I use a NI-PCI-CAN-Card and LabVIEW with the CANopen-Library for communication.
 
 
After I changed the baudrate of the IO-Module, LabVIEW stops and shows the following error:

-
Error -1074388985 occurred at CANopen Interface Create.vi

Possible reason(s):

NI-CAN:  (Hex 0xBFF62007) You attempted to set a configuration attribute while the object is running.  Solutions: Configure attributes prior to opening the object; Stop and restart communication as needed so that you can update configuration attributes.
-

wants wrong??
0 Kudos
Message 1 of 6
(7,555 Views)

It seems you have not closed all handles correctly, before you called the config function again to set the new baudrate. Could you post your code, thus i could have a look to it.

DirkW

0 Kudos
Message 2 of 6
(7,544 Views)
0 Kudos
Message 3 of 6
(7,532 Views)

Hi,

You made a mistake with your handles. The create interface function creates a Port handle and the Create SDO function creates a object handle. In the end the close closes only the object handle. The Port handle stays open. If you then open another interface it works if you do not change the baudrate. But if you changes the baudrate the driver needs to access the handle. That causes a problem because the handle is still open.

See the attached picture for how to close the port handle instead of the object handle. If you close the port handle, the driver closes all object handles as well.

DirkW

0 Kudos
Message 4 of 6
(7,514 Views)
Sorry
It still doesn't work!
The same error occurs again!
0 Kudos
Message 5 of 6
(7,507 Views)
Now it works!

Thanks a lot!
0 Kudos
Message 6 of 6
(7,499 Views)