EtherCAT driver for a 6 axis robot

More
10 May 2022 19:30 - 10 May 2022 20:10 #242516 by ftree
Thanks!  Rx PDOs wip.  Weaving my way though documentation.  Reading up about halTypes.


<syncManager idx="2" dir="out" />

<pdo idx="1600">
   <pdoEntry idx="7200" subIdx="01" bitLen="1" halPin="robot.ctrl.deactivate" halType="bit" />
    <pdoEntry idx="7200" subIdx="02" bitLen="1" halPin="robot.ctrl.activate" halType="bit" />
    <pdoEntry idx="7200" subIdx="03" bitLen="1" halPin="robot.ctrl.home" halType="bit" />
    <pdoEntry idx="7200" subIdx="04" bitLen="1" halPin="robot.ctrl.reset-errror" halType="bit" />
    <pdoEntry idx="7200" subIdx="05" bitLen="1" halPin="robot.ctrl.sim-mode" halType="bit" />
    <pdoEntry idx="7200" subIdx="06" bitLen="1" halPin="robot.ctrl.recovery-mode" halType="bit" />
  </pdo>

  <pdo idx="1601">
    <pdoEntry idx="7310" subIdx="01" bitLen="16" halPin="robot.motion.id" halType="u16"/>
    <pdoEntry idx="7310" subIdx="02" bitLen="1"  halPin="robot.motion.set-point" halType="bit"/>
    <pdoEntry idx="7310" subIdx="03" bitLen="1"  halPin="robot.motion.pause" halType="bit"/>
    <pdoEntry idx="7310" subIdx="04" bitLen="1"  halPin="robot.motion.clear" halType="bit"/>
    <pdoEntry idx="7310" subIdx="05" bitLen="1"  halPin="robot.motion.reset-pstop" halType="bit"/>
  </pdo>

  <pdo idx="1602">
    <pdoEntry idx="7305" subIdx="00" bitLen="32" halPin="robot.move.cmd" halType="u32"/>
    <pdoEntry idx="7306" subIdx="01" bitLen="32" halPin="robot.move.001" halType="complex"/>
    <pdoEntry idx="7306" subIdx="02" bitLen="32" halPin="robot.move.002" halType="complex"/>
    <pdoEntry idx="7306" subIdx="03" bitLen="32" halPin="robot.move.003" halType="complex"/>
    <pdoEntry idx="7306" subIdx="04" bitLen="32" halPin="robot.move.004" halType="complex"/>
    <pdoEntry idx="7306" subIdx="05" bitLen="32" halPin="robot.move.005" halType="complex"/>
   <pdoEntry idx="7306" subIdx="06" bitLen="32" halPin="robot.move.006" halType="complex"/>
  </pdo>

  <pdo idx="1610">
    <pdoEntry idx="7400" subIdx="00" bitLen="32" halPin="robot.brakes.allowed" halType="u32" />
  </pdo>

  <pdo idx="1611">
   <pdoEntry idx="7410" subIdx="01" bitLen="1" halPin="robot.brakes.ctrl-allowed" halType="bit" />
    <pdoEntry idx="7410" subIdx="02" bitLen="1" halPin="robot.brakes.engaged" halType="bit" />
  </pdo>

  <pdo idx="1620">
    <pdoEntry idx="0000" subIdx="00" bitLen="32" halPin="robot.dynamic-data.cfg0" halType="u32" />
  </pdo>

   <pdo idx="1621">
     <pdoEntry idx="0000" subIdx="00" bitLen="32" halPin="robot.dynamic-data.cfg1" halType="u32" />
  </pdo>

   <pdo idx="1622"
     <pdoEntry idx="0000" subIdx="00" bitLen="32" halPin="robot.dynamic-data.cfg2" halType="u32" />
   </pdo>

   <pdo idx="1623">
     <pdoEntry idx="0000" subIdx="00" bitLen="32" halPin="robot.dynamic-data.cfg3" halType="u32" />
  </pdo>
  </syncManager>
 
Last edit: 10 May 2022 20:10 by ftree.

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

More
10 May 2022 20:35 #242521 by rodw
I could not find a specific reference to it but I think the Linuxcnc motmod (motion module) is now user definable in master branch (as of recently)
Also the interpreter is modular but nobody has ever written an alternative to G code.

So it could be possible to write a new language to control your robot and convert that language to ethercat motion primitives.
But it would be a big task...

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

More
10 May 2022 20:35 #242522 by db1981
oh, i have not seen the cyclic modes.
If they realy work cyclic without the motion que thing, then velocity control with joint pos feedback will work...

Kinematics, singularys etc. are another chapter.....

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

More
10 May 2022 20:42 - 10 May 2022 20:59 #242523 by ftree
"If they realy work cyclic without the motion que thing, then velocity control with joint pos feedback will work..."


That's what I'm hoping. Reading the "JointSet" encoder positions should make this possible. See TxPdo 1A02, x6030, 1 to 6.
Last edit: 10 May 2022 20:59 by ftree.

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

More
10 May 2022 21:11 - 10 May 2022 21:17 #242527 by ftree
"Kinematics, singularys etc. are another chapter....."

I may use RobotDK to work out best use of the axes and "post process" to pre-calculated G-code.  Meca500 kinematics supported.


Last edit: 10 May 2022 21:17 by ftree.

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

More
10 May 2022 22:13 - 10 May 2022 23:09 #242529 by ftree
WIP attached.

Well that's neat.  You can set up to four  "custom dynamic data tables" to be sent to the EtherCAT master such as real-time

joint position
joint torque
3-axis accelerometer
end effector pose (tool or world referenced)

and many others!
Attachments:
Last edit: 10 May 2022 23:09 by ftree.
The following user(s) said Thank You: rodw

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

More
12 May 2022 12:33 - 14 May 2022 02:19 #242792 by ftree
I've seen some examples of using a ddt to prepare velocity and acceleration.  Still trying to understand if that's required. What signals need moving around between the motion controller, the pid and the meca500 encoders.  Also to understand if any dataformat comversion needs to take place.

I may need to draw a chart. Requires coffee. Back soon.
Last edit: 14 May 2022 02:19 by ftree.

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

More
14 May 2022 01:07 - 16 May 2022 15:15 #242932 by ftree
Taking a look at linuxcnc-ethercat now
Last edit: 16 May 2022 15:15 by ftree.

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

More
16 May 2022 15:19 - 17 May 2022 22:32 #243085 by ftree
I have forked linuxcnc-ethercat with a view to add Meca500 support

github.com/djsftree/linuxcnc-ethercat/
 
Last edit: 17 May 2022 22:32 by ftree.

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

More
17 May 2022 21:33 - 18 May 2022 20:14 #243205 by ftree
I've been reviewing the other hardware in src

If anyone is able to review the direction i'm going in I would be very grateful.

github.com/djsftree/linuxcnc-ethercat/commits/master
Last edit: 18 May 2022 20:14 by ftree.

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

Time to create page: 0.391 seconds
Powered by Kunena Forum