Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

pdo communication in realt time application

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

 

 

0 Kudos
Message 1 of 4
(7,383 Views)

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,

 

 

Jan Kniewasser | Applications Engineer | Tel.: +49 89 7413130 | Fax: +49 89 7146035

»
Download All
0 Kudos
Message 2 of 4
(7,353 Views)

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.:smileyhappy:

 

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

0 Kudos
Message 3 of 4
(7,339 Views)

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?

 

 

 

0 Kudos
Message 4 of 4
(7,047 Views)