Hello Guest it is April 26, 2024, 10:26:51 AM

Author Topic: tool change?  (Read 6223 times)

0 Members and 1 Guest are viewing this topic.

Offline swets

*
  •  52 52
  • www.arjan-swets.com
    • View Profile
    • www.arjan-swets.com
tool change?
« on: August 01, 2007, 05:56:50 PM »
is it posible with mach3 to make something like...(pff diffecult that english)

if I push a button , the machine goes too a special place (x,y) and there it goes down (z) slow... tilt a input is make... ?

I want in a corner from my machine make a litle PCB... and connect a wire on the cutter... and wen the cutter touch the PCB , than Z=3

pff i hope every one understands my english... :-)


Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: tool change?
« Reply #1 on: August 01, 2007, 10:13:38 PM »
Hey Swets, that can be done pretty easy. In your general config, ports and pins,inputs, you have an input for probe. Instead of wiring your tool, you will insulat your board so it is not grounded through the machine, the tool will be the ground that completes the circuit. On the settings page, far left, 3 DROs for your tool change positions. I have some code that has been copied and pasted together (I'm no VB guru like a lot of these guys) that you could place inside a button on your screen that will do what you want I think.

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline swets

*
  •  52 52
  • www.arjan-swets.com
    • View Profile
    • www.arjan-swets.com
Re: tool change?
« Reply #2 on: August 02, 2007, 03:32:05 AM »
....... I have some code that has been copied and pasted together (I'm no VB guru like a lot of these guys) that you could place inside a button on your screen that will do what you want I think.

Brett

Hi,

where can i found the code?

so i can study and try it...

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: tool change?
« Reply #3 on: August 02, 2007, 10:19:04 AM »
Hey Swets,
   I think this is what you want.

Response = MsgBox ( "Would you like to set your Z height automatically? If so, click OK", 1 ) 'these two lines are for safety
If Response = 1 Then
   'Get the tool change pos from the settings page
   ChangeX = GetOEMDRO(1200)
   ChangeY = GetOEMDRO(1201)
   ChangeZ = GetOEMDRO(1202)
   Code "G00 G54 Z2" 'This line moves the Z to +2 in work coord to clear your part.
   Code "G00 G53 X" & ChangeX & "Y" & ChangeY 'This moves your X and Y to the TCP DROs on the settings page in Machine coord.
   Code "G00 G53 Z" & ChangeZ 'This moves your Z to the TCP DROs on the settings page in machine coord
   Response = MsgBox ( "Give your machine time to get to the tool change position. Once there, change your tool and click OK to proceed. The next move will be your Z looking for your plate.", 1 )
   If Response = 1 Then
      CurrentFeed = GetOemDRO(818) 'Get the current feedrate.
       PlateThickness =0.062 'You can adjust this number for your plate thickness
       ProbeFeed = 5 'Rate the tool will drive to the touch plate


       Code "G90 F" &ProbeFeed

       If GetOemLed (825)=0 Then
          'Code "G4 P5" 'Time to get to the z-plate
          Code "G31Z-5 F" &ProbeFeed
          While IsMoving()
          Wend
          Code "G4 P0.25"
          ZProbePos = GetVar(2002)
          Code "G0 Z" &ZProbePos
          While IsMoving()
          Wend
          Call SetDro (2, PlateThickness)
          Code "G4 P0.5" 'Pause for Dro to update.
          Code "G0 Z0.25" 'Change the Z retract height here
          Code "(Z axis is now zeroed)"
          Code "F" &CurrentFeed
       Else
          Code "(Z-Plate is grounded, check connection and try again)"
       End If
   End If   
End If


Play with it a little before you try to use it. Try it in the air and make sure the moves are right.

Brett

       
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline swets

*
  •  52 52
  • www.arjan-swets.com
    • View Profile
    • www.arjan-swets.com
Re: tool change?
« Reply #4 on: August 03, 2007, 02:46:50 PM »
thanks   

i gonna try it...