What's new
What's new

Looking for easier/better way to program engraving - CAM? Macro? Both?

Zahnrad Kopf

Diamond
Joined
Apr 5, 2010
Location
Tropic of Milwaukee
Have a onesey part that I need to engrave numbers that change, in intervals along the surface. Essentially, it is a Venier Scale / Degree Ring. I only want to engrave the degree increment at every 5° So, 5, 10, 15, 20, etc... through 360°. The Vernier's hash marks was the easy part. However, the number part is giving me pause. For whatever reason, I'm not seeing an easy way to do this in CAM.

Even modeling all those degree markings would be time consuming. I could create 72 different WCSs but that just sounds stupid and convoluted. And I'd still have to do all the numbers...

This screams macro, to me. But I don't know how to accomplish it. On the one hand, it's incremental numbers like serialization. Just change to increments of 5. Then I confuse myself by considering how to make it aware enough to be single, double, or triple digits where appropriate.

I suppose that the actual degree indexing on the rotary axis is simple enough with calling incremental 5° A-axis moves in between each engraving cycle, but I keep vacillating on exactly how to affect one and then the other. Or to do each in their own subprograms, called by the main?

Ugh.

Anyone ever do something like this?

For reference, here's the Vernier Scale, set up in the machine.

91395703_2596485800621111_39553799374292100_n.jpg
 
Ugh. oney-twosies, nope. But I did learn a while back that Mastercam makes this kind of thing easy. You'd have to find other ways to justify its price though, I'm sure.
 
You might already know this but the HAAS control has a built-in serialization/engraving macro that you could use:

G47 Text Engraving (Group 00)

Just make G47 calls with 4th axis rotation in between each call... I use the equivalent code on my Fadal to engrave sequential serial numbers on my knives...
 
Hi Aaron,

Hope you are doing well. Thank you for your response. I am aware of the G47 engraving routine, as well as the G107 rotary axis wrap. I have an issue where the G47 messes with our probing routines, and this might just be the kick in the arse I need to finally get back to sorting it out. However, it still means that I have to write at least 72 indexes and G47 lines, which I would love dearly to avoid.

I am not aware of how to make the G47 increment in 5, automagically. Are you?

Thanks.
 
Zahnrad,

It has been a while since I wrote anything like this, but I think you need a "do while" loop to make this happen.

