Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Servo over EtherCAT: Invalid parameter when transitioning from PreOp to SafeOp

Solved!
Go to solution

Hello,

 

I'm trying to control a 3rd party servo drive via EtherCAT:

 

  • Hardware:
    • Master: NI-cRIO 9024
    • Slave: Beckhoff AX5203
  • Software:
    • LabVIEW 2013 SP1 (32-bit)
    • NI-Industrial Communications for EtherCAT 2.7

 

Using the LabVIEW test panel (see image below), I'm able to toggle the slave between Bootstrap, Init, and Pre Operational states. The LCD on the slave displays the correct states that I selected, so I know that the basic EtherCAT link is working.

 

However, when I try to transition from Pre Operational to Safe Operational state, I get an error.

  • LabVIEW says "The slave cannot transition to the specified state" (see image below)
  • The slave's LCD shows error code 0xF4A5, which according to Beckhoff's site is "A parameter error has been detected in the SoE communication layer"

 

SoE import - State transition error.png

 

I'm at a loss at how to start troubleshooting.

 

The Error Explanation says "Go to your device's Online Device State page and check the device's error and emergency data". However, I don't see any error or emergency data in the  Online Slave Device State page. There's only "EtherCAT: Online: State" and "EtherCAT: Parameters" (image above).

 

I'm wondering if this issue is related to any of the following:

 

Any tips would be greatly appreciated!

Certified LabVIEW Developer
0 Kudos
Message 1 of 9
(10,629 Views)

Hey,

 

It sounds like this issue is very likely caused by not being able to properly import the XML files. I would also double check that you had the correct files from Beckhoff.

 

Here is an article that might help you as well.

 

Configuring an EtherCAT Master to Interface with a Beckhoff EtherCAT Coupler

http://digital.ni.com/public.nsf/allkb/99F7EBA04B08A2CA86257A78000CEA36

Britton C.
Senior Software Engineer
National Instruments
0 Kudos
Message 2 of 9
(10,607 Views)

Hi Britton,

 

Thanks for your response.

 

The import failure turned out to be a red herring. Thanks to Matthew's help, I was finally able to import the XML file into my cRIO (see the other thread), but this issue persists.

 


@Great_Britton wrote:

I would also double check that you had the correct files from Beckhoff.

 

Here is an article that might help you as well.

 

Configuring an EtherCAT Master to Interface with a Beckhoff EtherCAT Coupler

http://digital.ni.com/public.nsf/allkb/99F7EBA04B08A2CA86257A78000CEA36


I've carefully looked through the XML files. I imported Beckhoff AX5xxx.xml (attached, with extension changed because the forum rejects *.xml files). It's from the Beckhoff website and it indeed contains an entry for my servo drive, "AX5203-0000 EtherCAT Drive (SoE, 2 Ch.)"

 

I have already followed every step in your linked article before posting this thread, except for one variation: I added the slave device by using "Existing target or device" -> "Discover an existing target(s) or device(s)". This should be an even more robust process than the manual method shown in that article. See my Project Explorer screenshot above for verification.

 

Any other ideas? Should I be worried about my empty object dictionary?

SoE - Empty object dictionary.png

Certified LabVIEW Developer
0 Kudos
Message 3 of 9
(10,599 Views)

Hey,

 

Do you have any signs that you are communicating with the slave successfully? Are you able to transition to any other states?

Britton C.
Senior Software Engineer
National Instruments
0 Kudos
Message 4 of 9
(10,589 Views)

Hi,


@Great_Britton wrote:

Hey,

 

Do you have any signs that you are communicating with the slave successfully? Are you able to transition to any other states?


 Yes, as I wrote in my original post: "Using the LabVIEW test panel (see image below), I'm able to toggle the slave between Bootstrap, Init, and Pre Operational states. The LCD on the slave displays the correct states that I selected, so I know that the basic EtherCAT link is working."

 

What do you make of the error message? It says "Go to your device's Online Device State page and check the device's error and emergency data", but I can't find any error or emergency data on that page.

Certified LabVIEW Developer
0 Kudos
Message 5 of 9
(10,584 Views)

