Soft Limit Box
- Kirk_Wallace
- Offline
- Senior Member
Less
More
- Posts: 64
- Thank you received: 4
05 Feb 2013 04:21 #29598
by Kirk_Wallace
Soft Limit Box was created by Kirk_Wallace
I've been playing with the Gremlin soft limits and found something suspicious. If I zero the all the coordinates G53 (home), G5xs and the tool table offsets (using gedit on tool.tbl and emc.var), then load AXIS 2.5 sim, I can jog to the soft limit as set in the .ini file. If I only change, lets say, the offset of T1 and turn on offsets with G43 the limit box doesn't change position and I can jog beyond the limit until the tool stops where the limit should be when considering the tool offset. It seems to me the limit box should shift when tool offsets change?
--
Kirk
www.wallacecompany.com/machine_shop/
--
Kirk
www.wallacecompany.com/machine_shop/
Please Log in or Create an account to join the conversation.
05 Feb 2013 06:24 #29609
by BigJohnT
Replied by BigJohnT on topic Soft Limit Box
I think that is an update issue and see that in Axis too IIRC.
John
John
Please Log in or Create an account to join the conversation.
- Kirk_Wallace
- Offline
- Senior Member
Less
More
- Posts: 64
- Thank you received: 4
05 Feb 2013 08:23 #29617
by Kirk_Wallace
Replied by Kirk_Wallace on topic Soft Limit Box
I put a line in glcanaon under "if self.get_show_limits():" to "print 'Hello'", and got a "Hello" on just about any change or pan of the screen, so updating doesn't seem like a problem, unless you are talking about updating of the data that show_limits uses. I think the data comes directly from linuxcnc.stat .
I'm collecting information here: wiki.linuxcnc.org/cgi-bin/wiki.pl?Gremlin
The start of drawing the limit box is:
...
# Draw 3d box at soft limits for X, Y, and Z axes
glVertex3f(x_dir * machine_limit_min[0], machine_limit_min[1], machine_limit_max[2])
glVertex3f(x_dir * machine_limit_min[0], machine_limit_min[1], machine_limit_min[2])
...
It may need to be something like:
...
# Draw 3d box at soft limits for X, Y, and Z axes
glVertex3f(x_dir * machine_limit_min[0] - current_tool_offset[0]...
...
The blue active coordinate system origin symbol my have issues too, but I'm still trying to sort things out.
--
Kirk
www.wallacecompany.com/machine_shop/
I'm collecting information here: wiki.linuxcnc.org/cgi-bin/wiki.pl?Gremlin
The start of drawing the limit box is:
...
# Draw 3d box at soft limits for X, Y, and Z axes
glVertex3f(x_dir * machine_limit_min[0], machine_limit_min[1], machine_limit_max[2])
glVertex3f(x_dir * machine_limit_min[0], machine_limit_min[1], machine_limit_min[2])
...
It may need to be something like:
...
# Draw 3d box at soft limits for X, Y, and Z axes
glVertex3f(x_dir * machine_limit_min[0] - current_tool_offset[0]...
...
The blue active coordinate system origin symbol my have issues too, but I'm still trying to sort things out.
--
Kirk
www.wallacecompany.com/machine_shop/
Please Log in or Create an account to join the conversation.
05 Feb 2013 19:56 #29637
by BigJohnT
Replied by BigJohnT on topic Soft Limit Box
If the tool limits box uses the min/max limit from stat and that is just the [AXISn] MAX_LIMIT and MIN_LIMIT that explains why I get limit errors sometimes on my machines but it runs anyway.
John
John
Please Log in or Create an account to join the conversation.
- Kirk_Wallace
- Offline
- Senior Member
Less
More
- Posts: 64
- Thank you received: 4
06 Feb 2013 03:04 #29668
by Kirk_Wallace
Replied by Kirk_Wallace on topic Soft Limit Box
As far as I can tell, Gremlin just uses the Python interface variables
www.linuxcnc.org/docs/html/common/python...ding_linuxcnc_status
to create a display. I would think actual errors would come from the interpreter?
I shifted the limit box,
wiki.linuxcnc.org/cgi-bin/wiki.pl?Gremlin
now to fix the grid?
www.linuxcnc.org/docs/html/common/python...ding_linuxcnc_status
to create a display. I would think actual errors would come from the interpreter?
I shifted the limit box,
wiki.linuxcnc.org/cgi-bin/wiki.pl?Gremlin
now to fix the grid?
Please Log in or Create an account to join the conversation.
06 Feb 2013 07:48 #29674
by BigJohnT
Replied by BigJohnT on topic Soft Limit Box
I didn't even know we had a grid!
John
John
Please Log in or Create an account to join the conversation.
06 Feb 2013 18:02 #29697
by andypugh
The joints should jog to the same positions regardless of tool length. A long boring tool (for example) should potentially be allowed all the way up the lathe spindle.
I think you are saying that the soft limits are acting like a bounding box on the controlled point, not on the axis endstops?
Replied by andypugh on topic Soft Limit Box
I am not sure what you are describing.I can jog to the soft limit as set in the .ini file. If I only change, lets say, the offset of T1 and turn on offsets with G43 the limit box doesn't change position and I can jog beyond the limit until the tool stops where the limit should be when considering the tool offset. It seems to me the limit box should shift when tool offsets change?
The joints should jog to the same positions regardless of tool length. A long boring tool (for example) should potentially be allowed all the way up the lathe spindle.
I think you are saying that the soft limits are acting like a bounding box on the controlled point, not on the axis endstops?
Please Log in or Create an account to join the conversation.
- Kirk_Wallace
- Offline
- Senior Member
Less
More
- Posts: 64
- Thank you received: 4
09 Feb 2013 06:21 #29798
by Kirk_Wallace
Replied by Kirk_Wallace on topic Soft Limit Box
For the physical tool, the function is correct. I'm speaking about the Gremlin backplot display. It seems glcanon.py uses the soft limit boundary from the .ini limit values to draw the limits relative to G53, but doesn't take into account the tool offsets. I added the offsets to the limit drawing code and I works properly, except I also should account for the G92 offsets too. This shifts the limit lines (dotted red) but the grid is drawn by a different function and is harder to figure out. Since the lathe cuts real parts properly, the backplot will be on the back burner until I can put some time into learning more about OpenGL and glcanon.
--
Kirk Wallace
www.wallacecompany.com/machine_shop/
--
Kirk Wallace
www.wallacecompany.com/machine_shop/
Please Log in or Create an account to join the conversation.
Time to create page: 0.118 seconds