On 1/29/23 05:18, andrew beck wrote:
Thanks gene
Hey you might know how to loop a gcode file
I want to loop a gcode file 50 times.
Eazy peazy, Andrew.
Define the part as a subroutine keeping in mind the subroutine must be
first in the .ngc file.
Allocate a counter var and set it near the top of the file
#<_varname>=50
That is a global variable, declared by #<_name>, available anyplace in
the file. Leave out the leading underscore and it becomes available only
in the "scope" of that routine.
So if you want a reusable varname, seen only inside that sub to serve as
an increment/decrement value for a size, declare it in the sub code as
#<name>. so the sub can do exactly the same turndown to target size in
its own loop.
Wrap the code that makes the part in:
o200 Sub
your part code goes here
o200 endsub
Then do the loop 50 times
o100 While [<#_varname gt 0.00000]
o200 call
#<_varname> = [#<_varname. - 1.000000]
o100 endwhile
M2 (shutdown, done)
load this once, hit r to repeat it till you wear out the r or are out of
stock
Page numbers will be different, but in the 2.10 (master)
Ducumentation.pdf start reading at "Usage", "g codes", "o codes", around
page 945. Its all there. Highly recommended reading.
I'm fond of 2 editors, "nano -l /path/to/filename" works in any
environment. And geany works even better in x or wayland. gedit comes to
mind, but I've had gedit destroy weeks of work in a blink, quite a few
times, so its been banned/purged from my machines. Geany has never saved
anything by scrambling the content. WYSIWYG IOW.
Someplace in my midden heap of nc_files, I have a 90 line file that
takes 3 days to run on a mill I no longer have, sharpening a dull
carbide ATBF 10" saw blade. Sharper by far that any new blade, I just
took about 3 thou of the face of every tooth on it using a 4" motorized
table to position the blade while a dremel carrying one of their $20
diamond disks was just touching it. Literally one step of the motor on
the rotary table at a time.
Don't try that on a steel blade, you'll just burn up the diamond because
there's carbon in both. On tool steel like a lathe tool, use a CBN
wheel. No carbon to alloy with the HSS until its hard enough to heat and
destroy the diamond.
Bring money in little red wagons but its magic for lathe tools. Don't
crowd it though, your grinding HSS tool steel at the right rate if you
can see the dust drifting away in a strong light, but not a lot of fire.
With a 2000 grit wheel, you get an edge finish like a mirror w/o a wire
edge that dulls quickly by breaking off the wire edge. Works on dull
carbide tools too.
Ideally using m98 and m99
But I'm a bit stuck on how to do it.
Does anyone have some tips?
This is for bar pulling in CNC lathe
M400 unclamps chuck and m401 clamps chuck
And I need some way to loop the g code
On Fri, 27 Jan 2023, 15:12 gene heskett, <ghesk...@shentel.net> wrote:
On 1/26/23 16:42, andrew beck wrote:
hey guys
just wanted to let people know i just made a tutorial on custom m codes
and
i couldn't find much info on it and wanted to help the next guy and
remind
myself when i forget next time lol
https://forum.linuxcnc.org/10-advanced-configuration/48071-custom-m-codes-and-bar-puller-set-up#262959
and also if any of you machinists have good tips for bar pulling on a cnc
lathe i would love the ideas i have never done it before
regards
Andrew
I don't have a bar puller, not even a 5C collet, just an ER42 collet
kit. If I am doing multiple copies, I position the tool to act as a
stopper, loosen the big nut and push the rod thru to touch the tool,
tightening the nut again gets me a couple thou clearance but that can be
compensated for in your program. With a reasonable speed of bar pusher
so it does not damage the tool when it hits the tool, it ought to work
till you are out of that bar.
One could put a microswitch in the position of the tool to automate
that, including a shutdown when the bar no longer trips the switch in a
long enough time it should have tripped.
With a couple solenoids to engage the nut wrench, and a reversible vfd,
that all could be programmed. Even to ejecting the bars remains and
feeding a new one from a rack of them could be done.
Lots of ways to skin that cat. This is just three ideas.
Take care and stay well, Andrew.
Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/>
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users
.
Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/>
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users