From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

Kollmorgen AKD CANopen communication in LabVIEW

Hello,

 

I'm trying to communicate with a Kollmorgen AKD drive via CANopen within LabVIEW 2012 and am having difficulty figuring out the formatting.  I have the CAN transceive example running and when I turn on the drive and let it boot up, I receive one CAN message, so I'm fairly confident my wiring, baud rate, and basic drive setup are correct.

 

The LabVIEW example has fields for Arbitration ID and 8 data bytes but I can't figure out the formatting to get the drive to respond to any messages I try to send.  The Kollmorgen CAN manual is here:

http://www.kollmorgen.com/zu-za/products/drives/servo/akd/_manuals/kollmorgen-akd-canopen-communicat...

 

When the Kollmorgen drive has finished booting up, it sends out a message ID 0x701 (which is a little odd considering I set the address to 1) with data 0x00.  If I set my Arbitration ID to 0x701 and set the RTR Flag in my LabVIEW example, then when I send any data the Kollmorgen drive replies with 0x7F.  If I send again, the drive replies with 0xFF.  This pattern repeats if I continue to send.  Unfortunately that is the only communication I've been able to get working.

 

I have attached screen shots of the LabVIEW example I am using.

 

Has someone communicated with these AKD drives using CANopen before?  If so, can you please give me an example of how to format my data.  My eventual goal is to get the motor position and send velocity commands.

 

Thank you so much in advance!

 

...Mike

Download All
0 Kudos
Message 1 of 7
(7,490 Views)

Hi Mike_in_WI,

 

What NI hardware are you using?

 

It looks like the VI you have uses NI CAN VIs rather than CANOpen VIs. There is a CANOpen driver you can install (linked below), however the driver only supports our newer hardware (supported hardware is listed in the readme file).

http://www.ni.com/download/ni-industrial-communications-for-canopen-1.0.3/4100/en/

 

There is also the NI-CANOpen Library, which will work with older hardware and is likely what you will need to use since you have been using NI-CAN:

http://sine.ni.com/nips/cds/view/p/lang/en/nid/202614

 

It looks like you will likely want to use SDO protocol. The manual you posted lists the index and sub-index to use for specific commands using the SDO protocol. For example, one of the position commands has an index of 2050h and a sub-index of 0. The CANOpen library and driver have read/write VIs that take the index and sub-index as inputs and handles building the frames correctly behind the scenes.

 

According to the manual, the message x700 + (device address) is for the node-guarding protocol, which monitors the status of all nodes (bootup, stop, etc). The response 0x7F indicates that the node is pre-operational. More information about node guarding can be found at the link below:

http://www.canopensolutions.com/english/about_canopen/guarding_heartbeat.shtml

Catherine B.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 7
(7,432 Views)

After looking into this further, it appears that my brand new (!) NI hardware may be part of my issue.  I am using a NI 9862 CAN module in a cDAQ-9178 chassis.  I've downloaded the NI Industrial Communications for CANopen 1.0.3 and installed it, but it does not recognize my NI hardware.  Also, the $154 NI CANopen library that you mentioned should work with *older* equipment does not list my *newer* hardware as being compatible.

 

I am beginning to wonder what good the NI 9862 High Speed CAN module is if there is no NI software support for it.  Are there any other options?  Even though it doesn't mention being compatible, will the NI CANopen library work with my NI 9862 module?

 

...Mike

0 Kudos
Message 3 of 7
(7,426 Views)

Hi Mike,

 

The Industrial Communications for CANOpen driver is designed to work with our dedicated CANOpen hardware. This is a newer area of development, so at the moment the only dedicated CANOpen C series module we have is the 9881, which can only be used in a cRIO chassis.

 

The CANOpen library works with the NI-CAN driver, which was the predecessor to the NI-XNET driver. To use your XNET module with the CANOpen library, you will need to install the compatibility library for NI-CAN for your XNET module. Instructions on how to do this can be found at the link below:

 

http://digital.ni.com/public.nsf/allkb/0A928969F15668D7862579AA00804E72

Catherine B.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 7
(7,401 Views)

I already installed the compatibility library in order to use NI-CAN with the NI 9862 module.  Also, I have now managed to successfully format and send several commands to my Kollmorgen drive using NI-CAN.  Formatting these commands is tricky, so if the CANopen Library already contains this formatting, then it will certainly be worth purchasing.

 

Thank you for your help and suggesting the CANopen library.

 

...Mike

0 Kudos
Message 5 of 7
(7,396 Views)

Hello,

 

I found these commercial producer of LabVIEW drivers for Kollmorgen AKD drives.

http://sisudevices.com/projects/labview-motion-drivers/

 

Do you know about some alternative or even solution that is for free? 🙂

0 Kudos
Message 6 of 7
(6,508 Views)

In the end, I found that my NI 9862 CAN module was causing most of my issues.  The LabVIEW CANOpen Library isn't compatible with that hardware.  My work-around was to recreate a small subset of the CANOpen commands on my own.  This solution actually worked fairly well for me and I was able to establish good communication with my AKD drive sending it velocity or torque commands and receiving and decoding position replies.  I've attached an example VI that works with my NI 9862 module.

Message 7 of 7
(6,501 Views)