Hello Guest it is June 16, 2019, 11:17:50 AM

Author Topic: Offset for multiple heads  (Read 3431 times)

0 Members and 1 Guest are viewing this topic.

Offset for multiple heads
« on: September 11, 2010, 01:16:34 AM »
Hi.  I have searched this forum and couldn't find an answer to this question.  So, I thought I would start a new topic.  I have two CNC plasma tables with a plasma head and a marking punch.  The marking punch on one table is 6 inches in the x direction, and 1 inch in the y direction away from the plasma torch tip.  On the other table, the punch is 4 inches in the x and 2 inches in the y direction away from the torch tip.  I use SheetCAM to generate the G-code for these two machines.  Since I would like the Gcode to be used on both machines, I don't want to use the SheetCAM post processor to offset the tool for me (I would have to create twice as many Gcode files).  What I would like to be able to do is have Mach3 offset somehow when each tool is selected.  In other words, I would zero out each axis before I start a cut, and when the punch tool is selected by the Gcode, Mach3 would offset the coordinates so that the punch would be striking in the correct location.  Does anyone know what the best method to do this would be?

Thanks,
Frank
Re: Offset for multiple heads
« Reply #1 on: September 11, 2010, 01:36:05 AM »
I should clarify one thing.  My machine has a single head with two tools fixed to it, not multiple heads.  I messed up when writing the topic.

Offline Hood

*
  •  25,843 25,843
  • Carnoustie, Scotland
    • View Profile
Re: Offset for multiple heads
« Reply #2 on: September 11, 2010, 03:44:05 AM »
Best method at the moment would be to use work offsets for each tool, for example one tool could be in G54 coords and the other G55. That way the same code would work in  both machines as you would have the offset on the machines different.
Hood

Offline ASC

*
  •  59 59
    • View Profile
    • Automation Systems
Re: Offset for multiple heads
« Reply #3 on: September 13, 2010, 10:42:45 AM »
I have a similar setup, a single tooling plate with a spindle, dispenser, and usb camera.  I added several buttons to the main screen, labelled camera to spindle, camera to dispenser, dispenser to camera and spindle to camera.  Each button contains a script that moves the x and y axes in incremental mode and then zeros both axes.  This way, I can mill track with the spindle, and with the touch of a button I move the machine and can run the code again with the dispenser to fill the track.  Next I can run the same code with the camera as the tool and do an inspection run!

Heres an example of the script I used if you want to go this route

Code("G91")
'switch to incremental
Code("G01 X-2.13 Y1.7192 F50")
'Move to dispenser position
Code("G90")
'switch back to absolute

DoButton(09)
Dobutton(08)
'zero x and y axes
Mr. Creosote
Re: Offset for multiple heads
« Reply #4 on: September 14, 2010, 09:36:49 AM »
Thanks guys.  I appreciate the replies!  I think I will use the G54/G55 method.  However, I am not sure if it will work without some extra playing around.  We use our machine in G54 coordinates all day long (we just put our material on the table in any location, zero the axis to the corner, and cut).  I was wondering if the G54/G55 are relative to each other, or relative to machine coordinates?  In other words, if I setup G55 to be -6,2, my machine coordinates are currently at 50,50, and my G54 coordinates are recently zero'd to 0,0, would changing from G54 to G55 make the machine want to move 56 inches in the - x direction, and 48 inches in the - y direction to get to 0,0, or make it want to move to -6,2, which would be relative to the G54 coords?

Frank

Offline Hood

*
  •  25,843 25,843
  • Carnoustie, Scotland
    • View Profile
Re: Offset for multiple heads
« Reply #5 on: September 14, 2010, 10:02:42 AM »
They are from machine coords so you would need to alter them each time. Could easily be done via a macro I would think or you could  have a button on screen to zero the G54, change to G55 enter the amount you want then change back to G54. Maybe also look at using  G52 instead?
Hood

Offline Hood

*
  •  25,843 25,843
  • Carnoustie, Scotland
    • View Profile
Re: Offset for multiple heads
« Reply #6 on: September 14, 2010, 10:35:41 AM »
If you added a VB button to your screen and put this in the button it should do what you want.
Code("G54")
Sleep 100
DoButton(8 )
DoButton(9)
DoButton(10)
Code("G55")
Sleep 100
Call SetOemDRO(800,***)
Sleep 100
Call SetOemDRO(801,***)
Sleep 100
Call SetOemDRO(802,***)
Sleep 100
Code("G54")


What would happen is you would jog XY and Z to where you want G54 zero then press that button, it would zero G54XYZ then change to G55 and set the values you want then back to G54.

You would of course need to put the values you want for G55 XY and Z into the code instead of the *** that I have.
Hood
Re: Offset for multiple heads
« Reply #7 on: October 03, 2010, 12:16:08 PM »
Thanks guys!  I will give this a try and report back.

Frank