![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Mach Software (ArtSoft software) Discuss Mach 1 , 2 and the new Mach3 here NC software here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
I finally found a VB script that works reliably with the new versions of Mach 3 and SMoothStepper/G540 dirvers. Three notes about this script: 1) Add your Z plate/probe height and the distance you want Z to retract and enter the total dimension in the "change the Z retract height here... line; 2) This script works with the standard MAch screens but I don't know if it will work with any of the modified screens; 3) Probe input signal High/Low must be correct or you'll get the "Z plate is grounded" error. No need to enter the tool gage height or any other parameters. CurrentFeed = GetOemDRO(818) 'Get the current feedrate. PlateThickness =2.040 If GetOemLed (825)=0 Then DoOEMButton (1010) Code "G4 P3" 'Time to get to the z-plate, 3 seconds Code "G90 G31 Z-2 F4" ' probing move, can set the feed rate here as well as how far to move While IsMoving() Wend ZProbePos = GetVar(2002) Code "G1 Z" &ZProbePos While IsMoving () Wend Call SetDro (2, PlateThickness) Sleep(120) Code "G0 Z2.785" 'Change the Z retract height here to what you want, must be higher than touch plate Code "(Z axis is now zeroed)" Code "F" &CurrentFeed 'returns to prior feedrate Else Code "(Z-Plate is grounded, check connection and try again)" End If Exit Sub |
|
#2
| |||
| |||
I had problems with the tool zero macro and smooth stepper, it was never spot on so I have revised the macro in this thread to do two probes the first one is a fast one the second is retracted 20 mm and probed at a slower speed. It also uses a user DRO to get the plate thickness and is in metric. It works perfectly every time. CurrentFeed = GetOemDRO(818) 'Get the current feedrate. PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO 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" 'Time to get to the z-plate, 3 seconds Code "G90 G31 Z-160 F600" ' probing move, can set the feed rate here as well as how far to move While IsMoving() 'wait while it happens Wend DoOEMButton (1010) 'zero the Z axis so the probe move will start from here Sleep(120) Code "G1 Z20" 'retract 20mm and probe again Code "G90 G31 Z-160 F100" ' prob again, can set the feed rate here as well as how far to move While IsMoving() 'wait while it happens Wend Sleep(120) DoOEMButton (1010) 'zero the Z axis so the probe move will start from here Sleep(120) ZProbePos = GetVar(2002) 'get the axact point the probe was hit Code "G1 Z" &ZProbePos While IsMoving () Wend Call SetDro (2, PlateThickness) Sleep(120) Code "G0 Z20" 'Change the Z retract height here to what you want, must be higher than touch plate Code "(Z axis is now zeroed)" Code "F" &CurrentFeed 'returns to prior feedrate Else Code "(Z-Plate is grounded, check connection and try again)" End If Exit Sub |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Auto tool zero | wildcat | Mach Mill | 30 | 10-08-2010 11:03 AM |
| G540 and SmoothStepper | Nzoldun | Gecko Drives | 2 | 07-31-2010 11:22 AM |
| Mach3 + SmoothStepper + G540 = No go | CarbonKevin | Mach Software (ArtSoft software) | 2 | 11-23-2009 05:09 PM |
| G540 and Smoothstepper | escott76 | Benchtop Machines | 28 | 08-28-2009 02:24 PM |
| auto tool zero help | 15mgtar | Mach Software (ArtSoft software) | 3 | 08-12-2009 09:16 AM |