Help Needed: Cracking the Code on LinuxCNC Servo Homing Setup!

More
16 Jun 2024 11:42 #303101 by rodw
Yes, onceinternal homing is used, most additional features are obseleted. 
Home offset is probably supported by your servo's homing methods.
Marcoreps uses a CIA402 compatible drive and the standard offers many homing types.
This one looks like  a home offset to me.
 

Check your documentation for your drive.
Attachments:
The following user(s) said Thank You: Aciera

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

More
16 Jun 2024 13:33 - 16 Jun 2024 13:38 #303108 by eduard

Looking at the default 'motion/homing.c' it may not be all that much work to get it to work:


It would be nice to use most of the lcnc features where is not absolutely necessary to use the servo internal features. But implementing the home offset is out of my knowledge. And the soft limit as well.
Last edit: 16 Jun 2024 13:38 by eduard.

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

More
16 Jun 2024 13:36 - 16 Jun 2024 13:38 #303109 by eduard

Yes, onceinternal homing is used, most additional features are obseleted. 
Home offset is probably supported by your servo's homing methods.
Marcoreps uses a CIA402 compatible drive and the standard offers many homing types.
This one looks like  a home offset to me.


This is the exact method what I'm using now to home the drives. Starting with high velocity to search the limit switch, when found turn the direction with low speed and looking for encoder Z signal. Then stops. And send homed to lcnc.

If I'm using the internal offsets, I'll miss the opportunity to use lcnc softlimits, which is important. (If I'm right. Not sure.)
Last edit: 16 Jun 2024 13:38 by eduard.

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

More
16 Jun 2024 13:57 #303110 by paul_chx
Can anybody confirm that their drives are really switching to homing mode (opmode-display==6) when using the el8_homecomp.comp? Mine don't. And therefore the set homing velocity and acceleratin limits aren't respected - actually the drives internal homing routine isn't ever used at all.

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

More
16 Jun 2024 16:07 #303115 by Aciera

But implementing the home offset is out of my knowledge

If you want you could give the modified component in the attached folder a try.
halcompile the component el8_homecomp_mod
and then change the name in your ini fromHOMEMOD=el8_homecomp

to
HOMEMOD=el8_homecomp_mod
The modified component compiles on my system but I cannot test anything due to a lack of hardware.
Note this assumes that 'cia402.0.pos-fb' is reset to zero by the homing procedure, if that is not the case we could try the other option used in homing.c, so please check if that pin is reset to zero or not.
 
Attachments:
The following user(s) said Thank You: eduard, DPFlex

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

More
16 Jun 2024 19:32 #303122 by rodw
First there was cia402.comp
Then came custom homing.
marcoreps forked the cia402.comp from here
github.com/dbraun1981/hal-cia402
It definitely switches to homing mode but it was developed on a drive that homed to index 
But it never worked with cia402 external switches. I ried very hard before concluding changes to homing.c were required, then the homecomp was released.

I have also worked on a cia402 homecomp and was hoping it would become part of the ethercat repository in time and the need for cia402.comp would be obsoleted.
github.com/rodw-au/cia402_homecomp
 
The following user(s) said Thank You: DPFlex

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

More
16 Jun 2024 23:44 #303138 by eduard
Rod, nice documentation!
Could you explain what is the difference from Marco's implementation? From my point ow view, same file usage in ini and in hal. I did not dig deeper in code.
The offset is implemented in your version?

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

More
17 Jun 2024 07:43 - 17 Jun 2024 08:07 #303153 by Aciera

Could you explain what is the difference from Marco's implementation? From my point ow view, same file usage in ini and in hal. 


Yes, the components seem to me to be identical. 
1. set the 'joint.n.request_custom_homing' pin for all joints, which presumably sends the homing command to the drives through hal.
2. wait for the 'joint.n.custom_homing_finished', again presumably coming from the drives through a hal connection.
3. Zero the position values and homing is finished.

'home_offset' is not implemented.


[edit]
So i'd suggest you try the modified component I posted above regarding the implementation of 'home_offset' value and report back. Just remember I can't test anything regarding EtherCAT including homing so you'll have to supply as much feedback as possible.

[edit2]
Regarding switching between DEFAULT and CUSTOM homing, is there a hal pin coming from the drive that indicates whether the drive needs homing or do you want to do that manually with a custom gui panel button?
Last edit: 17 Jun 2024 08:07 by Aciera.

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

More
17 Jun 2024 08:06 #303154 by pippin88
Terminology might be an issue.

LinuxCNC uses the term MIN_LIMIT and MAX_LIMIT
These define the maximum travel LinuxCNC will allow/perform
These are soft limits - they are set in software. Soft limits = software limits.

Hard limits = hardware limits.
Usually set by limit switches, or sometimes hard stops.

LinuxCNC needs to know where the axis is in the world / in its travel.
This if what homing is for.
Homing switch can be outside the soft limits or inside the soft limits.

Where is your home switch (in relation to axis travel)?
Where are your limit switches?

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

More
17 Jun 2024 08:36 - 17 Jun 2024 08:37 #303157 by pippin88
Are you using limit switch at end of travel as a home switch and limit switch? (Combined home/limit switch).

LinuxCNC does not know where the hard limits are.
After homing, it knows where home is, and allowed travel in both directions (MIN_LIMIT and MAX_LIMIT).

So you don't tell LinuxCNC where the maximum hard limit is because there is no point - the only time you encounter a hard limit is when something is wrong. If your machine touches a hard limit, this is because LinuxCNC does not know where it is. For example lost steps or interference issues.

The homing docs explain these concepts with helpful pictures.
linuxcnc.org/docs/master/html/config/ini-homing.html
Last edit: 17 Jun 2024 08:37 by pippin88.

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

Time to create page: 0.098 seconds
Powered by Kunena Forum