Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting started with 3rd party EtherCAT slaves - questions

Hi,

I'm reasonably experienced with Labview RT, but this is the first time I've used EtherCAT.

I have a PXI chassis acting as EtherCAT master, and I will be using 2 different 3rd party EtherCAT slaves. One is to talk to a Control Techniques motor drive, and the other is to talk to an HBM torque flange.

For now I only have the Control Techniques Drive part, so that's what I've started with.

I have managed to import the xml file and add the slave device and 4 variable have appeared in the project linked to that device (2 read and 2 write). I set up a 1kHz loop to read the 2 variables, and this works most of the time, but I get an error every now and then, see attached. I have tried increasing the EtherCAT Cyclic Bandwidth percentage from 40% to 60% but still get the error. Any ideas what might be causing this?

How would I go about reading other data items? the xml file only seems to include the 4 that I'm getting access to but if I look at the EtherCAT Parameters in the Online Slave Device State there are lots more.

Also, is there likely to be an issue if one or both of the slaves get turned off and back on again? will my code need to somehow re-initialise? I don't really understand the whole configure/active mode thing. Is the simple way of just dragging the variables in to a vi from the project going to be fine or is it better to use the programmatic way of discovering devices/variables etc.?

The application is an engine testcell, so I need to measure speed and torque, and output a speed setpoint at 1kHz.

Thanks in advance for any help - sorry it's been a bit of a rambling post!

 

0 Kudos
Message 1 of 5
(4,170 Views)

First you need to carefully read your drives manual to understand what exactly it can do and need in order to boot up into communication mode.

For motion drives it is always important to know the minimum cycle time for your timed loop. Sometimes the drive needs startup commands executed or you need to change the PDO mapping.

So the best you can do for interacting with your non NI Ecat slave drive is to switch from project based configuration to programmatic configuration directly in LabVIEW by importing the XML files directly to the RT Target. The Import tool does that by default I think.

Use the Refresh Modules VI in the Config Mode to discover EtherCAT devices and configure these devices. Use the Search Variable Container function to list the configured devices.  Refer to the LabVIEW Help for more information about using these two VIs.

Refer to the Read Property.lvproj in the labview\examples\indcomecat\Read Properties\ directory for an example of programmatically discovering and configuring EtherCAT devices.

The good news is that you are not the first person that tried this, so there are plenty of KBs and Application notes on NIs webpage. Just search in google for National instruments  and Ethercat along with key words like XML to find similar KBs as the one below, explaining how to change the XML file to other mappings your drive might support.

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019LesSAE&l=en-US

Hope that helps. If you have a service contract with NI, do not hesitate to contact your sales rep or our support team for help.

-DirkW-

0 Kudos
Message 2 of 5
(4,150 Views)

 Thanks DirkW,

I am making some progress, but I think I am going to be hamstrung by the fact that the NI EtherCAT master doesn't have anyway of configuring PDOs without editing the xml file. I don't understand why they've chosen to do this - no-one else seems to use editing the xml file as a way of configuring PDOs.

0 Kudos
Message 3 of 5
(4,132 Views)

Hi Toddy

 

Did you manage to implemente the HBM torque module in Labview??

I'm working with the TIM-EC torque module and I have some problems getting it to work. 

What software versions did you use and was you able to read values of the hbm torque module in labview?

I have problems when I try to detect the HBM module. The modules are only visible for 10 seconds when I boot up my cRIO and HBM modules. 

Download All
0 Kudos
Message 4 of 5
(3,996 Views)

Hi Toddy, i am having the similar issue -2417138393 occationally with 3rd -party slaves.

Could you share some progress how did you solve this finally.Many thanks!

0 Kudos
Message 5 of 5
(1,578 Views)