2 Attachment(s)
Re: Tool Height Macro [here's one for LinuxCNC]
I created this for LinuxCNC with my Chinese CNC, which came with a "Z height setter" and a cable connection for it. The tool is spring-loaded, normally closed (NC), "knife" switch with its two wires connected to the control board. With a G38 (probe) command, the control is monitoring the voltage across that pair of terminals. Closed, the voltage will be (pulled down) to zero, but when the contacts in the switch are separated, the voltage will be (pulled up) to high. The change in voltage indicates contact has been made with the plate. (If you have bare wires, you connect the red one to your control boards "signal" pin and clip the other one onto the cutter (it could be any ground as long as the cutter is electrically connected to the same ground).
To use the code, center the cutter over the height setter "at a reasonable height" (0.1-0.5" would be good: G38 is defined to "give up and declare failure" after a predefined probe distance and "probing air" is not satisfying) and set G59's X,Y to 0,0 there. G10 L20 P6 X0 Y0. Run the code, with thumb hovering above the ESC key--as you would for ANY strange G-code...
The tool will descend at a "FEEL" speed, and after contact, reverse and repeat at a slower "PROBE" speed before finally backing off to 0.1" above the top plate. I then record the values of G53 coordinates at this spot and proceed to set my part zero(es) and record their displacements from G59 X0 Y0 Z0.1 (I prefer to return to Z0.1 and NOT Z0 because I don't like to touch the setter any more than necessary.)
Re: Tool Height Macro [IMPORTANT EDIT]
Incidentally, I just realized it would be wiser to set the variable #<ZMAXDOWN> to something LESS than the full-travel of the height-setter's plunger.
For example, supposing the plunger's travel is 0.5" before bottoming out, setting
#<ZMAXDOWN>=0.4"
means the plunger will only travel 0.4", even if the tool starts 1/10th of a mil away and contact fails to be detected.
It also means that if you start with the tool over 0.4" away, the probe will fail and you'll get to run the program again from the current location.
(The G38 command uses #<ZMAXDOWN> to decide when to stop probling.)
Re: Tool Height Macro [here's one for LinuxCNC]
"Baloney" Alert:
Quote:
Originally Posted by
cnczane
... The [Z height setter] is [a]spring-loaded, normally closed (NC), "knife" switch with its two wires connected to the control board....
NO, IT ISN'T.[1] Electrically, it's the same thing as a lump of metal with no moving parts. The spring and plunger are NOT in there to make-or-break an electrical connection, but SOLELY to absorb impact of a tool probing down to "find" the surface by making electrical contact with the plunger.
Quote:
Originally Posted by
cnczane
... (If you have bare wires, you connect the red one to your control boards "signal" pin and clip the other one onto the cutter (it could be any ground as long as the cutter is electrically connected to the same ground). ...
What do I know about wire colors??? After posting this I immediately saw pictures of probes with black-and-WHITE wires, and RED clips being clipped onto cutting tools prior to probing.
The POINT is that the wire connected to the base should be connected to the ground of the controller, and the clip's wire should be connected to the PROBE-IN pin of the controller.
I apologize for having muddied this thread with my ignorant "insights."
[1] https://www.cnczone.com/forums/calib...ml#post2440262 (There's pictures.)