HAL CiA402 Drive Interface for Can Bus,Ethercat etc...

More
24 Mar 2022 07:20 #238200 by rodw
Well, this is interesting. Homing is now able to be a user defined module thanks to Dewey Garrett
github.com/LinuxCNC/linuxcnc/commit/08ac...b0cd47dc0eedfbc36785

Docs:  linuxcnc.org/docs/devel/html/man/man9/homecomp.9.html

This sounds like what is required.
 

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

More
28 Mar 2022 23:03 - 28 Mar 2022 23:06 #238562 by sqmathlete
Hi Rod,

Thanks for you're very detailed instructions on how to install ethercat and linuxcnc . Worked perfectly!

Also, I totally agree, this github.com/LinuxCNC/linuxcnc/commit/08ac...b0cd47dc0eedfbc36785  
is very interesting. I think this would be way more elegant than forcing the code to ignore the homing error and would keep everything in one place rather than spread out over several files. Being able to eliminate having to create an ini variable and allow one to focus on dropping through the homing states is also nice.  Thanks Garret Dewey! 

I've posted my homing.c file, it's a bit of a mess but you can see how I dropped through the homing states.

Dan 


 

File Attachment:

File Name: homing.h
File Size:3 KB

File Attachment:

File Name: homing_2022-03-28.c
File Size:47 KB
Attachments:
Last edit: 28 Mar 2022 23:06 by sqmathlete. Reason: Linked whole paragraph

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

More
28 Mar 2022 23:08 #238563 by sqmathlete
The previous homing.c file name  looked weird. Try this one.

File Attachment:

File Name: homing_2022-03-28-2.c
File Size:47 KB
Attachments:

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

More
05 Apr 2022 19:03 #239369 by bkt
sorry at all .... but can mix old style lcec xml with cia402 style like these?
  <slave idx="0" type="generic" vid="000007DD" pid="01" configPdos="true">
    <sdoConfig idx="6060" subIdx="0"><sdoDataRaw data="08"/></sdoConfig>
    <sdoConfig idx="60C2" subIdx="1"><sdoDataRaw data="01"/></sdoConfig>
    <sdoConfig idx="60C2" subIdx="2"><sdoDataRaw data="FD"/></sdoConfig>
    <sdoConfig idx="607E" subIdx="0"><sdoDataRaw data="E0"/></sdoConfig>
    <syncManager idx="0" dir="out"></syncManager>
    <syncManager idx="1" dir="in"></syncManager>
    <syncManager idx="2" dir="out">
      <pdo idx="1601">
        <pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="driverControl" halType="bit"/>
        <pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="posCommand" halType="float" scale="71750"/>
      </pdo>
    </syncManager>
    <syncManager idx="3" dir="in">
      <pdo idx="1A01">
        <pdoEntry idx="603F" subIdx="00" bitLen="16" halPin="errorStat" halType="bit"/>
        <pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="driverStatus" halType="bit"/>
        <pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="posActual" halType="float" scale="0.000013937"/>
        <pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="velActual" halType="float" scale="0.000013937"/>
        <pdoEntry idx="6077" subIdx="00" bitLen="16" halPin="torkStat" halType="float" scale="0.1"/>
      </pdo>
    </syncManager>
    <dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="500000"/>
    <slave idx="1" type="generic" vid="000007DD" pid="01" configPdos="true">>
      <dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
      <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>

or need to set all axis with new cia402_comp  (in hal and in xml) ??

regards
bkt

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

More
05 Apr 2022 20:03 - 05 Apr 2022 20:05 #239375 by rodw
CiA402 is a standard that specifies a set of registers and what they do.
So yes, you still need to define them in the ethercat xml file in the first instance.
The cia402.comp of Dominic's brings that standard structure into hal.

sqmathelete (Dan) and I are working on a replacement homing module using the new homecomp.comp in master branch.
Don't hold your breath as its very early days.
If we are successful, the cia402.comp will be likely redundant. It still relies on standard homing.c and it makes a mess of what is needed to home internally so the ability to install our own version of homing.c in the ini file will be very exciting.

EDIT: But the amazing foundation work by Dominc in cia402.comp is a very important part of the proposed module.
Last edit: 05 Apr 2022 20:05 by rodw.
The following user(s) said Thank You: bkt

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

More
05 Apr 2022 22:06 #239395 by bkt
thanks rodw .... my xml is a mix of xml cia402 and old style xml for ethercat conf .... is possible use it or not? because i receive error and not understand if is related or not.

regards

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

More
05 Apr 2022 22:46 #239397 by rodw
Yes, I believe so. You just need to make sure the pins required by the component are defined by SDO's in your XML

Dominic has an example XML on his repo

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

More
16 Jun 2022 07:24 - 16 Jun 2022 08:48 #245247 by udoS
Hi to all;

I think I mentioned it somewhere else in some linuxcnc forum but...

Now this is not an open source thing but it works and solves the problem with the CIA402;
www.axelsw.it/pwiki/index.php/Motion_Axis_Setup

best regards
 
Last edit: 16 Jun 2022 08:48 by udoS.

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

Time to create page: 0.277 seconds
Powered by Kunena Forum