Hello Guest it is August 14, 2020, 07:13:50 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.

Topics - MadTooler

Pages: 1
I am working out the kinks with a 4 axis router run by a SmoothStepper USB.  I thought everything was about done, but my "Auto Tool Zero" started acting up after I installed the A/4th axis drive.

If the 4th is not 0 or 360 on the DRO, both Z (super duper slow, almost not at all) and 4th move when the macro is started.  Mostly the 4th to the extent that the macro would seem to run a very long time before Z has moved the distance in the macro.  I don't really know if this is a problem with my macro or a bug in Mach R3.043.066 on an XP machine.  Also, it acts this way even when I am running offline.

Here's the code I am using (inches):

CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
CurrentAbsInc = GetOemLED(48) 'Get the current G90/G91 state
CurrentGmode = GetOemDRO(819) 'Get the current G0/G1 state
PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO. This line can be omited if no DRO on screen

If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P2" ' this delay gives me time to get from computer to hold probe in place
Code "G90 G31Z-.6 F5" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
ZProbePos = GetVar(2002) 'get the exact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
'Call SetDro (2, PlateThickness) 'use this line if DRO is used
Call SetDro (2, .0595) 'use this line for no on-screen plate thickness DRO, change 1.5 to your plate thickness
Sleep 100 'Pause for Dro to update.
Code "G1 Z0.2 F80" 'put the Z retract height you want here, must be greater than the touch plate thickness
While IsMoving ()
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Code "F" &CurrentFeed 'Returns to prior feed rate
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if applicable
End If
If CurrentAbsInc = 0 Then 'if G91 was in effect before then return to it
Code "G91"
End If
If CurrentGMode = 0 Then 'if G0 was in effect before then return to it
Code "G0"
End If

Side note:  I never found a specific location within machsupport to download a clean probe script.  The one I am using is from scouring threads and has some undesirable operations, but it seemed well enough until I get the time to better understand all the variables and syntax.

Thanks to anyone that may be able to help.

Pages: 1