Hey,

 

That error message is a general one that's not that helpful. The better one is the one the device itself is giving saying there a problem with the SoE communication layer.

 

It looks like your connection to your slave is fine, and that the error is specific to the Servo drive profile over Ethercat.  I would try to make a simple application in LabVIEW to control the Beckhoff AX5203 to see if you get errors when LabVIEW is automatically handling state transitions.

 

You may also want to look through the troubleshooting tips listed in this article just to make sure we're not missing something small.

 

Working with EtherCAT Drives (NI SoftMotion Module)

http://zone.ni.com/reference/en-XX/help/371093M-01/mclvhowto/motionprojectresourcesecatdrive/

Britton C.
Senior Software Engineer
National Instruments
0 Kudos
Message 6 of 9
(10,565 Views)

Thanks again for your suggestions, Britton.

 


@Great_Britton wrote:

 

It looks like your connection to your slave is fine, and that the error is specific to the Servo drive profile over Ethercat.  I would try to make a simple application in LabVIEW to control the Beckhoff AX5203 to see if you get errors when LabVIEW is automatically handling state transitions.


I've been unable to find any LabVIEW VIs that let me control EtherCAT slave states programmatically. Perhaps I'm looking in the wrong place. Could you please show me where to find them?

 

In any case, I believe that these state transitions are handled at the low-level firmware level, not the high-level (LabVIEW) application level. Here's why I think so:

  • If I power up the Beckhoff drive in isolation (disconnected from the CompactRIO), it remains in Init mode.
  • If I power up the Beckhoff drive and the CompactRIO together (with an Ethernet cable between then), the Beckhoff drive enters the error state shortly after startup.

From these observations, I deduce that the CompactRIO automatically tries to perform the state transitions at startup before loading any software.

 

 

Furthermore, I believe that the slave must first be in Operational mode before I can send commands to it, because:

  • When I try to write to the EtherCAT variables (e.g. "MDT 1-Velocity command value" in the screenshot my original post), I get Warning 66030: This I/O variable is referencing an I/O device or channel that is not active in the current I/O mode.  Data read may be stale or invalid and data written may not be sent to the output.
  • However, if I try to switch Scan Engine from Config mode to Active mode, I get: "An error occurred while attempting to switch the I/O scan mode. The NI Scan Engine could not be changed to Active mode because one or more slave devices failed to enter Operational state."

 


@Great_Britton wrote:

 

You may also want to look through the troubleshooting tips listed in this article just to make sure we're not missing something small.

 

Working with EtherCAT Drives (NI SoftMotion Module)

http://zone.ni.com/reference/en-XX/help/371093M-01/mclvhowto/motionprojectresourcesecatdrive/


it looks like SoftMotion axes can only be bound to the AKD drives supplied by NI (http://sine.ni.com/nips/cds/view/p/lang/en/nid/209126 ). It doesn't work with my Beckhoff one.

 

Notice how my drive doesn't show up in the SoftMotion config box:

 

NI EtherCAT SoftMotion.png

 

 

Before I try anything else, I'd like to find out: Does NI Industrial Communications for EtherCAT support SoE?

Certified LabVIEW Developer
0 Kudos
Message 7 of 9
(10,505 Views)
Solution
Accepted by topic author JKSH

Hey,

 

Evidently, NI was unable to obtain the ability to work with Beckhoff, and so only officially supports AKD. Regarding whether NI Industrial Communications for EtherCAT supports SoE, see the response to your other forum post.

 

http://forums.ni.com/t5/Motion-Control-and-Motor-Drives/Is-SERCOS-supported-by-NI-Industrial-Communi...

Britton C.
Senior Software Engineer
National Instruments
Message 8 of 9
(10,488 Views)

I see. That's a shame, but aattt least now I know why these challenges exist.

 

Thanks for alll your prompt responses, Britton!

 

 P.S. http://forums.ni.com/t5/Feedback-on-NI-Discussion-Forums/What-ddooeess-tthhiiss-aalllll-mean/m-p/295...

Certified LabVIEW Developer
0 Kudos
Message 9 of 9
(10,480 Views)