Hello Guest it is April 20, 2024, 01:04:01 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - JohnHaine

231
General Mach Discussion / Re: Auto Tool Zero Script
« on: July 06, 2022, 06:53:39 AM »
...also you can do quick precise moves using the MDI screen when setting up.  For example, if you want to move the X axis to a precise position having just jogged it somewhere else, just enter G0 X10 into the MDI box and clock return - the X axis will move to coordinate 10.

232
General Mach Discussion / Re: Auto Tool Zero Script
« on: July 06, 2022, 04:54:16 AM »
Well, do you have a copy of the Mach3 manual?  If not you need one for a summary of the G code definitions as well as lots of other relevant info.

The G31 Z-3 F20 command does exactly what you say but G31 is a "straight probe" command.  While it's moving Mach3 continually monitors the state of the probe input and movement stops when the probe triggers.  The value of Z at which trigger happens is written into an internal register though your code doesn't access it, instead just using the value of Z at which the probe stopped (which is probably slightly different as the axis has to decelerate).

The command:
code "G1 Z0.5"
causes the Z axis to move up 0.5 at the last commanded feedrate which is F20 from the G31 command.  Usually there's no reason to move so slowly, using G0 just makes the move at the programmed rapid rate. 

I'd be nervous BTW of making the probe move at F20, that's 20 inches/minute = 500mm/minute!  A more common value would be 50mm/minute, and probe routines often probe at this speed first then take a second go at perhaps 5mm/minute after a very small retract.

I strongly recommend that you learn how G code programming works.  You might never actually write a program to make a part, but it is very useful to have some understanding of what the statements in the code produced by CAM means.  You could for example be able to answer the questions you asked here!

233
General Mach Discussion / Re: Auto Tool Zero Script
« on: July 05, 2022, 02:57:26 PM »
Message( "Auto Zeroing..." )
If IsSuchSignal (22) Then
code "G31 Z-3 F20"
While IsMoving()
Wend
Call SetDRO( 2, .060 )
code "G1 Z0.5"
End If

But it would be quicker if the line was:

code "G0 Z0.5"

What "IsSuchSignal (22)" means I have no idea!

234
Mach4 Toolbox / Re: Nested subroutines
« on: July 02, 2022, 07:31:06 AM »
Just try it!

235
General Mach Discussion / Re: usb controller boards
« on: July 01, 2022, 02:58:47 PM »
I asked cncdrive if I could connect 2 uc100s to one pc, as I have lathe and mill.  It seems that all uc100s have the same address so the pc can't distinguish between them.  Same may apply for you.

236
General Mach Discussion / Re: Probe Wiring
« on: June 30, 2022, 10:27:35 AM »
OK.  So the plate is presumably isolated and grounded via the tool or whatever in the spindle, right?  That's normal practice.

But your diagram shows the clip on the touch plate so it is permanently grounded!  The touch plate should be connected via the pullup to +5V.  If you need an alligator clip to do that then fine.  Normally you could rely on the spindle being grounded anyway but you might need another clip and ground wire to make sure.  I've not found it necessary but it depends on the machine.  Commonly the "probe" is a precisely dimensioned thing that's held in the spindle when the machine is being referenced.

Given some reinterpretation your wiring is OK, though I think 120R pullup is a bit low, you will be sinking 40mA odd.  1K would probably do the job.

237
General Mach Discussion / Re: Probe Wiring
« on: June 30, 2022, 08:41:03 AM »
Which wire is the probe?

238
And I use a cncdrive uc100 which also supports probing.

239
I suspect that your motion controller doesn't properly support probing.

240
"So my question now is, is there a Gcode to stop movement without stopping file execution?"

Probably not.  The only way to do what you want is to use a macro to move in very small steps, testing a hardware input at each point.  Veeeryyyy slow.  As Craig says, it seems amazing that you're the first person to have discovered this, like him I suspect the machine setup.