Hello Guest it is March 28, 2024, 06:51:06 PM

Author Topic: Permanent parking tool location  (Read 855 times)

0 Members and 1 Guest are viewing this topic.

Permanent parking tool location
« on: October 08, 2018, 12:03:40 PM »
I know how to make a tool go to the same spot relative to the work origin zero in my cam software. My problem is that my work zero coordinates change over time. They start at the very beginning of a new sheet of material, and over time these coordinates( I am referring to the y axis only) get closer to the end of the material. Unless I keep reducing the y distance numbers, the tool eventually will crash because the y number maybe be greater than the actual y distance remaining between the new work origin and the end of the table.
How does one create an end of run tool parking spot in mach3 that is indifferent to the changing work origins?
I am using the StartM6 macro for tool change location, and this works great for my needs.
I suspect that in order to set up a permanent parking spot, the postprocessor needs to be edited. I am hopeful that there's a different approach out there.
I have homing switches, so I suspect that a routine that would send the tool to home and then to the parking position would do the trick.
I prefer to have the tool park at the very end of the material so that I can pick the parts, clean the debris, and sometimes remove the material without the tool being in the way.
tks
tc

Offline ZASto

*
  •  423 423
    • View Profile
Re: Permanent parking tool location
« Reply #1 on: October 08, 2018, 01:13:23 PM »
Code: [Select]
Dim xparkcoord, yparkcoord, Zretract  

'//////// Reads values from user DROs

xparkcoord = GetUserDRO(1105)'get current park coordinate for X
yparkcoord = GetUserDRO(1106)'get current park coordinate for Y
Zretract = GetUserDRO(1202) 'get Z DRO from settings screen tool change position

'//////// Retracts spindle first and moves to parked location

Code "G53 Z" & Zretract  'Z retracts
While IsMoving()
Wend
sleep(1000) 'pause 1 seconds
Code "G53 X" & xparkcoord & " Y" & yparkcoord 'spindle travels to parked position
While IsMoving()
Wend
                
Code "(Spindle is in Parked Position)" 'puts this message in the status bar

You can place 2 DROs somewhere on a screen that you dont use often, save the above code to a macro and place it in Macros folder under some name, and finally tweak post processor and insert your macro just before M30.
I have this code assigned to a button on main screen with accompanying DROs.
Make no mistake between my personality and my attitude.
My personality is who I am.
My attitude depends on who you are.