Hello Guest it is May 24, 2019, 05:38:29 PM

Author Topic: Improved g83 macro with bug fixes (I hope)  (Read 1655 times)

0 Members and 1 Guest are viewing this topic.

Improved g83 macro with bug fixes (I hope)
« on: August 10, 2016, 07:07:46 AM »
The really slow speed of the G83 instruction in Mach3 Lathe bugged me so much I had to try to fix it.
See attached for my new version - you will have to rename it to M1083.m1s of course. I would welcome test results.
(It works fine for me, but I recommend some air cutting first.)

There was a line of code missing in the version in the .062 kit, to do the rapid feed down to near the last drill depth. Without this instruction the Z axis crawled along at G1 speed the whole way, each time. I have fixed this.
I have also tidied up the code a bit. There is still one wierdo in there which I do not understand, but it does nothing.

Now, this is for the lathe, so it ASSUMES that X=0 and ignores any X value you might provide. I suggest you move to X=0 BEFORE you use this macro. If you really want, a move to X=0 could be inserted in the macro, but I strongly prefer that such moves be explicit, so I know when they are going to happen.

Cheers
Roger
Re: Improved g83 macro with bug fixes (I hope)
« Reply #1 on: August 11, 2016, 09:07:05 AM »
Thanks Roger; that will be a great time saver!  I'll try it out when I get back to doing to some lathe work.  Stuck on the mill with tons of work at the moment. :(
Milton from Tennessee ya'll.
Re: Improved g83 macro with bug fixes (I hope)
« Reply #2 on: August 13, 2016, 01:03:04 AM »
Sorry all - there are still some funnies in the M1083 macro.
It works for the normal basics, but you can have some accidents if you go outside the 'normal'. I am currently trying to rewrite it from scratch to handle all the bugs. I would like to add an extra feature to it while staying within the obvious requirements and expectations.

Cheers
Roger
Re: Improved g83 macro totally rewritten
« Reply #3 on: August 14, 2016, 05:55:20 AM »
OK, attached is the totally rewritten version of M1083.m1s.
Also attached is an explanation of what it is all about.
I would love to hear from anyone who has tried it, successfully or otherwise, and especially if you have found any bugs.

Cheers
Roger

Offline RICH

*
  • *
  •  7,332 7,332
    • View Profile
Re: Improved g83 macro with bug fixes (I hope)
« Reply #4 on: August 14, 2016, 07:30:28 PM »
No sure if you are aware of it but you can find some drilling macro's for the lathe here:

http://www.machsupport.com/forum/index.php/topic,15205.msg101682.html#msg101682

May be worth having a look at the code, haven't used recently but it did work fine on the lathe.

For Reference,

RICH
Re: Improved g83 macro with bug fixes (I hope)
« Reply #5 on: August 14, 2016, 09:03:54 PM »
Hi Rich

Thanks for the comment. Yes, I was aware of that version. It is HUGELY complex and cannot be used from the MDI page, which to my mind is a real limitation. I like to be able to test from the MDI.

The method of passing parameters used in that version is a bit of a hack, and I don't think all those parameters should be in the M83 command anyhow. For instance, if you want to set the feed rate for the drilling, I think one should do so explicitly. If you want to have a pause at the bottom of the drilling, there are other G8n commands for that. And having to start every line with Naa(tab) is a right bore: I omit line numbers completely. OK, it is just not my style. :)

Also, the macros do not explicitly handle the case of a negative retract value, which was a major reason for what I did. I wanted retraction to clear the drill flutes, but to keep the drill engaged in the hole. This does of course mean that my version is NOT suited to using the L variable if you have R negative. Fine: I can simply loop in a subroutine in that case, and my code never goes into the incremental mode anyhow.

I have to admit: i have not done much testing of the original version with a negative Retract value. As I wanted to fix the slow crawl back into the hole anyhow, and the original version was in a bit of a mess imho, I found it easier to rewrite the lot.

Different folks, ...
Cheers
Roger

Offline RICH

*
  • *
  •  7,332 7,332
    • View Profile
Re: Improved g83 macro with bug fixes (I hope)
« Reply #6 on: August 15, 2016, 08:35:53 AM »
Just another reference, Drill Wizard for Turn ,that may be of interest.
I incorporated the wizard into my screen set.

Here is the link:

http://www.machsupport.com/forum/index.php/topic,16533.msg112079.html#msg112079

RICH
Re: Improved g83 macro with bug fixes (I hope)
« Reply #7 on: August 15, 2016, 04:57:14 PM »
Hi Rich

Thanks. I started by searching for threads on G83, but didn't get very far that way. A pity: it seems I missed a lot.

Yes, I too have been 'upgrading' the basic 1024.lset, mainly to take advantage of the modern screens which are slightly larger than 800x600 pixels. I haven't added any significant features, just moved things around a bit and made the tool path window MUCH bigger. I use the displayed tool path for a lot of my g-code debugging.

I tried to use Screen4, but I had problems with it so I switched to Klaus's latest version of MachScreen to do it.

Cheers
Roger