Discussion:
Change baud rate
(too old to reply)
MightyMoooo
2008-05-05 06:40:25 UTC
Permalink
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.viPossible 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??
DirkW
2008-05-05 13:10:11 UTC
Permalink
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
MightyMoooo
2008-05-05 15:40:09 UTC
Permalink
Yeah of course!


Error Baudrate1.JPG:
http://forums.ni.com/attachments/ni/30/3407/1/Error Baudrate1.JPG
DirkW
2008-05-06 14:10:09 UTC
Permalink
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


CANopenLibraryHandleEx.jpg:
Loading Image...
MightyMoooo
2008-05-06 15:10:09 UTC
Permalink
Sorry It still doesn't work! The same error occurs again!
MightyMoooo
2008-05-07 12:10:06 UTC
Permalink
Now it works! Thanks a lot!

Loading...