Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Motor Controller communication via PDO CANopen

I am using a Mattke AG Servo Position Controller (MDR2300) to control a PMSM via Speed and Position control. The motor controller uses the CANopen protocol to receive commands from the NI Realtime Controller. In order to send the speed, position, velocity, etc commands, I am currently using the SDO method of communication. But I want to use the PDO method in order to do the same.

 

I am using the 'NI-Industrial Communications for CANopen 1.0.3' library. The examples given by NI regarding PDO, transmit/receive 64bit word. But the way I understand it, the Objects can be mapped to the 4 transmit and 4 receive PDO's so that I can send, for example object values for target_position, profile_velocity, profile_acceleration, and polarity in one PDO msg. I managed to do the PDO mapping using the LabVIEW Batch SDO process. But I don't know how to use it further in my Program. I have attached the current program I have that uses SDO. I wish to accomplish the same using PDO. Has anyone managed to do this?

 

Thanks a lot for your help.. :smileyhappy:

Download All
0 Kudos
Message 1 of 2
(5,555 Views)

Hi Shreyas,

 

If I am understanding correctly, you have used the LabVIEW project to add the BatchSDO to the project and now you're wanting to know how to use it further?  I would recommend looking at the example VI in Example Finder » Hardware Input and Output » NI Industrial Communications » CANopen » (choose PXI&PCI or cRIO) » NI CANopen for [choice you made].  In the project you should see a VI called CANopen BatchSDO.vi.  This VI will show you how to use the BatchSDO project functionality available with the CANopen driver.

 

My other recommendation is to look at the CANopen Application.vi.  It shows how use the RPDO and TPDO in the same VI.

 

Let me know if you have any further questions.

 

Thanks!

Matt S.
Industrial Communications Product Support Engineer
National Instruments
0 Kudos
Message 2 of 2
(5,547 Views)