Hello
Guest
it is
April 18, 2024, 08:41:58 PM
Guest
Login
Register
Menu
Home
Help
Search
Calendar
Members
Members
View the memberlist
Search For Members
Login
Register
YouTube
Machsupport Forum
/
Mach Discussion
/
General Mach Discussion
/
Zero X & Y axis based on laser cross
« previous
next »
Print
Pages:
«
1
2
Go Down
Author
Topic: Zero X & Y axis based on laser cross (Read 8887 times)
0 Members and 1 Guest are viewing this topic.
corydoras
154
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
»
Logged
Hood
25,835
Carnoustie, Scotland
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"
Logged
Greolt
956
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.
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
Logged
Overloaded
4,921
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
Logged
bsims66173
7
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
Logged
Print
Pages:
«
1
2
Go Up
« previous
next »