Incremental Adjustment of Work Coordinates

More
18 Jan 2013 01:14 #28786 by Todd Zuercher
I would like to add a way to incrementally change offsets, or work coordinates. Ideally I would like pyvcp(or similar) panel with a series of buttons similar to jog buttons for making small adjustments in depth and centering. Is such a thing possible?

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

More
19 Jan 2013 01:25 #28807 by ArcEye
Hi

Those things are easily achievable when in manual or MDI mode, the pyvcp buttons can just link to a halui MDI line in the .ini file
linuxcnc.org/docs/2.5/html/gui/halui.html

When in Auto mode is when it gets more complicated
See this recent thread www.linuxcnc.org/index.php/english/forum...ut-to-set-a-variable

I haven't had time to fully test the component I wrote, to evaluate the consequences of different MDI commands.
Some commands did not bring about the anticipated results in an Axis sim, and I was unclear as to why.
I will post it if I get it working to my satisfaction, albeit it takes a MDI line in a dialog, rather than a button press, so as to be completely generic.

Another way around it is to put M0 commands where you need to adjust, stop linuxcnc, do the adjustment, then start the spindle manually and do a Run From Line (using the M0 line number) which then just requires a click on the Pause button to resume.

regards

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

More
19 Jan 2013 04:33 - 19 Jan 2013 04:43 #28808 by Todd Zuercher
While it would be nice to be able to make an adjustment while in auto mode, that was not really what I was after. This is on a router doing wood carving. At the end of the run the machine parks at machine 0. The machine operators are complaining that the touch off system as it is, is tedious for making small adjustments for carving depth and centering, something they must do frequently in this application. As it is now they must either jog to the part zero (or where they want it moved to) and then touch off, or they must do the math to calculate what the new offsets will be and input them. What they would like would be a way to click an incremental jog button to shift the offset the few thousandths, or what ever they need.

This doesn’t need to happen during an auto mode operation, just between part runs.

I thought that I could set up a pyvcp panel that would have a jog increment box (similar to the one in Axis) and series of positive and negative buttons for each axis (XYZW on this machine) that would call a halui Gcode command that would be something like(for a Z axis adjustment G10 L2 P0 Z(current offset + chosen increment). What I don't understand how to do is make the variables that look up the current offsets, add the increment, and put it into the Gcode.

On a less important note is there any real difference between doing something like this in the tool offset panel vs machine coordinates?
Last edit: 19 Jan 2013 04:43 by Todd Zuercher.

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

More
19 Jan 2013 19:16 - 19 Jan 2013 23:57 #28817 by ArcEye
Hi

What I don't understand how to do is make the variables that look up the current offsets, add the increment, and put it into the Gcode.


I think the easiest way to do it is to work in Machine co-ordinates from Work co-ordinates zero say, and then zero your Work co-ordinates once in the correct place.

For instance G53 G0 X[#5221 + 1] Y[#5222 +1] will move by the current offset of G54 plus 1 unit, ie move +1 unit in G54 for X and Y - so there is your jog +
Then using G10 L20 P1 X0 Y0 will touch off X and Y to zero at the new location and #5221 and #5222 will be increased by 1 each - there is your reset co-ordinates button
All the buttons can be linked to a halui.mdi-command.NN
(you will probably need to reload the file, to get gremlin to update the plot)

Alternately if doing it from Machine Zero, you could use G10 L2 P1 X[#5221 +/- 1] to jog the offset and G54 G0 X0 to go to the new offset
(obviously because you are directly changing the offset you do not need to touch off, just go there)


The relevant parameter numbers are
5161-5169 “G28” Home
5181-5189 “G30” Home
5211-5219 “G92” offset
5220 Coordinate System NumberG54 G0 X0
5221-5229 Coordinate System 1
5241-5249 Coordinate System 2
5261-5269 Coordinate System 3
5281-5289 Coordinate System 4
5301-5309 Coordinate System 5
5321-5329 Coordinate System 6
5341-5349 Coordinate System 7
5361-5369 Coordinate System 8
5381-5389 Coordinate System 9

On a less important note is there any real difference between doing something like this in the tool offset panel vs machine coordinates?


I take it you mean having spoof tool settings that are increments offset from tool 1.
In practice no difference, except that the above is far more flexible and doesn't require a crystal ball to know in advance what movements you might want, you just jog until there and then re-set

regards
Last edit: 19 Jan 2013 23:57 by ArcEye.

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

More
19 Jan 2013 20:37 - 20 Jan 2013 01:07 #28824 by ArcEye
This is a quick demo of the above, works fine in a sim for moving the G54 offset and then physically moving to the new X0 Y0 or Z0

You would have to adapt it to your actual requirements




and the .ini .hal and .xml code


File Attachment:

File Name: alter-offs...yvcp.txt
File Size:2 KB



regards

PS I see you have asked the same question on the users list, so between this and the answers on there you should have plenty of strategies for doing what you want
Attachments:
Last edit: 20 Jan 2013 01:07 by ArcEye.
The following user(s) said Thank You: Todd Zuercher

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

More
23 Jan 2013 01:34 #28980 by Todd Zuercher


Here is what I set up.

The attached "Offset Jog Buttons.txt" file is the XML file with the ini and hal file bits tacked on the end.
Attachments:
The following user(s) said Thank You: reymon

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

More
23 Jan 2013 17:57 #29012 by ArcEye
Well done Todd,

That has taken my simple panel to the next level and then some.
Glad you were able to make use of the concept

regards

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

More
23 Jan 2013 20:42 #29022 by BigJohnT
Todd,

That is an excellent screen... I forgot we even had tabs.
John

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

Time to create page: 0.248 seconds
Powered by Kunena Forum