Hello Guest it is April 22, 2019, 06:36:31 PM

Author Topic: Confused about work offsets  (Read 1495 times)

0 Members and 1 Guest are viewing this topic.

Confused about work offsets
« on: October 24, 2015, 07:22:38 PM »
I have Mach3 interfaced with a Galil plug-in running a 3 axis Bridgeport that I converted to CNC. For a year or two, everything was fine, but now I seem to have somehow assigned work offsets that I do not want. I cannot seem to set the offsets to zero since that just changes the DRO reading, and setting the DRO to zero changes the offset. For example my X offset is -3.6 inches and Y is 1.6 inches (G54). I have tried using other Fixtures (G55, etc) to no avail. I also tried using G53 in my G-Code to run in machine coordinates, which works sometimes, but then the offset will appear later in the program.

I want to set the corner of my vice to be X0 & Y0 and lower the tool until touching the part and set Z0 at this point. In fact I have added a tool change subroutine at the end of my G-code that is called whenever a tool change is required (no auto tool changer). The subroutine executes an M0 command where I can press Stop and use the button jog to lower the tool to the correct height. Then I click on Cycle Start to continue the program.

I am using BobCad CAM to generate the G-code, and I always select "Override Offsets" which seems to only apply to tool offsets. I have gone into the code and edited to replace all instances of G54 with G53, which seems to work sometimes.

One possible problem area is that my limit switches are wired directly to my motor amplifiers to stop motion by disabling the amplifier when a limit switch is reached. There is no connection for X Home, Y Home, or Z Home in Mach3.

Since I am interfacing with a Galil card, the parallel ports are disabled, and if I need to hardwire a home switch in I need to use the digital inputs on the Galil card instead and assign the pin to a higher number (pin45 is Galil digital Input 5 for example).

I am attaching a G-code that I am presently trying to run. This code is supposed to peck drill a series of holes using T1 (1/4 dia drill bit), which it does drill in the correct location. After the tool change called by line N31, tool T2 (1/4 dia end mill) is supposed to cut the drilled holes into slots. The slot cutting operation occurs several inches off my part, determined by the work offset G54. I also get an error in line N37 stating that the arc end and start have a different radius. This error is displayed when I load the code, but it seems to run OK up through line N33.

I have a copy of Mach3 on another computer that I use for testing my code, and the program runs fine with no error shown for line N37. Of course this computer is not connected to any machine, so I would not see an offset error.

I noticed it is possible to assign a Hot Key for the Home positions, but I am not sure just how to use that to simulate a home position. Any suggestions for how to fix this would be appreciated.

Bob Butcher



Re: Confused about work offsets
« Reply #1 on: October 28, 2015, 05:16:00 AM »
Don't replace G54 with something else, just remove it, also do a search of your code in Note Pad or an editor, G54 will often be at the start of multiple features throughout the code.
You can use the same switch for Home and Limit but you can also have separate switches, why not add home switches wired back to Mach3 which throw just before your limits with enough over travel to allow the limits to actuate, then you can use Ref All Home and start down the path to using Machine Offsets to put a zero on your table with Work Offsets and Tool Offsets to drop it on the job ;-)

 - Nick

Offline ger21

*
  • *
  •  6,206 6,206
    • View Profile
    • The CNC Woodworker
Re: Confused about work offsets
« Reply #2 on: October 28, 2015, 07:43:48 AM »
Quote
I cannot seem to set the offsets to zero since that just changes the DRO reading, and setting the DRO to zero changes the offset.

That's how offsets work.
I suggest you watch the Homing, Limits and Offsets video at machsupport.com
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Confused about work offsets
« Reply #3 on: October 28, 2015, 09:56:48 AM »
OK, thank you. I did watch the video and it does explain it and I think I understand what I need to do. I am using BobCad CAM to generate most of my code, and the post processor typically adds a G54 command to all programs. I normally move my tool to the left rear corner of my part being held in a vice, lower the tool until touching the top, and then zero all axes. Normally the DROs will display the location of the tool as called out in the G-code, and all is well. However I have had the tool move off the part and start trying to cut in the wrong location, sometimes in air if I am lucky, but sometimes ruining the part by making a cut where it was not intended. When this happens the G-code is calling the correct location, but the DRO is reading a different number. I suspect somehow my G-code must have commanded a different offset (G55 maybe) in the middle of the program. I will watch my code now that I understand that when another offset is in effect, the DRO should read differently than what is being called.

From what I read in the G-code description if my code calls a G53 command, this only applies to one line of code, so I should avoid using G53.

Re: Confused about work offsets
« Reply #4 on: October 28, 2015, 10:56:09 AM »
I am using BobCad CAM to generate most of my code, and the post processor typically adds a G54 command to all programs.

BobCAD-Cam usually adds the offset to each feature, if you compile multiple features you should search through the code for instances of offset commands and delete them when running manually and without correspondingly configured offsets in Mach3