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

More
4 years 7 months ago #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.19 KB

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

More
4 years 6 months ago #239369 by bkt
sorry at all .... but can mix old style lcec xml with cia402 style like these?
Code:
  <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
4 years 6 months ago - 4 years 6 months ago #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: 4 years 6 months ago by rodw.
The following user(s) said Thank You: bkt

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

More
4 years 6 months ago #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
4 years 6 months ago #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
4 years 4 months ago - 3 years 4 months ago #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.axelsoftware.it/en/logiclab/
I can hook the plc to the LinuxCNC HAL and do the homing with the drives; then let LinuxCNC take the actual pos;


best regards
 
Last edit: 3 years 4 months ago by udoS.

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

Time to create page: 0.282 seconds
Powered by Kunena Forum