Ok this is what I think I understand:
I have scratch build my own X31 X Y31 X Z4 CNC machine however I have no idea how
to run it. Currently, I am not using the tool array and I am trying to change
the tool in the middle of a project and have a bit/end mill of a different length
return to the exact cutting depth and continue cutting.
I have no Idea what is wrong my guesswork, the new install of mach 3 configurations, the safe_Z, or the
Auto tool zero script that I have picked peaces from here and there and frankly have no idea
what came from where at this point.
I believe this is what I click on within the mach 3 desktop
(1) Load G-Code
(2) Move to work 0.0.0
(3) Zero x y z
(4) Regen
(5) Cycle start
Until a M6 tool change
(6) In the Tool Information area Click on [REMEMBER]
(7) JOG to a place above your work 0.0.0
(8) Replace end mill/bit
(9) Place the TOUCH PLATE on top of work 0.0.0
( 10 ) In the Tool Information area Click on [AUTO TOOL ZERO]
( 11 ) In the Tool Information area Click on [REMEMBER]
( 12 ) CLICK [Cycle start] or press Alt-R
I have no clue.. so if I am missing something please point me in the right direction
This is what I have for a Auto Tool Zero script that is suppose to be able to
tell if the G-Code that I downloaded was scripted using inches or mm and
adapt the Auto Tool Zero script to continue in a non-conflicting manner.
Well that is what I am trying to attempt.
'AUTO TOOL ZERO MACRO
'Use at your own risk
'Special thanks to ger21, cnczone.com, and machsupport.com
'for assisting Edoctoor in the creation of this auto tool zero macro
'designed for the simple hobby CNC machine with a touch plate
'attached to pin 11 of your BOB (Break Out Board)
'It is also necessary to configure CONFIG > PORTS & PINS > INPUT SIGNALS
'PROBE CHECKED; PORT # 1; PIN NUMBER 11; ACTIVE LOW CHECKED
'My units are in INCHES so I configured my Safe Z
'as follows:
'CONFIG > Safe_Z Setup
'GLOBAL SETTINGS
'CHECKED Allow Safe_Z Moves
'CHECKED SafeZ DRO is in Machine Coordinates
'Safe_Z -0.25
'OPTIONAL
'CHECKED Goto SafeZ when Stop button is hit.
Message "Auto Tool Zero Running" 'Puts this message in the status bar
'Change the following to configure for your CNC
'CHANGE THE FOLLOWING TO CONFIGURE THIS SCRIPT FOR YOUR CNC
'==========================================================
'==========================================================
'The example below is for a TOUCH PLATE which is 1/2 inch in height
'If your UNITS of measure for your TOUCH PLATE is Imperial/inches make Inches = 1
Inches = 1 'If your UNITS of measure for your TOUCH PLATE is Metric/mm make Inches = 0
PlateThicknessUnits = 0.500 'Change 0.500 UNITS to your plate height; Then adjust for final accuracy
'The example below is for a TOUCH PLATE WHICH is 12.7 mm in height
'If your UNITS of measure for your TOUCH PLATE is Metric/mm make Inches = 0
'Inches = 0
'Change 12.7 UNITS to your plate thickness; Then adjust for final accuracy
'PlateThicknessUnits = 12.7
'The example below will move the Z axis (PlateThicknessUnits + 0.500) above the
'the work part; Because my units are in inches that means that it will
'move 1" inch above the work and 0.500 inch above the TOUCH PLATE.
ZRetractHeight = PlateThicknessUnits + 0.500 'Change 0.500 UNITS to be a safe distance above the TOUCH PLATE
'==========================================================
'==========================================================
'Get the current state of your CNC
'==========================================================
'Is your G-Code Imperial or Metric?
If GetOEMLED(801) Then 'On = The G-Code loaded is in Imperial Measure, INCH
If Inches Then
'Message "G-Code Inches and Touch Plate height is Inches"
PlateThickness = PlateThicknessUnits
Message "Auto Tool Zero Running - Place your " & PlateThicknessUnits & " inch plate in position." 'puts this message in the status bar
Else
'Message "G-Code Inches and Touch Plate height is mm"
PlateThickness = PlateThicknessUnits * 0.0393700787402
Message "Auto Tool Zero Running - Place your " & PlateThicknessUnits & " mm plate in position." 'puts this message in the status bar
End If
Else 'Off = The G-Code loaded is in Metric Measure, mm
If Inches Then
'Message "G-Code mm and Touch Plate height is Inches"
PlateThickness = PlateThicknessUnits * 25.4
Message "Auto Tool Zero Running - Place your " & PlateThicknessUnits & " inch plate in position." 'puts this message in the status bar
Else
'Message "G-Code mm and Touch Plate height is mm"
PlateThickness = PlateThicknessUnits
Message "Auto Tool Zero Running - Place your " & PlateThicknessUnits & " mm plate in position." 'puts this message in the status bar
End If
End If
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
'Start Auto Tool Zero Script
'==========================================================
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 P3" 'this delay gives me time to get from computer to hold probe in place
Code "G90 G31Z-4. F4" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
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 ()
Wend
Call SetDro (2, PlateThickness)
Sleep 200 'Pause for Dro to update.
Code "G1 Z" &ZRetractHeight & " F50" 'put the Z retract height you want here, must be greater than the touch plate thickness
While IsMoving ()
Wend
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Code "F" &CurrentFeed 'Returns to prior feed rate
Else
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
For now I just want to get someone to give me some feedback and tell me what I am doing wrong
or what I have scripted wrong in order to cut this project found
hereCurrently, the Z axis looses consistency and I am not sure if I have my motor control too fast and I have lost steps
or what but every time I get something new to throw in the garbage.
Many thanks in advance