Soft limits with non trivial kins

More
26 May 2022 20:19 #243942 by LearningLinuxCNC
I am having an issue where I can jog or mpg into the soft limits on my machine when not in trivial kins. The machine has a tilting spindle head so when the B axis is at any position other than 0 I can jog or mpg into the soft limits. When at B is at 0 the soft limits work just as expected.

Once on the soft limits I have to unhome and rehome the machine to get it to work again.

Any thoughts on this issue.

If this belongs in the Kinematics section I can post there also?

Thanks,

Jim

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

More
27 May 2022 04:02 #243966 by Henk
We have the same problem but I have not investigated a fix yet. Ther are Hal pins for the soft limits that can be changed

I don't think you need to unhome to recover though, you can switch to joint mode and jog back into the tilted b working space and switch back

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

More
27 May 2022 18:54 - 27 May 2022 18:55 #244018 by LearningLinuxCNC
I did not implement switchkins in my kinematics module. Is there a way to switch to joint mode without switchkins?

The only way I have found is to uhome and rehome.

I thought the soft limits were to keep you from exceeding a limit and getting stuck (can't move the machine) like I am right now. I guess the soft limits for the axis is only checked against a jog or mpg move and the joint is not checked. That is what it appears anyway.

It is checked and throws the error and locks up the machine. Is there an override for soft limits like there is for hard limits?

I don't see these pins for the soft limits that you are talking about. What hal module are they in?
Last edit: 27 May 2022 18:55 by LearningLinuxCNC. Reason: typo.

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

More
30 May 2022 22:41 #244244 by andypugh
Which kinematics are you using?

I have to say that I would rather expect the joint limits to be enforced in joint mode, and the axis limits in axis mode.

When you say "not in trivial kins" do you mean joint mode, ie before homing?

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

More
30 May 2022 23:29 #244248 by LearningLinuxCNC
It is a custom kins file.

When I say not trivial kins I mean there is an adjustment in the joint position vs the axis position. It has a tilting head B axis. if the B axis is at 0 degrees it is essentially trivial kins and the joints and axis movements are the same.

When the head tilts the x axis, joint 0 and the z axis, joint 2 are adjusted to keep the tool tip at the same point in the xyz coordinate system. With a long tool this can cause large discrepancies in the x axis and joint zero limits. As such I can easily jog into the joint soft limits on joint 0 and joint 2.

I can attach the kins file but it will be a couple days as I am away from the machine for now.
The following user(s) said Thank You: Henk

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

More
31 May 2022 08:34 #244266 by andypugh

When the head tilts the x axis, joint 0 and the z axis, joint 2 are adjusted to keep the tool tip at the same point in the xyz coordinate system. With a long tool this can cause large discrepancies in the x axis and joint zero limits. As such I can easily jog into the joint soft limits on joint 0 and joint 2.

Yes, this is a long-standing limitation in need of a real fix. 
I think that the docs somewhere suggest that the axis limits need to be set to account for the joint limits. But when axis limits are just a simple box this is rather limiting, even before tool length enters the problem. 

Continuous jogs are executed as a move to the relevant _axis_ limit, that is aborted when the key is released. (I am not sure how wheel jogging works). I think what would be needed would be a call to the kinematics function when this is set up to check the joint limits too. However what the system does if there is a problem is hard to decide. Finding the point on an axis move where a joint limit is found could be non-trivial for some kinematics. There might even be multiple solutions (in a mathematical sense) 

Wheel-jogging feels like it should be easier to fix than keyboard / button jogging. Which jog type are you using? 

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

More
01 Jun 2022 15:07 #244377 by LearningLinuxCNC
I was thinking that I could make X axis And Z axis limit adjustment pins in the kins module. Then in HAL I could add the adjustment to the ini limits. I don't see any way to do this in HAL. Motion does not have pins to set limits that I see.

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

More
01 Jun 2022 15:32 - 01 Jun 2022 16:14 #244378 by Aciera
IF I remember correctly an adjustment of the INI limit values requires a "queue buster" which means that the motion planner cannot continuously be fed with updated limit values. One way I have thought of dealing with this is to continuously calculate the limits according to joint positions and then use feed override to avoid hitting any hard limits during jogging. So calculation in the kinematic file and a connection from there to HAL.
But as andy says the calculation of the limits might well become more complex then the calculation of the forward/inverse kinematics.
Getting the existing motion planner to find limit violations for non trivial kinematics in the look ahead is not going to an easy task because the custom kinematic is just transforming the finished output of the planner.
To find limit violations before actually running a gcode requires a simulation of the code before running it on the actual machine.

The way I deal with this is to change the affected ini values for the axis limits to large values when using non trivial kinematics and changing them back when switching back to trivial kinematics. This can be done in a custom MCode.

An example for limit value switching can be found here: github.com/LinuxCNC/linuxcnc/tree/master...xis/vismach/millturn
Last edit: 01 Jun 2022 16:14 by Aciera.

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

Time to create page: 0.093 seconds
Powered by Kunena Forum