09-08-2010 08:47 AM
Hi all,
I'm a newbie in CANOPEN, hopefully I can get some guidance to start off the application development.
Basically I wished to develope a simple VB program to move/stop the motor at different speed and to monitor the position.
There is only 1 master which is the PCI NI-CAN and 1 device. The device which is the servo amplifier is Kollmorgen S600.
http://www.maccon.de/fileadmin/FTPROOT/s400600can_e.pdf
During the amplifier boot up, I'm able to receive 0x81h 00 00 00 00 00 00 00 00 at both the MAX's bus monitor and the NI's Frame API, thus ensuring that the baud and hardwares are correct.
I wished to perform a "SDO-READ" and "SDO-WRITE" using the Frame API as followed :
http://img.photobucket.com/albums/v208/rainman1978/sdoexample.jpg
The Frame API VB software example given has this abiturary ID, data length, remote frame (YES/NO) and extended frame (YES/NO). In the write procedure it has :
Transmit.Data(0)=&H0
Transmit.Data(1)=&H1
Transmit.Data(2)=&H2
Transmit.Data(3)=&H3
Transmit.Data(4)=&H4
Transmit.Data(5)=&H5
Transmit.Data(6)=&H6
Transmit.Data(7)=&H7
etc etc followed by its standard ncwrite procedure.
I made change to the transmit datas.
Transmit.Data(0)=&H40
Transmit.Data(1)=&H41
Transmit.Data(2)=&H60
Transmit.Data(3)=&H0
Transmit.Data(4)=&H40
Transmit.Data(5)=&H0
Transmit.Data(6)=&H0
Transmit.Data(7)=&H0
There isn't any response back from the amplifier and I bet the frame format must be wrong.
This is what I observed from the NI SPY when I send out the data. (when VB set to ID 5 and data length set as 😎
05 00 00 00 00 08 00 00 41 60 00 40 00 00 00 (something likethis, which I couldn't relate at all)
Thanks. Hope I can get a wake up call to this complicated bus protocol.
Regards,
Rainman
09-11-2010 04:46 AM
Managed to get it worked.
Using the COB-ID is crucial!
07-07-2011 03:44 AM
Hi all
I'm having the exact same problem. Can you please post how did you manage to overcome the problem?
I'm using the right COB-ID but still didn't manage to make it work! What else did you do?
Thanks
07-10-2011 06:01 AM
Got it!!!
To all that will try to use the VB6 application:
In the LabView examples the COB ID default is in hex, and in the VB examples the COB ID default is dec !!! The GUI of the 2 examples (VB & LabView) is exactly the same but it will not work unless you use the correct COB-ID.
So, for example, if you want to use the labview example and you want to enter the ID 601: you Enter 601 in the ID text box.
However, if you want to use the VB6 example with the same ID you need to insert 1537 (=601 hex!!)
I hope that with this post I will save some people the 3 days that it took me to find this!
Shilo