G-code to engrave numbers on cylinders

More
29 Sep 2017 20:44 #99642 by Smokeys
I guess I envisioned a sub for each g code.

I could do this is fusion 360, but incrementing the serial number for each one seems better suited to a gcode program. There must be something like this out there already.

Please Log in or Create an account to join the conversation.

More
03 Oct 2017 21:38 #99860 by andypugh
I am pretty sure that you could write a G-code sub to carve sequential alphanumeric strings as serial numbers.
I thought you wanted to carve arbitrary strings. In that scenario the hard part is passing the strings to the G-code.

Please Log in or Create an account to join the conversation.

More
10 Jul 2018 00:53 - 10 Jul 2018 01:21 #113914 by Boltonbrass
Andy you are my savior. All I need is Bolton Brass engraved on a 1/2" round piece of brass with a single letter or number below it. And I agree with BigJohnT, that is slick as hell. Please tell me you make money doing this......
I know I am late to this post, but where do I start with xza?
Sonny
Last edit: 10 Jul 2018 01:21 by Boltonbrass. Reason: Adding a question.

Please Log in or Create an account to join the conversation.

More
10 Jul 2018 10:04 #113935 by andypugh

Boltonbrass wrote: Andy you are my savior. All I need is Bolton Brass engraved on a 1/2" round piece of brass with a single letter or number below it.


This might not be too hard, you only need a few extra letters (B,o,l,t,n,r,a,s)

But: The point of this routine was to generate the numbers on-the-fly for scale rings of various types (0-360, -180-180, 0-10. 0-25 etc)
For engraving the same words many times it is probably sensible just to use a CAM system like Fusion360 to create the G-code once :

If you want to use this G-code, then it might help to explain how it works.
Each number is created by joining points on two octagons. (generally). I worked out the coordinates of the required points, typed them in (probably in Excel) and then formed them in to the subroutines (again, probably using Excel, but it was quite a while ago)

This is the number 8
 O8 sub
 G92 A0 X0
 G0 A[0.2357 * #41] X[0.5690 * #42] Z[#<_dia> / 2 + 1]
 G1 Z[#<_dia> / 2 - #<_depth>]
 A[-.2357 * #41] X[0.5690 * #42]
 A[-.3333 * #41] X[0.3333 * #42]
 A[-.2357 * #41] X[0.0976 * #42]
 A[0.0000 * #41] X[0.0000 * #42]
 A[0.2357 * #41] X[0.0976 * #42]
 A[0.3333 * #41] X[0.3333 * #42]
 A[0.2357 * #41] X[0.5690 * #42] 
 A[0.3333 * #41] X[0.6667 * #42]
 A[0.2357 * #41] X[0.9024 * #42]
 A[0.0000 * #41] X[1.0000 * #42]
 A[-.2357 * #41] X[0.9024 * #42]
 A[-.3333 * #41] X[0.6667 * #42]
 A[-.2357 * #41] X[0.5690 * #42]
 G0 Z[#<_dia> / 2 + 1]
 G92.1
 O8 endsub

The factors #41 and #42 are used to scale in the A and X directions. Here are the points plotted in Excel:



You would Need to create the letters you need in the same way, and form them into a subroutine looking like the existing digits.
I would suggest using ASCII to name the subroutines:

B = 66
o = 111
l = 108
t = 116
n = 110
r = 114
a = 97
s = 115


. Please tell me you make money doing this......

I actively avoid making money from this. It's important to me to keep it a hobby.
Attachments:
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
30 Aug 2018 20:46 #116888 by andypugh
I have modified the code to also do the tick marks.

Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.138 seconds
Powered by Kunena Forum