Hello Guest it is August 18, 2019, 01:51:40 PM

Author Topic: G16 and G83 interaction (again)  (Read 1927 times)

0 Members and 1 Guest are viewing this topic.

Offline rcaffin

*
  •  1,003 1,003
    • View Profile
Re: G16 and G83 interaction (again)
« Reply #10 on: December 08, 2017, 03:13:03 PM »
I don't think it was the display bug as I did try running the test programs. The DROs matched the screen.
Mind you, I agree 100% that the display itself has some problems. Apparently the display driver uses slightly different code from the axis driver and can lose track of some things, especially G52 origin shifts. OK, we know about that one - although novices have to be warned regularly.

Of the two programs above:

The first works fine, but I personally do NOT like the coding style. The 4th line, 'X3 Y0' is seriously obscure: you have to go several lines backwards to see what it refers to. Ditto the 5th line in 2nd example. In my world that is not good code, and today with PCs with Gigabytes of memory there is no need for this sort of thing. We are not running paper tape and 2400 baud serial lines any more. OK, that's my preference; ymmv.

I don't like the incremental style in the 2nd example as it can lead to all sorts of bungles. It takes a bit of thinking to figure out how it works. Now, to be sure, the machine can do that, but if you ever have to modify that sort of  program it will take some time to get it right. I prefer my programming to be as clear as possible - for later maintenance. Again, ymmv.

And my 2nd and 3rd variations still don't work. There is a bug. Oh well.

Cheers


Offline RICH

*
  • *
  •  7,351 7,351
    • View Profile
Re: G16 and G83 interaction (again)
« Reply #11 on: December 08, 2017, 04:56:20 PM »
Different styles of programing, yes there certainly are...........
BUT

G16 (Hi guy you are in polar mode)
X3 Y0  (X=3 radius and Y=degrees and don't care about where I came from as that part is done and over)

Guess we all think differently.............. ;D

RICH
 

Offline rcaffin

*
  •  1,003 1,003
    • View Profile
Re: G16 and G83 interaction (again)
« Reply #12 on: December 08, 2017, 05:03:46 PM »
Hi Rich

Yes, but are you saying that you can issue a command line 'X3 Y0' just like that, without any g-code, or does it revert to the G0 from several lines back?
I really do not like that sort of obscurity and ambiguity!  Life is difficult enough already ...

Cheers
Roger

Offline RICH

*
  • *
  •  7,351 7,351
    • View Profile
Re: G16 and G83 interaction (again)
« Reply #13 on: December 08, 2017, 10:18:47 PM »
Roger,
I think that the intent of the G16 was to make it easy to drill about a point without figuring out or doing any calculations. As the command definition says, the current coordinates of the controlled point is the pivot point.

So you move to some location, and then using G16 you just tell the controller on what radius and angle you want to drill the holes.

If you have that thought in mind when using it then it is not confusing at all. If the radius stays the same then only need to define the angle if in incremental mode as Terry showed.

The AR is hungry and need to make up some food for it.....later

RICH

Offline rcaffin

*
  •  1,003 1,003
    • View Profile
Re: G16 and G83 interaction (again)
« Reply #14 on: December 09, 2017, 01:00:59 AM »
Hi Rich

I know that of course. But drillling a ring of holes is not the only use for polar coordinates.
My current application steps through Y over a full rev in 1 or 2 degree increments, and recalculates X (radius) for each angle. Parametric subroutines and all that. As Z also comes into play here, I need very clear code or I get lost in the wilderness...

Cheers
Roger

Offline BR549

*
  •  6,886 6,886
    • View Profile
Re: G16 and G83 interaction (again)
« Reply #15 on: December 09, 2017, 06:45:15 PM »
Actually Inc programming is among teh simplest ways one can program. It is teh easiest to follow most modern blueprint values. Rarely do you see drawings in ABS values. Now can it get complicated ?? yes if you want it to be (;-). The best part about it is it is easy to use the same code over and over again. For expmple if you program to machine a hole if you do it in inc you can use that same code anywhere as the code describes teh hole function NOT where you are going to bore it. Works very well in SUBS and parametric programing.

In teh old world we always moved to teh center point location before starting to machine a circle , hole ,bolt circle, anything circular. This allows a quick check to make SURE teh function is located correctly. Teh move to a center point is also always notated in teh Gcode

G0 X0 Y0 ( Center point of Bolt Circle)

But as always to each their own (;-) TP
« Last Edit: December 09, 2017, 06:56:43 PM by BR549 »

Offline rcaffin

*
  •  1,003 1,003
    • View Profile
Re: G16 and G83 interaction (again)
« Reply #16 on: December 09, 2017, 06:52:23 PM »
Hi Terry

To be sure, it makes a nice little sub for drilling a ring of holes - as long as you do NOT use the code example in the Mach3 manual. There is still that bug.

Cheers
Roger

Offline BR549

*
  •  6,886 6,886
    • View Profile
Re: G16 and G83 interaction (again)
« Reply #17 on: December 09, 2017, 08:56:14 PM »
That really is not a bug but a code example that was not written correctly.

(;-) TP

Offline rcaffin

*
  •  1,003 1,003
    • View Profile
Re: G16 and G83 interaction (again)
« Reply #18 on: December 09, 2017, 09:39:44 PM »
Does it work?
No.
That's all that matters.

Cheers
Roger

Offline BR549

*
  •  6,886 6,886
    • View Profile
Re: G16 and G83 interaction (again)
« Reply #19 on: December 09, 2017, 11:37:05 PM »
It would work IF it were written correctly (;-)

(;-) TP