LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

KollMorgen AKD controlled by cRIO: get position

Solved!
Go to solution

Dear all,

 

My current project needs to control a KollMorgen AKD by EtherCAT, from a NI cRIO and LabVIEW. This AKD is a motor controller, used with a motor including an absolute encoder. The motor is connected to a gearbox and a linear actuator, so I can easily measure the position value (physically). AKD parameters are visible in a third party software called Kollmorgen Workbench. AKD is natively compatible with LabVIEW.

 

I created a project and added EtherCAT device, using "Getting started with AKD EtherCAT and SoftMotion" pdf, available on:

http://www.ni.com/pdf/manuals/375592f.pdf

 

I didn't get any trouble with my LabVIEW application. I was able to control the speed of my motor and get a position value.

BUT

I realized that the position was not the right value (physically, and compared to Workbench-after scaling). The biggest problem was the position value after restarting (power up) all the materials (cRIO, AKD...). The value was not the same as before shutting down.

 

I spoke with KollMorgen distributor service and saw with him that the configuration was right (using Workbench). There's a parameter (called FB1.EXTENDEDMULTITURN) to save values when we shut down, that is enabled. Furthermore, we saw that cRIO changes some AKD parameters at cRIO start up (like Units…). We worked on these problems (and others), and I really think AKD configuration is now OK. The problem remains, and should come from EtherCAT communication, or from LabVIEW.

 

After trying many solutions to solve the problem, I read this manual.

https://www.kollmorgen.com/sites/default/files/public_downloads/AKD%20EtherCat%20Communications%20Ma...

 

In my LabVIEW project explorer, under my EtherCAT device, I have some variables that I can use. So I tried to get a position value from variable called  "Internal Position Value" (adress 6063h). I saw that this value was the same that I can get with an Invoke Node connected to my related Axis (scaled with a 2^20 factor).

 

Now, I would like to get "Actual Position Value" (called PL.FB in Workbench, adress 6064h) that is not actually available in the projet explorer. This parameter shows the right value in Workbench (compared to my measure on the linear actuator), so I want to get it in LabVIEW. To do so, I tried to modify the xml file

C:\Program Files (x86)\National Instruments\LabVIEW 2018\resource\Framework\Providers\indcomecat\DD\AKD14.xml

using this article

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019LesSAE

but I failed… Each trial created an error on AKD.

 

Trying to get 6064h parameter is the solution I want to try for the moment. Could you help me modifying the xml file, please ?

 

Thanks in advance,

Julien

 

 

 

 

0 Kudos
Message 1 of 6
(4,353 Views)
Solution
Accepted by topic author julienAu

Hi julienAu,

 

The attachment is the modified ESI file that I made according to your requirement. Here are the instructions to use the modified ESI:

 

1. Close LabVIEW. Remove the previous ESI of the slave from <National Instruments>\Shared\IndComECAT\DD.
2. Copy the attached ESI to the mentioned folder in Step 1. Start LabVIEW.
3. Open you LabVIEW project. Delete and re-add the slave into the project. Re-deploy the EtherCAT master if using any NI controller.
4. Change the Scan Engine’s mode from Config to Active.

 

Thanks!

Message 2 of 6
(4,300 Views)

Hello zhengchen,

may I ask you for  help with the same issue as julienAu.

I tried to use your file, but I got an error.

At first I have <National Instruments>\Shared\IndComECAT\DD directory empty, but I found AKD14.xml in:

C:\Program Files (x86)\National Instruments\LabVIEW 2018\resource\Framework\Providers\indcomecat/DD

and replaced it there.

Then, when I try to start communication an error related to ethercat communication is fired and even on Drive LCD is displayed "o0".

My configuration is: LV18 (32bit), cRio9040, Kollmorgen AKD-P00307-NBCC-E drive.

With default configuration files (ESI) all works fine, but parammeter PL.FB would help me a lot.

Thank for any advice.

 

0 Kudos
Message 3 of 6
(4,077 Views)

Dear all,

 

My project needs to control an EtherCAT Servo drive (BSD series by Beijer Electronics) from a NI cRIO and LabVIEW. 

 

Our goal is to use servo drives in torque mode and send the torque setpoint calculated by LabVIEW Programming in the CompactRIO controller directly via EtherCAT. I know I must modify the provided XML file of the servo drive in order to get access to right parameters like Target Torque, Actual Torque, …

 

In this way, according to the link below, I tried to modify the XML file to get access to 1st PDOs:

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019LesSAE&l=pl-PL

 

and I replaced the XML fie located at:

C:\Program Files (x86)\National Instruments\Shared\IndComECAT\DD

I carefully followed the recommendations in the link:

https://forums.ni.com/t5/Motion-Control-and-Motor-Drives/Customize-Motion-Control-using-cRIO-SoftMot...

The problem is that:

  1. When I import the new XML file as device profile to the EtherCAT Master, the modifications are not recognized to the EXISTING slave (which I add via New: Target or Device: Existing target or device). I remove slave then master then even cRIO from the project, or I restart the cRIO, or even I create new project from scratch and I repeated the steps again and again. Nothing happens. Just a list of 2nd PDOs are seen below the Slave device, as before.

 

  1. I tried to add the slave to the project as the NEW one (via New: Target or Device: New target or device). [The name and the address of the added slave is the same as the one in the existing one]. and Then good news: I see the list of 1st PDOs which I managed through the XML file to have access to, below the added slave. BUT when I want the scan engine to go to active mode and to use these parameters inside the LabVIEW programming environment, the error happens: the slave device deployed to the real-time target does not match the device in the EtherCAT network.

And in Online Device State, every LED state are off and there is an alarm in red: DIVICE DISCONNECTED

 

Any help is appreciated. Many thanks in advance.

 

0 Kudos
Message 4 of 6
(3,947 Views)

Hi SamMsfy,

 

Here is the instruction to use the modified XML file:

 

  1. Close LabVIEW. Remove the previous ESI of the slave from <National Instruments>\Shared\IndComECAT\DD.
  2. Copy the attached ESI to the mentioned folder in Step 1. Start LabVIEW.
  3. Open you LabVIEW project. Delete and re-add the slave into the project. Re-deploy the EtherCAT master if using any NI controller.
  4. Change the Scan Engine’s mode from Config to Active.

Thanks

0 Kudos
Message 5 of 6
(3,936 Views)

Hallo Julien,

Hope you are doing good!

I am also doing almost the same project. Can you please share the VI so that i can have a look on that and implement it on my application according to my requirement.

Thanks

Shubham

0 Kudos
Message 6 of 6
(3,021 Views)