04-09-2009 04:22 AM
Hi all,
I'am a newbie to Labview and CAN and I hope you could help me a little bit.
I'm working with Labview 8.5 and use the CANopen library.The real-time system runs on a desktop pc and communicates via NI-CAN PCI Series 2 card with some Servodrives from the company Danaher Motion.
The sdo communication in my programm works fine, but the pdo communication doesn't work. I get no error information and in the debug mode i can't see any error.
I think the pdo communication works not, because i have no COB-ID defined. The sdo communication works without an COB-ID like it is described in the NI-CANopen examples.
The COB-ID results of an function code and the modul-id.
I use the RPDO 1. It has the function code 0100 and that is the number 513 in dezimal counts. The modul-id is the 6 in dezimal count. Finally i have to add these two numbers to get the resulting COB-ID. Did I understand that right?
And can somebody take a look at my programm please. I don't whether it works in that way or not.
I choose the pdo object for a constant rpm and initialize the pdo. After that, the pdo should send the rpm in an real-time loop to the servodrive.
Thanks for your help.
Best regards
Bexley
04-14-2009 04:16 AM
Hi Bexley,
I found some informations for you in the following links:
How does NI support CANopen devices?
http://forums.ni.com/ni/board/message?board.id=30&message.id=1390&requireLogin=False
PDO and SDO COB ids
http://forums.ni.com/ni/board/message?board.id=30&message.id=2701&requireLogin=False
I also attached two vi for SDO/PDO readings with CANopen to how the syntax for this kind of programming is.
Best wishes,
04-15-2009 11:01 AM
Hi Mr.Jingles,
thank you very much for your answer and your programs.
How i have to calculate the Cob-Id is now clear and it works fine for the sdo communication.
The last 2 days i tried to get an application like yours, but it won't works. The Real-time system hangs at the CANopen PDO wait.vi. Without that vi the program works, but without any pdo communication.
In the PDO Read Encoder.vi you don't have to choose the predefined PDO. I must choose it, like it is described in the CANopen Servostar 400/600 Kommunikationsprofil. This is the link to the document: http://www.danahermotion.com/website/eng/eng/products/drives/ac_servo_drives/s600_manuals.php. In chapter 4.3.1 it stands for the rPDO and in chapter 6 there are some examples. Can you tell me the difference please?
With your help and the description in the document i have done a program that should be work, but i can do what i want, the motor will not rotate.
I add my program to the post. Mayby someone can tell what is wrong with it.
Best regards
bexley
07-17-2009 07:16 AM
Hi,
Maybe so late but here is your vi with comments.
I am controlling a SERVOSTAR 603 using CANopen and SDO and PDO works fine.
I think the main problem in your code is status machine of driver dont reach the operation enabled state because bit0 of ControlWord is 0.
Bexley, are you interested in share vis?