Hello Guest it is October 16, 2019, 06:48:26 PM

Author Topic: G12 not moving Y axis, sometimes.  (Read 3214 times)

0 Members and 1 Guest are viewing this topic.

G12 not moving Y axis, sometimes.
« on: May 26, 2013, 12:10:33 PM »
Hello - I recently got a cnc with Mach3 and I have been slowly getting to know it and how to use it.  The table that came with the machine was done, so I want to make a new table.  I wrote a little gcode program to drill and counterbore for the socket cap screws that hold the table to the base using a 1/4" end mill.  There are about 30 holes in the table.

Most of the holes are fine - their counterbore is round, and the socket cap screws fit with a little slop, as planned.

But a few of them do not have round counterbores - the tool enters the workpiece, moves in the positive x direction, moves back to the center, drills, and returns.  The Y axis is never engaged.  I have tried it with the spindle on and off, with a workpiece and without, it always does the same thing.  One of the holes is the very first so I thought it might be softlimits, but another hole is out in the middle of the field.  I also suspected the machine itself, but it is incredibly consistent - always the same holes, always the same way, I never see the y-axis steppers move at all, and the x only goes and comes back. I am using Mach3 R3.043.066, appropriately licensed to me.


The code is very simple, here is an excerpt:
...
g0 x.8622 y.8208
m98 p2345
g0 x.9060 y12.2972
m98 p2345
...

o2345
g1 z-.5
g12 i.078125 f10
g1 z-.875
g12 i.015625 f10
g0 z.25
m99

As you can see, it moves around to all the locations of the screws (which are not at all regular) and at each location calls the subroutine o2345 which uses g12 to cut two circular pockets - one counterbore, .5" deep, a little over 3/8" in diameter, the other 7/8" deep, a little over 1/4" in diameter.


Thank you for any thoughts you might have!

Bart

Offline Hood

*
  •  25,855 25,855
  • Carnoustie, Scotland
    • View Profile
Re: G12 not moving Y axis, sometimes.
« Reply #1 on: May 26, 2013, 12:43:09 PM »
The most likely causes are binding axis or possibly bad wiring connections, especially when it is just at certain locations.
Hood
Re: G12 not moving Y axis, sometimes.
« Reply #2 on: October 13, 2014, 07:26:27 PM »
I would like to open up this issue for discussion again. Recently I have been trying to do some milling operations to create round holes of diameters not available in common drill bit sizes. I'm using the latest version of Mach3 (R3.043.066). G12 is the operation of choice but I am experiencing the same problem as described in the original post on this topic. The problem occurs with various combinations of X and Y coordinates and hole radius (G12 I parameter) but not with very small variations of the parameters. G13 always seems to work correctly for any parameters. Would anyone care to try the following simple G code as one example to see what happens? This can be done quickly from the standard MDI screen Input entry box. No specific hardware is involved, I'm doing it in off-line mode to debug and simulate code before moving to the actual CNC mill. Just watch the X and Y position displays to see the results.

1. Correctly moves the Y axis:
G0 X5.2432 Y1.4525
G12 I.127

2. Fails to move the Y axis:
G0 X5.2432 Y1.4526
G12 I.127

3. Correctly moves the Y axis:
G0 X5.2432 Y1.4526
G13 I.127

As you can see the only difference is 0.0001 for the Y coordinate, but the behavior is quite a bit different for G12. The same parameters work correctly for G13. It looks to me like a high probability of a bug in G12.
« Last Edit: October 13, 2014, 07:42:03 PM by tom8o »

Offline Hood

*
  •  25,855 25,855
  • Carnoustie, Scotland
    • View Profile
Re: G12 not moving Y axis, sometimes.
« Reply #3 on: October 14, 2014, 03:00:14 AM »
All seems to be working fine for me in simulation with 066 version. See vid here
http://youtu.be/fh1dBZDjttQ

If you attach your xml I will test with it.
Hood
« Last Edit: October 14, 2014, 03:01:57 AM by Hood »
Re: G12 not moving Y axis, sometimes.
« Reply #4 on: October 14, 2014, 03:59:08 AM »
Ok, thanks. Here it is.

Offline Hood

*
  •  25,855 25,855
  • Carnoustie, Scotland
    • View Profile
Re: G12 not moving Y axis, sometimes.
« Reply #5 on: October 14, 2014, 04:05:27 AM »
Ok I get te issue with your xml, so that is good at least.
Will have a look later to see if I can work out what the problem is.
Hood

Offline Hood

*
  •  25,855 25,855
  • Carnoustie, Scotland
    • View Profile
Re: G12 not moving Y axis, sometimes.
« Reply #6 on: October 14, 2014, 04:08:03 AM »
Ok think it is the IJ mode, shove a G91.1 at the start of your code and try again.
Hood
Re: G12 not moving Y axis, sometimes.
« Reply #7 on: October 14, 2014, 04:59:38 PM »
Yes, that fixes it. I checked my configuration and I see that IJ absolute mode is selected in the general configuration screen, so G91.1 obviously overrides that and changes to incremental mode. Also G90.1 executed any time after G91.1 breaks it again, as you might expect. Interesting though that in IJ absolute mode for some Y coordinates and G12 I values, G12 works yet for others it doesn't. The inconsistencies for different Y coordinates, I values, and between G12 and G13 are rather suspicious, particularly since the G-Codes documentation indicates that G90.1 and G91.1 should only affect G02 and G03.