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

More
15 Jun 2024 15:08 #303051 by eduard
I need your assistance with the homing process as I seem to be stuck. I have thoroughly reviewed the documentation and forums, but I cannot find the solution, and I do not understand why it is not working.This is not the first CNC I have built, but it is the first with LinuxCNC. The concepts of soft and hard limits are clear to me, but I do not understand their configuration and cannot achieve what I want. My goal is to home all axes to 0,0,0 using the servo's internal homing system, which then passes the coordinates to LinuxCNC. This part is working.Here's the process I want to achieve:
  • The machine should move within the specified hard limits when it is not homed. This is not working.
  • All axes should home during the homing process. This is working.
  • After homing, the machine should return with a 5mm offset where the soft limit starts. This is not working. 
    • HOME_OFFSET = 5 not working. 
  • The soft limit should be 5mm less than the hard limit on all axes. This is not working.

    Really hard to understad what is the linuxcnc's theory behind softlimits. Hardlimits are clar, working as expected. 
Attached are the INI and HAL files.
Attachments:

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

More
15 Jun 2024 15:55 #303053 by tommylight
Point 1 can be made to work granted there are no tandem axis/joints, bit sure uf this has to be deleted or added under TRAJ in the ini file
kinematics = both
Or something similar, sorry on the phone.
Home offset is usually -5 as it is the exact switch location, and if you want the dro to show 0 after homing. This is for searching in negative direction, or when the home switches are at machine 0.0.

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

More
15 Jun 2024 16:03 #303054 by Aciera

The machine should move within the specified hard limits when it is not homed. This is not working.

If the machine is not homed the controller has no idea where an axis is so if you enable jogging before homing then the operator will be able to jog the machine into the limit switches.

After homing, the machine should return with a 5mm offset where the soft limit starts. This is not working. 
[*]HOME_OFFSET = 5 not working.


Have you tried:
HOME = 5.00
HOME_OFFSET = 0.00
HOME_SEQUENCE = 1
# 0 Absolute encoder, joint does not use an absolute encoder
# 1 Absolute encoder, final move to [JOINT_n]HOME
# 2 Absolute encoder, NO final move to [JOINT_n]HOME
HOME_ABSOLUTE_ENCODER = 1

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

More
15 Jun 2024 16:44 #303057 by Aciera

Point 1 can be made to work granted there are no tandem axis/joints, bit sure uf this has to be deleted or added under TRAJ in the ini file
kinematics = both

We need to make a distinction between jogging before homing and jogging in joint mode after homing.
The following user(s) said Thank You: tommylight

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

More
15 Jun 2024 17:20 #303061 by tommylight
LinuxCNC can and will jog before homing, at least it always did, or did something change that i am not aware of ?
ONLY tandem axis will not jog before homing, and even that can be bypassed by removing kinstype=BOTH in the TRAJ section.
Just in case this has changed, i am strongly against it.

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

More
15 Jun 2024 17:59 #303063 by eduard
Thanks,
The first point if fair enough, so I have to disable jogging while it is not homed.
On the second point, Yes, I tried the exact setup, just HOME_ABSOLUTE_ENCODER = 1, since the modified homing will move all the axis, and when it is homed, I need homing without movement. But after the homing, soflt limix reaching kicks in. I dont really understand why, and how soflt limits working in this exact situation.
From manual is clear, the AXES_n are used after the machine homed, and JOINT_n before, in joint mode. But where are the soflimits then?

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

More
15 Jun 2024 18:18 #303064 by eduard
I have tandem axes, but they are configured outside lcnc, in servo drives gantry function. This is why TRAJ using XYZ.

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

More
15 Jun 2024 19:05 - 15 Jun 2024 19:06 #303066 by Aciera
Just noticed this in your ini file:

[AXIS_X]
#Softlimit
MIN_LIMIT = 5.00
MAX_LIMIT = 1395.00
MAX_VELOCITY = 400.0
MAX_ACCELERATION = 4000.0

#Joint coordinate. Must be equal or bigger than working coordinates.
[JOINT_0]
TYPE = LINEAR
AXIS = X
#Hardlimit
MIN_LIMIT = 0.00
MAX_LIMIT = 1400.00


Not sure why you chose to use different limits for joint and axis but if your home position is at 0 then you would get a limit violation warning immediately after homing since then the axis limits are enforced and 0 would be outside those.
In my opinion there is no real advantage  in having different values for joint/axis limits in a trivial cartesian machine setup but you may have your reasons.
Also I would use the term 'hard limit' for the position of the limit switches while Joint and Axis limits are both 'soft limits'.
Last edit: 15 Jun 2024 19:06 by Aciera. Reason: wording

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

More
15 Jun 2024 19:22 #303067 by paul_chx
Hello Eduard!
I am currently fiddling around with a similar system too, just using the EL7 drives instead of the EL8 - but the communication protocols are the same as far as I can see.
You write that you got the drives internal homing routine to work with Marco Reps' el8homecomp - are you sure of that? When I tried his component yesterday I could never see the opmode (pin "opmode-display") change from CSP (value 8) to HM (value 6). And the limits that I had set for homing velocity and homing acceleration were clearly disregarded - the drive would simply drive the axis to zero at 6000rpm and maximum achievable accelleration. Luckily I had nothing connected to the motors shaft...
So currently this problem remains unresolved for me, too.
Have a nice evening!
Paul

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

More
15 Jun 2024 19:36 - 15 Jun 2024 20:08 #303069 by eduard
Here is the latest INI.
 

File Attachment:

File Name: qtdragon_h...15-4.ini
File Size:7 KB


still having the error when powering off linuxcnc:
Exceeded POSITIVE soft limit on Joint_2 (0.000000)

After turn it on, the axes are homed and not be able to move a joint, neither homing again ewen if I unhomed the machine. So I have to shut it down, open lcnc again and now I can homing. But when it runs, never run into soft limit error, just very very close to limitswitch. 

Actually I tought the AXIS is soft limit, JOINT is hard limit, but not that case. I need something to have when softlimit is smaller area than hardlimit and machine not even close to limit switch. It is so basic, I'm sure lcnc has to have, and I'm suprised why it is so hard to find.
Attachments:
Last edit: 15 Jun 2024 20:08 by eduard.

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

Time to create page: 0.218 seconds
Powered by Kunena Forum