Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: olf20 on February 13, 2008, 07:07:49 AM
-
Hi all, hope everyone is doing OK!!
I saw on youtube from one of Mach's video's where a guy (mnorth1) is using a laser crosshair to line up his work.
He referred to using a homing function to align the work. Does anyone know if this is a VB script or a function
in Mach.
I just ordered one of these lasers and want to get the machine setup for its arrival. Pretty cool these little toys.
Thanks for any help!!
olf20
-
I am also using a laser to align the lathe. Basically I need three references. 1) The lathe centre in relation to my front tool post - so that I can reference all my tooling to it.2) Positions for two drilling posts, mounted on the cross slide - to take the place of the tailstock, so that I can centre drill, and drill holes in the work peice from within a G-Code program.
I am using a laser mounted on the cross slide, shining parallel to the lathe bed to three Osram detectors mounted near the headstock. The idea is the cross slide will move across until the laser shines on one of the detectors, and stops - in exactly the right position.
I see no problem in incorporating the "homing" program in this. It is already written and set up. I have tried it, albeit with microswitches and it works well. Even using cheap micro-switches it was accurate to less that a thou. My idea is to write a macro - using absolute addresses, to bring the cross slide near to where I know it should stop, and then use the homing program to complete the movement the theory being the movement will be all in the same direction and since it uses the same program, will al be to the same accuracy.
The laser came today - watch this space.
Just as a by-word. I gave up with the micro switches, because if I over ran them, I bent all the switches and had to reset them. At least with the laser, physical damage should be avoided.
-
Olf20
Have a look at this youtube video shows a laser setup. I take it this is what you're after.
http://www.youtube.com/watch?v=Oc-9gTFj-y4
Here is a script you can use to move the spindle to take up the laser position
Xmove = -50 'adjust this for X move distance
Ymove = 50 'adjust this for Y move distance
Code "G91 G0 X" &Xmove & "Y" &Ymove ' makes an incremental move the distances that you set
While IsMoving () ' waits while that happens
Wend
Code "G90" 'goes back to absolute moves
DoOEMButton (1008) 'zeros the X and Y DROs
DoOEMButton (1009)
You will need a button on screen called "Laser Zero" or whatever you want to call it.
Then assign this script to it.
Greg
-
I have just finished what Greolt writes here and it works just great.
I put the above mentioned vb script under a button with a laser image.
Did not put in another button , just used the offline button on prgram screen, and change this image with screen 4 software, easy and problemless.
If you want, i can change this for you if you post your 1024.set file and rename it to ******.set for upload.
Best reg
Cory
-
Thanks Cory, Greolt!!
Cory here is my 1024, named olf.set
Can you tell me how you set yours up in practice, or is
it a no brainer.
Thanks again!
olf20
-
Olf20
Here is a screen I had done for someone else. It may suit you.
Greg
-
Thanks Greolt!!
I think your screen will work fine for what I do.
What are the steps to setup a job?
Home X, Y, Z?
Move X to align crosshair?
Record reading in box?
Thanks for any help!
olf20
-
Sorry for the late reply,
Here is the screenset I use, but the textbox messages are in Norwegian, but I can change them if you´d like
Cory
-
Thanks Greolt!!
I think your screen will work fine for what I do.
What are the steps to setup a job?
Home X, Y, Z?
Move X to align crosshair?
Record reading in box?
Thanks for any help!
olf20
I think it will become obvious to you once you have got your laser set up.
Jog the X and Y until the cross is on the edge or whatever you want zero to be.
Then press the "Laser Zero" button and the spindle will move into the position the laser was.
The script will also zero the X and Y DROs at the same time. Nothing to it. :)
Greg
-
I saw you were adding some buttons for the laser cross-hair. Can you you add the laser zero button and dro like the others but also a Laser Cross-hair button to turn on and off laser to an output. I have been trying to do so but can not seem to get it functioning. I have successfully added the auto tool height script though. Thanks
Brooks
-
This is the button script that I use to turn the cross-hair on / off from the same screen button (I am using Output #5 to switch the device)
If IsOutputActive(OUTPUT5) Then ‘Check to see if its on
DeActivateSignal(OUTPUT5) ‘Its on so turn it off
Else
ActivateSignal(OUTPUT5) ‘Its off so turn it on
End If
(If it's any help, further detals are here http://www.cooperman.talktalk.net/files/17.htm)
Tweakie.
-
Thanks all worked out good.
Brooks