Hello Guest it is October 16, 2019, 01:31:42 AM

Author Topic: Engraving text  (Read 8661 times)

0 Members and 1 Guest are viewing this topic.

Engraving text
« on: April 19, 2011, 07:16:35 PM »
Hi Guys,
I am trying to find a way write a gcode program so that I can engrave a row of text on my part.  At the moment I use the 'write' wizard to creat my engraving gcode which I then cut and paste into my main program.  But I am wanting to find a much cleaner solution, can I somehow call the relevant write macro from within the gcode program somehow? ie G00 X0 Y0 Z0, M750 "FRED WAS HERE".  All my engraving is the same font, same size, same seperation etc, just the text itself changes, and the position where the text is written.  Does anyone have any thoughts on how I can do this?

Thanks for your help

Andrew
Re: Engraving text
« Reply #1 on: April 19, 2011, 08:38:12 PM »

There are solutions depending on what sort of program you are using to draw  your part.

You can of course import your dxf file into LazyCam and then use the text function in LazyCam to write your text.

I use DeskEngrave a free program from www.DeskCAM.com to write my text to a DXF file then import that dxf file into a drawing I have created with CADX11 (another free-be, but if you get really serious you will want to upgrade - its cheap!).  The file is then saved as a DXF and imported into the G-code producing program you are using.  Works with both LazyCam and D2NC.

If  the part you want to engrave has already been made you can have DeskEngrave produce a G-code that you may be able to use in Mach3.  I have never used that option since the part I am making and the engraving have been designed together.   But the code appears to be Mach3 friendly.

CADX can be found at http://www.graytechsoftware.com/

D2NC is an inexpensive program ($79.00) although you can download a complete free trial program.  It does take some practice before being easy to work with, but I really like it.

D2 can be found at http://www.d2nc.com/index.html

AutoCad does not like the dxf files that DeskEngrave creastes and will not create a usable DXF file


Bob @BobsShop - Is not affiliated with DexkCam, CadX, LazyCam, AutoCad, Mach3 or any other entity!


Re: Engraving text
« Reply #2 on: April 19, 2011, 08:57:11 PM »
Hi Bob
Thanks for the reply, I was wanting to define my engraving at the gcode level, so that it is done at runtime, by running a macro possibly.  I don't want to use any external tool to generate my engraving code.
Thanks for your input.

Andrew
Re: Engraving text
« Reply #3 on: April 19, 2011, 10:30:57 PM »
What are you using to compile your g-code?  If you would like to attach a copy of a dxf and tell me what text you want to appear where, I will demonstrate what can be done with the programs I mentioned.  May or may not be what you are looking for.

Bob@BobsShop

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Engraving text
« Reply #4 on: April 20, 2011, 06:21:51 AM »
Hi Andrew - using your current method (the write wizard) how do you determine where you want the position of your text to be? Is your chosen font a monotype? Does the position depend at all on the length of the text?

Ian
« Last Edit: April 20, 2011, 11:17:50 AM by stirling »
Re: Engraving text
« Reply #5 on: April 20, 2011, 05:56:05 PM »
Hi Ian,

At the moment I always program the text at 0,0,0 and have a work offset just for the engraving.  Yes, my font is a monotype style.  No I always start the font at the same point (0,0,0) irrespective of the length of the text.

Regards
Andrew

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Engraving text
« Reply #6 on: April 21, 2011, 01:53:10 PM »
Andrew - I've taken a look at the relevant macros and I reckon what you want to do is possible but it'll involve a fair amount of hacking. Depends how much you want it I guess.

Cheers

Ian
Re: Engraving text
« Reply #7 on: April 21, 2011, 06:10:36 PM »
Hi Ian

I was hacking around with the macro a bit yesterday.  The trouble I have is how to pass the text that I want engraved to the macro.  If you try and use the parameters (P,Q or R) these only accept a double value, so what I did was assign a two digit number to each letter ie A becomes 01 all the way through to Z = 26, I then convert this to a base 6 (senary) binary and then back to a double, In this way If I use all three parameters, I can achieve the number of letters I need to engrave ......... this works ok for me, and it is producing the correct gcode, BUT it isn't very neat.....

 Any thoughts on a better way to send the text string to the macro.

Andrew

Offline BR549

*
  •  6,902 6,902
    • View Profile
Re: Engraving text
« Reply #8 on: April 21, 2011, 06:33:47 PM »
You can pass the text to the macro via the Gcode # variables.

M2222  #1=a #2=b #3=e        etc,etc


Somwhere I have an engraving macro we worked with years ago.  Originally it was writtne in Fanuc Macro B but I  converted it to machism (;-). I can dig it out if you are interested. I was a time saver to be able to call the engraver at will from the Gcode file.


Just a thought, (;-) TP
« Last Edit: April 21, 2011, 06:47:47 PM by BR549 »
Re: Engraving text
« Reply #9 on: April 21, 2011, 07:01:05 PM »
Hi TP
That sound exactly what I am looking for, if you could find the macro I would be very greatfull.

Regards
Andrew