are non cuboid soft limits possible?

More
22 Jun 2017 17:55 #94795 by mechatroptik rainer
Hi,

There are two obstacles in my gantrymachine that I want to avoid to crash by some soft limit. This can't be done by using just min /max values of each individual axis in the ini-File. The forbidden space can be describe in the form "if Z is more than 123 then Y is not allowed to be less than 456"
Is there a way to do that?

Thank you in advance.

Regards
Rainer

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

More
22 Jun 2017 18:12 #94797 by Todd Zuercher
No, there is no provision for this in Linuxcnc. But that does not mean that it can't be done. I think that with some clever hal coding you could restrict movement to that area, but there still will be no pre-checking of moves (such as the warning you get when you load a file that exceeds a soft limit.)
The following user(s) said Thank You: mechatroptik rainer

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

More
22 Jun 2017 19:07 #94799 by Todd Zuercher
Something like this:
loadrt comp count=2
loadrt and2 count=1
loadrt message names=restricted.0 messages=Movement Restricted

addf comp.0  servo-thread
addf comp.1  servo-thread
addf and2.0  servo-thread
addf restricted.0  servo-thread

setp comp.0.in0 123
setp comp.1.in0 456

net z-rest <=comp.0.out => and2.0.in0
net y-rest <=comp.1.out => and2.0.in1
net z-pos <= axis.2.joint-pos-cmd => comp.0.in1
net y-pos <= axis.1.joint-pos-cmd => comp.1.in1
net restrict <= and2.0.out => restricted.0.trigger => motion.feed-inhibit
This is only an example piece of code, it will need to be modified to fit in with your existing hal file.
The following user(s) said Thank You: mechatroptik rainer

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

More
22 Jun 2017 20:24 #94806 by andypugh
It _might_ work to restrict the joints as well as the axes, if it is the machine geometry that is the problem.

Otherwise some sort of HAL component to set feed-inhibit when outside the allowed polyhedron might work.

I have long thought that the axis limits should be optionally defined by an STL file.
The following user(s) said Thank You: mechatroptik rainer

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

More
22 Jun 2017 22:36 #94812 by mechatroptik rainer
Thank you!

I'll Try Todds Idea.

Andy, I'm not sure if I understood you correctly. Machine geometrie is the problem in a ceratin sense. It's a gantry machine with trivial kinematics. But Y-Axis has additional contraints below a certain height.

Could that be solved by some trick in the kinematic description

Limits by STL would be great. I'm not sure how many ppl would actually use this.

Is it possible to draw additional lines in the axis 3D view? Like the wire-cuboid that visualizes machine limits.

Regards
Rainer

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

More
23 Jun 2017 12:47 #94833 by andypugh

Andy, I'm not sure if I understood you correctly. Machine geometrie is the problem in a ceratin sense. It's a gantry machine with trivial kinematics. But Y-Axis has additional contraints below a certain height.


In that case joint contstraints won't work.

If you consider something like a delta robot the working volume is a wierd shape in XYZ space, but is a simple max and min limit for each joint.
The following user(s) said Thank You: mechatroptik rainer

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

More
25 Jun 2017 18:53 #94938 by mechatroptik rainer
Hi,

it works!
My movement below a Z-Height of 129.7 mm is restricted to a Y-range between 24.9 mm and 473.7 mm

Here is the tested code.

Thank you again!

regards
Rainer
loadrt comp count=3
loadrt and2 count=2
loadrt or2 count=1
loadrt message names=restricted.0 messages="Movement Restricted"

addf comp.0  servo-thread
addf comp.1  servo-thread
addf comp.2  servo-thread
addf and2.0  servo-thread
addf and2.1  servo-thread
addf or2.0  servo-thread
addf restricted.0  servo-thread

setp comp.0.in1 129.7
setp comp.1.in1 24.9
setp comp.2.in0 473.7

net z-pos <= axis.2.joint-pos-cmd => comp.0.in0
net y-pos <= axis.1.joint-pos-cmd => comp.1.in0 => comp.2.in1

net z-rest <= comp.0.out => and2.0.in0 => and2.1.in0
net y-rest <= comp.1.out => and2.0.in1
net y-rest2 <= comp.2.out => and2.1.in1

net rest-ymin and2.0.out => or2.0.in1
net rest-ymax and2.1.out => or2.0.in0
net restrict <= or2.0.out => restricted.0.trigger => motion.feed-inhibit
The following user(s) said Thank You: Todd Zuercher, tommylight

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

More
25 Jun 2017 21:10 #94945 by Todd Zuercher
Thanks for posting your successful code for others to see.

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

Time to create page: 0.084 seconds
Powered by Kunena Forum