Work with probe
- jcdammeyer
-
- Offline
- Senior Member
-
Less
More
- Posts: 70
- Thank you received: 5
11 Nov 2021 23:12 #226158
by jcdammeyer
Replied by jcdammeyer on topic Work with probe
My Vers PR Rev0.6 Probe arrived this week. I wired up the second PP DB25-15 pin as the Probe input and with the HAL meter confirmed that it goes TRUE when the probe is activated.
There are, what I would call, major issues with the versaprobe screen that I think need to be addressed. There's a misrepresentation of the system units on the screen. The jog buttons and the distance to jog say inches. The defaults for probing distances are all in millimeters. My machine is in inches. I can change the display units from inches to mm and that works but the jog distances don't change and I believe they should. I can issue a G21 and now theoretically I have a metric machine.
But in order to make the probe reach the correct location I still have to set the probe diameter to 0.0785" except only 3 decimals are allowed or accepted and so it's set to 0.078".
Changing the distance values is non-intuitive. A tab from that entry leaves say 0.2 but doesn't change anything. A CR must be entered to change it which then goes from say 0.2 to 0.200. A tab therefore should restore it to what it was to show it wasn't changed. Not only that put the mouse cursor onto one of the entry fields and click and nothing happens. If the MDI screen is active the cursor stays in the MDI field. But now the arrow keys on the keyboard increment/decrement the amount in that field by 1.000 increments. And the keyboard can change the values.
I believe that once the the spin box is clicked it should either change colour or the field should be highlighted in some way. If the tab key is allowed to leave the box then either the value reverts or is accepted in same way as the CR. An ESC should also leave the box and revert the value.
It would be nice if there was a way to set the XY values to 0 automatically after this although that would have to be optional too or it couldn't be used to measure length.
Anyway, it appears to be working.
John
There are, what I would call, major issues with the versaprobe screen that I think need to be addressed. There's a misrepresentation of the system units on the screen. The jog buttons and the distance to jog say inches. The defaults for probing distances are all in millimeters. My machine is in inches. I can change the display units from inches to mm and that works but the jog distances don't change and I believe they should. I can issue a G21 and now theoretically I have a metric machine.
But in order to make the probe reach the correct location I still have to set the probe diameter to 0.0785" except only 3 decimals are allowed or accepted and so it's set to 0.078".
Changing the distance values is non-intuitive. A tab from that entry leaves say 0.2 but doesn't change anything. A CR must be entered to change it which then goes from say 0.2 to 0.200. A tab therefore should restore it to what it was to show it wasn't changed. Not only that put the mouse cursor onto one of the entry fields and click and nothing happens. If the MDI screen is active the cursor stays in the MDI field. But now the arrow keys on the keyboard increment/decrement the amount in that field by 1.000 increments. And the keyboard can change the values.
I believe that once the the spin box is clicked it should either change colour or the field should be highlighted in some way. If the tab key is allowed to leave the box then either the value reverts or is accepted in same way as the CR. An ESC should also leave the box and revert the value.
It would be nice if there was a way to set the XY values to 0 automatically after this although that would have to be optional too or it couldn't be used to measure length.
Anyway, it appears to be working.
John
Please Log in or Create an account to join the conversation.
12 Nov 2021 06:52 #226193
by andypugh
Replied by andypugh on topic Work with probe
I think that a lot of what you describe is the Glade entry field behaviour, and is not especially easy to fix.
As for your perverse desire to machine in furlongs and cubits...![:-) :-)](/media/kunena/emoticons/smile.png)
I suspect that the original author started off coding for his own use and so imperial measurements were not considered at an early enough stage to make it seamless.
The pragmatic approach is probably to edit the underlying files. The Glade UI is controlled by a human-readable XML file, that can be directly edited to increase decimal places and hard-coded jog behaviour is probably set by entries in a Python handler.
As for your perverse desire to machine in furlongs and cubits...
![:-) :-)](/media/kunena/emoticons/smile.png)
I suspect that the original author started off coding for his own use and so imperial measurements were not considered at an early enough stage to make it seamless.
The pragmatic approach is probably to edit the underlying files. The Glade UI is controlled by a human-readable XML file, that can be directly edited to increase decimal places and hard-coded jog behaviour is probably set by entries in a Python handler.
Please Log in or Create an account to join the conversation.
- jcdammeyer
-
- Offline
- Senior Member
-
Less
More
- Posts: 70
- Thank you received: 5
12 Nov 2021 07:35 #226197
by jcdammeyer
Replied by jcdammeyer on topic Work with probe
Thanks Andy. Although you have the units incorrect I'm afraid. It's furlongs per fortnight. 8-)
I've not made it (slowly) through all 50 pages or so of postings on this subject. I did at least figure out why my Z axis was doing an operation twice.
I'll look into the coding to see if I can't make the diameter of the probe tip more accurate. I do like Serguei's probe. For the standard 3 arm type it's well built. Unlike some of the more expensive commercial ones though the probe isn't super long. It tapers in and then out against after the ball. Setting the correct height above the work before probing is important or the side of the probe hits rather than the ball.
And I do understand that at a certain point he really just wanted to get on with building things rather than writing software. And possibly EMC even got in the way of making something better.
However, overall, his touch screen is an impressive bit of work.
Not important if trying to find a center but critical if just finding two edges since the step over of half ball diameter might then be wrong.
I've not made it (slowly) through all 50 pages or so of postings on this subject. I did at least figure out why my Z axis was doing an operation twice.
I'll look into the coding to see if I can't make the diameter of the probe tip more accurate. I do like Serguei's probe. For the standard 3 arm type it's well built. Unlike some of the more expensive commercial ones though the probe isn't super long. It tapers in and then out against after the ball. Setting the correct height above the work before probing is important or the side of the probe hits rather than the ball.
And I do understand that at a certain point he really just wanted to get on with building things rather than writing software. And possibly EMC even got in the way of making something better.
However, overall, his touch screen is an impressive bit of work.
Not important if trying to find a center but critical if just finding two edges since the step over of half ball diameter might then be wrong.
Please Log in or Create an account to join the conversation.
12 Nov 2021 07:36 #226198
by Mokuleia
Replied by Mokuleia on topic Work with probe
Hi everyone,
I managed to be get my probe and toolsetter working in LCNC and can measure XY edges and Z via Probescreen V2. However, I can't get the manual tool change routine to start. Every time I hit the TS button in ProbescreenV2, I get a "#<_ini[axis_2]max_limit> not define" error. I attach my .ini and .hal. I hope someone can spot the issue.
Thanks!
I managed to be get my probe and toolsetter working in LCNC and can measure XY edges and Z via Probescreen V2. However, I can't get the manual tool change routine to start. Every time I hit the TS button in ProbescreenV2, I get a "#<_ini[axis_2]max_limit> not define" error. I attach my .ini and .hal. I hope someone can spot the issue.
Thanks!
Please Log in or Create an account to join the conversation.
- jcdammeyer
-
- Offline
- Senior Member
-
Less
More
- Posts: 70
- Thank you received: 5
12 Nov 2021 08:34 - 12 Nov 2021 08:35 #226202
by jcdammeyer
Replied by jcdammeyer on topic Work with probe
Check my message
forum.linuxcnc.org/49-basic-configuratio...obe?start=490#224431
I had issues with manual tool change not working. Go a bit further and I also posted how I got rid of the double up down at the tool change position. I'm no longer having issues with manual tool change.
However I haven't tried it from the probe screen. I'm using the Tx M6 G43 commands in the G code or just entering that command as a single line.
forum.linuxcnc.org/49-basic-configuratio...obe?start=490#224431
I had issues with manual tool change not working. Go a bit further and I also posted how I got rid of the double up down at the tool change position. I'm no longer having issues with manual tool change.
However I haven't tried it from the probe screen. I'm using the Tx M6 G43 commands in the G code or just entering that command as a single line.
Last edit: 12 Nov 2021 08:35 by jcdammeyer.
Please Log in or Create an account to join the conversation.
12 Nov 2021 16:38 #226229
by Roguish
Replied by Roguish on topic Work with probe
jcdammeyer,
which screen gui are you using? dragon? dragon_hd? or something custom? and which probe gui? basic or versa?
I'm trying to get probing and tool setting working in a slightly modified dragon (just enlarged to fit my screen) using a Tormach probe which is similar to the vers probe you just acquired.
I've run versa probe version 1 in axis for years and like it.
and the instructions are less than clear......
which screen gui are you using? dragon? dragon_hd? or something custom? and which probe gui? basic or versa?
I'm trying to get probing and tool setting working in a slightly modified dragon (just enlarged to fit my screen) using a Tormach probe which is similar to the vers probe you just acquired.
I've run versa probe version 1 in axis for years and like it.
and the instructions are less than clear......
Please Log in or Create an account to join the conversation.
- jcdammeyer
-
- Offline
- Senior Member
-
Less
More
- Posts: 70
- Thank you received: 5
12 Nov 2021 17:14 #226234
by jcdammeyer
Replied by jcdammeyer on topic Work with probe
The standard AXIS screen
And used git to pull probe-screen-ng-master (Probe Screen for LinuxCNC 2.8) on both the Pi4 which I use to have LinuxCNC on my lab bench for playing with stuff and on the PC based one connected to the Mill.
Once I figured out how to hide the panel the entire screen fit and other than annoying to flip it on and off. Would be nice if when the probe screen gets the focus that it automatically hides any panels.
I've also been reading through the Python code. Although like most Python code it's poorly documented where for the most part the the 'what' is fairly clear the 'why' is often obscure. It does read the .INI file to determine the units for the jog buttons. I'm sure there's probably a way to read the G20 or G21 state but I don't know how to do that.
[DISPLAY]
DISPLAY = axis
And used git to pull probe-screen-ng-master (Probe Screen for LinuxCNC 2.8) on both the Pi4 which I use to have LinuxCNC on my lab bench for playing with stuff and on the PC based one connected to the Mill.
Once I figured out how to hide the panel the entire screen fit and other than annoying to flip it on and off. Would be nice if when the probe screen gets the focus that it automatically hides any panels.
I've also been reading through the Python code. Although like most Python code it's poorly documented where for the most part the the 'what' is fairly clear the 'why' is often obscure. It does read the .INI file to determine the units for the jog buttons. I'm sure there's probably a way to read the G20 or G21 state but I don't know how to do that.
Please Log in or Create an account to join the conversation.
- jcdammeyer
-
- Offline
- Senior Member
-
Less
More
- Posts: 70
- Thank you received: 5
13 Nov 2021 17:49 - 13 Nov 2021 17:55 #226337
by jcdammeyer
Replied by jcdammeyer on topic Work with probe
Mokuleia,
I managed to get the TS working on that screen.
You said I get a
Notice the syntax of say the last line.
The G53 says use absolute machine coordinates.
The G0 says go at full speed.
The Z argument to the G0 is the axis to move.
the #<_ini part says use the INI file for your machine
the [TOOLSENSOR] is the group (in a programming language would be called the record or object)
the Z is the value held in that field
and the >] finish off the statement.
In your ini file you have
So your Z value is 60.
That means then that the last line of that positioning command is really
G53 G0 Z60
In my case if was
G53 G0 Z2
Remember these are absolute machine coordinates and my machine goes from 0.0 to -10.5 so when my TS command tried to go to +2.0 if failed with an out of range error. Therefore one thing you have to check is if the G53 G0 Z60 is even a valid move.
The other issue which causes your error message is that there is no [AXIS_2] group in your ini file.
you have [AXIS_Z] and [JOINT_2] record groups but no AXIS_2.
So check the macro file that is run when you click on TS and if it's using AXIS_2 for the Z axis change that to AXIS_Z.
I managed to get the TS working on that screen.
You said I get a
In my tool setter G-Code file to move to the tool change position a number of things happen.#<_ini[axis_2]max_limit> not define" error. I attach my .ini and .hal.
; Ensure we're in G90 / absolute mode
G90
; First go up & then move to tool sensor position
G53 G0 Z[#<_ini[AXIS_Z]MAX_LIMIT>+#<_ini[PROBE_SCREEN]Z_SAFE_TRAVEL_OFFSET>]
G53 G0 X[#<_ini[TOOLSENSOR]X>] Y[#<_ini[TOOLSENSOR]Y>]
G53 G0 Z[#<_ini[TOOLSENSOR]Z>]
Notice the syntax of say the last line.
The G53 says use absolute machine coordinates.
The G0 says go at full speed.
The Z argument to the G0 is the axis to move.
the #<_ini part says use the INI file for your machine
the [TOOLSENSOR] is the group (in a programming language would be called the record or object)
the Z is the value held in that field
and the >] finish off the statement.
In your ini file you have
[TOOLSENSOR]
# Absolute coordinates of the toolsetter pad
X = 10
Y = 10
# Absolute Z start search coordinates
Z = 60
# Maximum search distance and direction (sign)
That means then that the last line of that positioning command is really
G53 G0 Z60
In my case if was
G53 G0 Z2
Remember these are absolute machine coordinates and my machine goes from 0.0 to -10.5 so when my TS command tried to go to +2.0 if failed with an out of range error. Therefore one thing you have to check is if the G53 G0 Z60 is even a valid move.
The other issue which causes your error message is that there is no [AXIS_2] group in your ini file.
you have [AXIS_Z] and [JOINT_2] record groups but no AXIS_2.
So check the macro file that is run when you click on TS and if it's using AXIS_2 for the Z axis change that to AXIS_Z.
Last edit: 13 Nov 2021 17:55 by jcdammeyer. Reason: Spelling mistake
Please Log in or Create an account to join the conversation.
- jcdammeyer
-
- Offline
- Senior Member
-
Less
More
- Posts: 70
- Thank you received: 5
16 Nov 2021 05:44 #226624
by jcdammeyer
Replied by jcdammeyer on topic Work with probe
I have a problem. Trying to use the Probe ICON for Outside Length X. Starting in the middle between the two X edges it moves properly in the -X direction and finds the LH edge. Then it moves away, moves up, moves over to be above the LH edge. Then heads over in the +X direction to the RH edge.
Running that fragment of code interactively, setting the halcomp variables to the same ones in the probe screen and then displaying the line, creates the G-Code line below.
The same string is shown if I start LinuxCNC from terminal and embed a print statement to show the string 's'
I execute in the MDI screen those three lines from the X=0 LH edge position:
With the probe starting over the left end of the edge of the vise jaw and I zero the Shumatech DRO X axis when I run the above code one line at a time in the MDI the DRO shows 4.4000 at the end of the movement as expected (as does the LCNC DRO).
But if I move the probe to X=2.0 and then click the probe button to find the exact midpoint it moves to the LHS as expected, finds the left edge. Moves away, moves up, moves over to the X=0 position it determined was the edge, pauses for a fraction of a second and then heads over to the RHS to find the RH edge.
However it stops at 3.523, sends the Z down to prep for moving back to the left to find the RH edge. But instead touches the vise at that spot and faults. And leaves the system in G91 so it doesn’t clean house well.
No idea why. It's repeatable.
Any ideas how to even debug this since the string 's' argument to self.gcodes(s) works in MDI mode.
John
Running that fragment of code interactively, setting the halcomp variables to the same ones in the probe screen and then displaying the line, creates the G-Code line below.
# move X + 2 * edge_length + xy_clearance
tmpx = 2 * self.halcomp["ps_edge_length"] + self.halcomp["ps_xy_clearance"]
s = """G91
G1 X%f
G90""" % (
tmpx
)
if self.gcode(s) == -1:
return
>>> ps_edge_length = 2.1
>>> ps_xy_clearance = 0.2
>>> tmpx = 2 * ps_edge_length + ps_xy_clearance
>>> tmpx
4.7
>>> s = """G91
G1 X%f
G90""" % (
tmpx
)
>>> s
'G91\nG1 X4.400000\nG90'
>>>
The same string is shown if I start LinuxCNC from terminal and embed a print statement to show the string 's'
I execute in the MDI screen those three lines from the X=0 LH edge position:
G91
G1 X4.4
G90
With the probe starting over the left end of the edge of the vise jaw and I zero the Shumatech DRO X axis when I run the above code one line at a time in the MDI the DRO shows 4.4000 at the end of the movement as expected (as does the LCNC DRO).
But if I move the probe to X=2.0 and then click the probe button to find the exact midpoint it moves to the LHS as expected, finds the left edge. Moves away, moves up, moves over to the X=0 position it determined was the edge, pauses for a fraction of a second and then heads over to the RHS to find the RH edge.
However it stops at 3.523, sends the Z down to prep for moving back to the left to find the RH edge. But instead touches the vise at that spot and faults. And leaves the system in G91 so it doesn’t clean house well.
No idea why. It's repeatable.
Any ideas how to even debug this since the string 's' argument to self.gcodes(s) works in MDI mode.
John
Please Log in or Create an account to join the conversation.
- jcdammeyer
-
- Offline
- Senior Member
-
Less
More
- Posts: 70
- Thank you received: 5
16 Nov 2021 08:24 #226634
by jcdammeyer
Replied by jcdammeyer on topic Work with probe
Update on this. I tried the center of a circle with a large 4" OD ring. ID was 3.6" or so and center was found without issues. OD with Edge Length set to 2.1 failed just like the single center on X axis.
So I clamped a 2" disk into the vise. No problem finding the center on the disk with the Edge Length set to 0.95. The inner hole was 0.375" and also no problem finding the center.
It appears that if the Edge Length is larger than 'n' then the system stops. The fact that motion of the same sort of is possible with
G91
G1 Xn.nnn
G90
where n.nnn can be 2.1" suggests that something inside the probe library has a physical hard coded limit. But so far I haven't found it.
John
So I clamped a 2" disk into the vise. No problem finding the center on the disk with the Edge Length set to 0.95. The inner hole was 0.375" and also no problem finding the center.
It appears that if the Edge Length is larger than 'n' then the system stops. The fact that motion of the same sort of is possible with
G91
G1 Xn.nnn
G90
where n.nnn can be 2.1" suggests that something inside the probe library has a physical hard coded limit. But so far I haven't found it.
John
Please Log in or Create an account to join the conversation.
Time to create page: 0.134 seconds