Hello Guest it is September 20, 2019, 02:12:34 AM

Author Topic: Zero X & Y axis based on laser cross  (Read 6333 times)

0 Members and 1 Guest are viewing this topic.

Re: Zero X & Y axis based on laser cross
« Reply #10 on: February 09, 2008, 03:27:33 PM »
Hi guys

Played aroud with the script and removed the math (if & and)

And it works.

Great forum, great software and great guys....what a combination.

Thanx again

I´m sure I´ll pop in a few more Q´s as time goes by:)

Cory
« Last Edit: February 09, 2008, 03:55:06 PM by corydoras »

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Zero X & Y axis based on laser cross
« Reply #11 on: February 09, 2008, 03:29:06 PM »
OK in the code I had the button pressed once would set the axis to the offsets then pressing again would move to X and Y zero. It seemed to work fine here but  I asked Brian what  he thought and he came up with a totally different code which is pasted below, its a bit more elegant than mine ;)

Hood

Code("G90")
XShift = -49
YShift = -129
SetDRO(0,XShift)
SetDRO(1,YShift)
Code"G4p.25"
While IsMoving()
Wend
Code"G0 X0.0 Y0.0"

Offline Greolt

*
  •  956 956
    • View Profile
Re: Zero X & Y axis based on laser cross
« Reply #12 on: February 09, 2008, 04:25:46 PM »
There are lots of ways to skin a cat.  Ask ten people for code and you'll get ten different codes.  ;D

This is what I use,

Xmove = GetUserDRO(1152) 'X distance DRO
Ymove = GetUserDRO(1153) 'Y distance DRO

Code "M9"
Code "G91 G0 X" &Xmove & "Y" &Ymove
While IsMoving ()
Wend
Code "G90"
DoOEMButton (1008)
DoOEMButton (1009)


I have two DROs on screen to set the offset required.  Overkill I know.  Once dialed in they should not need changing.

I also have a button to turn the laser on/off.  Cheated and used mist coolant commands to power laser.  That is what the "M9" is for.

Greg
Re: Zero X & Y axis based on laser cross
« Reply #13 on: February 09, 2008, 09:37:40 PM »
You guys AMAZE me......BRILLIANT !
RC
Re: Zero X & Y axis based on laser cross
« Reply #14 on: December 29, 2008, 07:35:17 PM »
Hello.everyone. I have a homebuilt cnc router that I would like to put a laser cross on to zero the x and y axis. I have the buttons and the script that should work. What I need to know is how to power the laser and turn it on from mach. I am using a Bob Campbell bob. I have the touch plate for the z axis set up and it works great. I have a laser that is 5v. Can someone explain how to connect it to the bob. I have some relay outputs on the bob. Do I just find 5v and put it through one of the output relays? Man this is a great site with a world of knowledge and I am sure someone can help me. Thanks in advance.

Barry Sims