(Need Help) Linux CNC + EtherCat + RPi 4 Setup

More
24 Jan 2022 19:08 - 24 Jan 2022 19:14 #232998 by Dj Junior
Wow Thanks a lot hakan

I moved HALFILE = ethercat.hal to the last line as indicated and now the error is gone linuxcnc is open and the command
halcmd setp lcec.0.3.dout-3 0 no longer gives errors

I updated the ethercat-conf.xml file with the devices connected except for the stepper driver. I have to read the documentation to understand how to configure them

i start linuxcnc with display via vnc

ethercaty-conf.xml updated

<?xml version="1.0" encoding="UTF-8"?>
<masters>
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="5">
<slave idx="0" type="EK1100" />
<slave idx="1" type="EL1018" />
<slave idx="2" type="EL1104" />
<slave idx="3" type="EL2008" />
<slave idx="4" type="generic" vid="00000a88" pid="0A880002" configPdos="true">
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0" />
<sdoConfig idx="2000" subIdx="0">
<sdoDataRaw data="70 17" />
</sdoConfig>
<!-- Max motor current (6.0) -->
<sdoConfig idx="2011" subIdx="0">
<sdoDataRaw data="01 00" />
</sdoConfig>
<!-- Closed loop -->
<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="32" halPin="actual-torque" halType="s32" />
</pdo>
</syncManager>
</slave>
<slave idx="5" type="generic" vid="00000a88" pid="0A880002" configPdos="true">
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0" />
<sdoConfig idx="2000" subIdx="0">
<sdoDataRaw data="DC 05" />
</sdoConfig>
<!-- Max motor current (1.5) -->
<sdoConfig idx="2011" subIdx="0">
<sdoDataRaw data="00 00" />
</sdoConfig>
<!-- Open loop -->
<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="32" halPin="actual-torque" halType="s32" />
</pdo>
</syncManager>
</slave>
</master>
</masters>
Last edit: 24 Jan 2022 19:14 by Dj Junior.

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

More
24 Jan 2022 19:38 - 24 Jan 2022 19:40 #233000 by Hakan
Great, then it works.
When you move on, please consider that the read-all and write-all has to come in a specific order.

For the stepper motors, I think it is a good chance they work as is. But you should remove the lines
<sdoConfig idx="2000" subIdx="0"><sdoDataRaw data="70 17" /></sdoConfig><!-- Max motor current (6.0) -->
<sdoConfig idx="2011" subIdx="0"><sdoDataRaw data="01 00" /></sdoConfig><!-- Closed loop -->

Your driver doesn't have the open/closed loop setting. It seems to have the max motor current setting at 2000, but best to read up on that I guess.
Last edit: 24 Jan 2022 19:40 by Hakan.
The following user(s) said Thank You: tommylight, Dj Junior

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

More
24 Jan 2022 19:50 #233001 by Dj Junior
I have the db608-ec driver as pictured and the ESI file received from the supplier. It works both in open loop and closed loop but to do the tests I connected 3x nema 17 motors in open loop.
Attachments:

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

Time to create page: 0.070 seconds
Powered by Kunena Forum