Ethercat drive configuration woes

More
2 months 1 week ago - 2 months 1 week ago #348899 by mwc
So tried lcec.activate, but that results in an error that activate isn't a valid command.

I have however juggled things to match the first lines in scottlaird's example HAL files in the linuxcnc-ethercat github ( linuxcnc-ethercat/tests/scottlaird-lcectest1/cia402-all.hal at 31e3f343ccc2438d7ae0f843b1819f3926b44bc3 · linuxcnc-ethercat/linuxcnc-ethercat · GitHub ), and LinuxCNC now starts, but I can't seem to get any response from the drives. They do go online, as I can see on them that they've been allocated slave numbers, although strangely they're in the reverse order (first in the chin is 03, with the last being 01).

I've attached my files to see if anybody can spot anything obvious.
Last edit: 2 months 1 week ago by mwc.

Please Log in or Create an account to join the conversation.

More
2 months 6 days ago #349029 by mwc

Start from the beginning (in reply to your first post)

If I power the drives up with the CAT/Network cable disconnected between drive 1 and 2 (aka drive 2 and 3 not linked to the master), load LinuxCNC, then connect the CAT cable (so drives 2 and 3 are now connected/linked to the master), drives 2 and 3 get configured and can be enabled and controlled by LinuxCNC (I can jog the Y and Z axis), but drive 1 still does nothing.

 

So after being away for a few days, I've read back through this thread to remind me what I had done previously, and I'm back to this point.

On the plus side, I realised why the drives were initialising in the wrong order. Apparently the cable to the computer should go in the ECAT IN port of the first drive, not the ECAT OUT port of the last drive image missing /media/kunena/emoticons/whistling.png

In case I've done something stupid during the latest Linux install, how can I check that I'm using the latest built in EtherCAT libraries?

Please Log in or Create an account to join the conversation.

More
2 months 5 days ago #349033 by mwc
It's working!

After reading through the Lichuan LC10E thread (  forum.linuxcnc.org/ethercat/52341-proble...ethercat-servo-drive ), where somebody discovered that the issue is around how the clock is setup, the key are these missing lines from my xml -

<syncManager idx="0" dir="out">
      </syncManager>
      <syncManager idx="1" dir="in">
      </syncManager>
     

Added those for each slave, and all the drives now intialise and activate when LCNC is opened.
Now to decide if I want to re-retrofit them to my little mill, or buy an extra drive and motor for the plasma table I have part built..
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
3 days 22 hours ago #350518 by mwc
For a bit more thread completion, this is my current XML for a single CL3-E57H drive -

<slave idx="0" type="generic" vid="00000a79" pid="00001000" configPdos="true">
        <!-- Lichuan CL£-E57H -->
      <dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
      <sdoConfig idx="2303" subIdx="00"> <!-- Peak Current -->
        <sdoDataRaw data="a0 0f" />
      </sdoConfig>
      <syncManager idx="0" dir="out">
      </syncManager>
      <syncManager idx="1" dir="in">
      </syncManager>
      <syncManager idx="2" dir="out">
        <pdo idx="1600">
          <pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="cia-controlword" halType="u32"/>
          <pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="opmode" halType="s32"/>
          <pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32"/>
          <pdoEntry idx="60FF" subIdx="00" bitLen="32" halPin="target-velocity" halType="s32"/>
        </pdo>
      </syncManager>
      <syncManager idx="3" dir="in">
        <pdo idx="1a00">
          <pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="cia-statusword" halType="u32"/>
          <pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="opmode-display" halType="s32"/>
          <pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-position" halType="s32"/>
          <pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="actual-velocity" halType="s32"/>
          <pdoEntry idx="6077" subIdx="00" bitLen="16" halPin="actual-torque" halType="u32"/>
          <pdoEntry idx="60fd" subIdx="00" bitLen="32" halPin="digital-inputs" halType="u32"/>
        </pdo>
      </syncManager>
    </slave>

This configures the drive to 4000mA current, and reads the digital inputs to a halPin.
I'll likely expand on it once things are installed on the machine, as I'd like it to fully configure the drive when the machine is powered on, but this is enough to get the basics working for now.

Please Log in or Create an account to join the conversation.

More
3 days 15 hours ago #350527 by rodw
Can you try a lcec_configgen generated XML file. Your drive should have a native driver now. I did some testing with grandixximo with a Lischuan 4 drive driver....

Please Log in or Create an account to join the conversation.

More
3 days 13 hours ago #350531 by mwc
Unless it's changed in the past few weeks, the existing Lichuan driver doesnt work with the single axis driver.

The lcec_configgen output didn't work due to a few reasons. The auto generated parameter names varied, and there seemed to be something weird going on with sync manager directions causing errors to be generated during initialising 

Please Log in or Create an account to join the conversation.

Time to create page: 0.484 seconds
Powered by Kunena Forum