%
#1 = 5
o100 do
(print, #1)
#1 = [#1+5]
o100 while[#1 LE 360]
(print,loop finished)
%

Obviously, you would substitute the engraving code for the print statement and add the rotation code inside the loop, but I think some variant of this would work. I hope this helps!

Kevin
 
Hi Aaron,

Hope you are doing well. Thank you for your response. I am aware of the G47 engraving routine, as well as the G107 rotary axis wrap. I have an issue where the G47 messes with our probing routines, and this might just be the kick in the arse I need to finally get back to sorting it out. However, it still means that I have to write at least 72 indexes and G47 lines, which I would love dearly to avoid.

I am not aware of how to make the G47 increment in 5, automagically. Are you?

Thanks.

Hope you are well too mate!

I think a combination of G47 and a do while loop like I_AM_MACHINE mentioned might work well, I *think* you can engrave the contents of a variable, and you could increment the variable by 5 each time the loop restarts... I'm fairly sure I've seen a way to increment the serial by 5 each time as well, but I'm unable to find a reference now. I would happily tinker with this for you but I don't have access to a HAAS control unfortunately!

Personally I think the easiest way is to not use a macro or a loop, and simply copy/paste the code X number of times and change the engraving manually each time... As a professional programmer that hurts me to say, but sometimes the direct solution is the best one! It shouldn't take long at all to write the program this way though!
 
It has been a while since I wrote anything like this, but I think you need a "do while" loop to make this happen.

%
#1 = 5
o100 do
(print, #1)
#1 = [#1+5]
o100 while[#1 LE 360]
(print,loop finished)
%

Obviously, you would substitute the engraving code for the print statement and add the rotation code inside the loop, but I think some variant of this would work. I hope this helps!

Kevin

Kevin,

Thank you. For whatever reason I was simply not "seeing" that. Appreciate the shaking of m'head.


Hope you are well too mate!

I think a combination of G47 and a do while loop like I_AM_MACHINE mentioned might work well, I *think* you can engrave the contents of a variable, and you could increment the variable by 5 each time the loop restarts... I'm fairly sure I've seen a way to increment the serial by 5 each time as well, but I'm unable to find a reference now. I would happily tinker with this for you but I don't have access to a HAAS control unfortunately!

Personally I think the easiest way is to not use a macro or a loop, and simply copy/paste the code X number of times and change the engraving manually each time... As a professional programmer that hurts me to say, but sometimes the direct solution is the best one! It shouldn't take long at all to write the program this way though!

I've tried that in the past, actually. There is something wonky on our machine that it does not like to do variable engraving. It's been a while, so maybe I should revisit it. Just never seems a good time for things like this.

Unfortunately, I fear you are correct. I was simply loathe to do so, and figured that this is a good opportunity to learn. Sigh.

Time to break out Excel :)

Don't laugh. It's exactly what I was doing last night. :cool:
 
Hey, Zahnrad.

I'm not at work to test this.

#599 is the system variable that sets the first number when using P1 in G47.
This trick resets it each time to what you want by having each G47 be the first one.


#599 = 0;
WH [#599 LE 355]DO1;
G01 A#599 F30.;
G47 P1 (###) X.?? Y-.25. I0. J0.5 R0.05 Z-0.005 F15. E10.;
#599=[#599+4];
END1;


Edit: Cleaned it up to reduce it to 6 lines. I'm guessing you can use g187's if you want the fonts to look better if you don't have hi-speed machining.
 
Last edited:
If it were me, I'd lay out the text in OneCNC, along the Y axis. Get each character set nicely centered on each degree mark. Vectorize the text to make it machinable. Use one of the simpler functions to 'engrave all' and just let it post the code as 4th axis wrap. No complex macros or anything, plus get to simulate before making an unnecessary screw up.

This is fairly basic CAM functionality, mind, you do need the 4th axis wrap function for the post processor.
 
Thanks guys. I started to work on this for a little bit :wall:, but got interrupted by a few customers. When I finally got back to it. During that time, Apprentice had gotten it done with CAM. :codger: I'm going to try and continue sort this out for the future, though. Thank you, everyone.

91224221_225454225240420_4297113869662917414_n.jpg
 
#599 = 0;
WH [#599 LE 355]DO1;
G01 A#599 F30.;
G47 P1 (###) X.?? Y-.25. I0. J0.5 R0.05 Z-0.005 F15. E10.;
#599=[#599+4];
END1;

Edit: Cleaned it up to reduce it to 6 lines.

I really like the eloquence of that, Dave. Thank you. I feel even more stupid now for not having thought of that myself. Nice job.
likes.png
 
Edit: Cleaned it up to reduce it to 6 lines. I'm guessing you can use g187's if you want the fonts to look better if you don't have hi-speed machining.
You could probably do it in six words if you used APL/2 .... 'course, only three people on the planet could understand it then :)

Nice looking dials there, mr zahn .... how did you get the white into the grooves so clean ?
 
You can write this in your code to increment by 5 each time, and maybe work it into a sub program?

G47 P1 (##) blah blah
#10599=#10599+4

We do something similar when engraving mutliple parts. But we go kind of backwards and engrave, then do #10599=#10599-1
 
You can write this in your code to increment by 5 each time, and maybe work it into a sub program?

G47 P1 (##) blah blah
#10599=#10599+4

We do something similar when engraving mutliple parts. But we go kind of backwards and engrave, then do #10599=#10599-1

Mike, thank you. Pardon my ignorance, here. I am still incredibly stoopid with macros, yet. But trying to learn still, most days. Why the use of the alias for #599? ( #10599 ) Or, is that just happenstance and is what you are using in your macro, and so just defaulted to it while writing just now?


Nice looking dials there, mr zahn .... how did you get the white into the grooves so clean ?

Yes,please tell,,,looks awesome

Thanks, boys. Appreciate it. Bone simple, really. Paint pen. :cool: A "Super Met-Al" pain pen, #01295. We mill/engrave the markings, apply paint pen, allow to dry, and then simply scrape/rub with a straight edge to remove excess. I've found it best for these types of efforts, as abrasive paper alters the surface aesthetic too much for my tastes, and Scotch-Brite tends to dig in too much and remove paint. I do it with gears in the shop, too. Makes it much easier on these old eyes. I use Yellow on those.


31qM3QyhXoL._AC_.jpg

70712885_682720308886624_5600216082594380711_n.jpg
 








 
Back
Top