On 12/7/25 02:01, John Dammeyer wrote:
Thank you for your reply.
Imagine a piece of 1" round stock sitting upright in the vise. I use the VERS.BY probe
to find the center of it. Positioned approximately at centre and about 0.18" above it.
Then click on the find center icon. The Edge Length is set to 0.400". After if checks
the four edges it moves to the precise center. No problem.
Now the same operation but with 2" diameter round stock. Edge Length is set to 1.0".
Position approximately at centre and about 0.18" above it. Click on find center icon. Like
before, it moves over 0.2" past the left edge then down and then toward the piece.
As before it touches, backs off, moves in really slowly and touches again. Moves
away, moves up and now it should move, 2x(0.2+1.0)=2.4" in order to go past
the right edge before going down.
Instead it moves to about 0.59" past the approximate centre point and then
stops and goes down. It runs into the piece because the code is expecting it to be
clear of the workpiece.
So the question is why does it move correctly for 1" diameter pieces and not for
2" diameter pieces. Especially when the G-Code command as reported by the print
statement is which should take it to 0.2 past the other side of the piece:
Because of the blending default, I would add a G4P.1
G91
G1 X2.4
G90
G4p.1 # que buster stop to make sure the X2.4 was totally completed
before any probing G38 moves can begin.
Doing my own g-codes I would do this automatically even if this is not
the correct instant solution. One might
in this case read the docs for (IIRC) G64 to reduce the blending
globally which should have a similar effect.
I'd need to see more of the gcode to be sure however.
And never debounce a probe signal. Not even the delays in the cheap
opto's used in most breakout boards.
I generally cut out & bypass those as you want as instant a response as
you can get while probing.
I also use electrical contact, not a regular probe assembly since I
don't have a tool
changer for my R8 spindle. I just use the tool itself, turning backwards
so it doesn't cut up a piece of pcb used
as the contact for TLO measurements. For center finding I do it twice,
once to get it into the ball park, then slower using the first find
as the center for the 2nd, which may move the center a hair. I get
repeatable .003 mm accuracy that way.
Spindles with ceramic bearings will need a grounding brush on the tool.
Something really strange is going on. How can a print statement of the data to
the gcode command be incorrect?
print s
if self.gcode(s) == -1:
return
If this failed it should never go down and touch the piece.
-----Original Message-----
From: Zdenek Z [mailto:[email protected]]
Sent: December 6, 2025 10:04 PM
To: Enhanced Machine Controller (EMC)
Subject: Re: [Emc-users] Accessing python hal valriables.
Describe the fault of move more.
Do you use debouncing for probe signal?
https://github.com/LinuxCNC/linuxcnc/blob/master/lib/python/gladevcp/b
uiltin-panels/gtk_little_probe/README.md
--
Best Regards
Zdenek Zdra il
---------- Puvodn e-mail ----------
Od: John Dammeyer <[email protected]>
Komu: 'Enhanced Machine Controller (EMC)' <emc-
[email protected]>
Datum: 7. 12. 2025 1:22:39
Predmet: Re: [Emc-users] Accessing python hal valriables.
"To add to this I can set the distance to 0.4" and then use the inner hole to
find center. That works but again the distance is smaller.
I've attached two small photos. Hopefully they come through.
John
-----Original Message-----
From: John Dammeyer [mailto:[email protected]]
Sent: December 6, 2025 4:07 PM
To: 'Enhanced Machine Controller (EMC)'
Subject: Re: [Emc-users] Accessing python hal valriables.
-----Original Message-----
From: Andy Pugh [mailto:[email protected]]
Sent: December 6, 2025 1:35 PM
To: Enhanced Machine Controller
Cc: Enhanced Machine Controller
Subject: Re: [Emc-users] Accessing python hal valriables.
On 6 Dec 2025, at 19:31, John Dammeyer <[email protected]>
wrote:
How do I access from workpiece_measurement.py the
variable:
One way would be to create a HAL pin and set the value in that part of
the
code.
But ?print? might be enough if you start LinuxCNC from the command
line.
_______________________________________________
Thanks Andy,
I always have it starting from the command line so I can look at the
output
for other issues. Here's the print statement I added to the python program
# move X + 2 edge_length + 2 xy_clearance
tmpx = 2 * (self.halcomp["ps_edge_length"] +
self.halcomp["ps_xy_clearance"])
s = """G91
G1 X%f
G90""" % (
tmpx
)
print s
Oddly it showed up on the console like this:
G91
G1 X2.400000
G90
And the probe only moved 3/4 of the way across the part then went down
and faulted due to touching the work before the move completed. It has to
have taken the G91 correctly or the X2.4 would be 2.4" across from the
rough center of the part.
Yet if I jog back to that starting position and enter this into the MDI
command line
G91
G1 X2.4
G90
It moves all the way across the part to the position where it should go
down.
So the distance is correct and the machine is left in G91 mode when the
probe faults the move.
Any ideas?
Thanks
John
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users
"
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users
.
Cheers, Gene Heskett, CET.
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
Don't poison our oceans, interdict drugs at the src.
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users