Numeryx Home > User/Programmer

Engraving

An-112, Copyright © by Gil Hagiz
Last updated Nov-21-2005
For version 5.11 and higher
(For version 6.02)


Introduction

The engraving sub program can be called from any program for engraving characters.
The program is provided by the installer/retrofitter.
The text to engrave is written in English characters and its source can be plain text, received from a data entry program, functions that return text, e.g. date$, or a variable, e.g. part number.
To produce the test-pattern below, comment the line: menuhelp and run Engrave as a program.

Engraving Explained

The text to engrave is entered in a string variable A$.
The associated numerical data is entered under letter addresses.
A$ must be defined in the beginning of the user program before other arrays:

dim A$(80)
This statement allocates memory for an 80 character string A$.
A$ is set by the user program and read by the engraving sub-program.
To assign text to the string use plain text or functions that return strings, e.g.:
A$='TODAY IS '+date$
A$=str$(123456)         \converted according to the last programmed Format)
A$=str$(#10)            \#10 can be set as a part counter

To call the engraving sub-program a line like this is used:

g4 x-5 y-1 z.1 k-.1 @r-1 @p180 E2 call 'engrave'
Where:
G4 Required if G0 priority for Z is not set (some 5-axis machines)
XY Beginning of text
Z  Rapid plane
K  Cutting depths
@R Scale
@P Rotation
E  Spacing
The last 3 addresses were selected because they are set to zero at the beginning of a program and in most programs they aren't used.

Notes:

Once all variables have been assigned, for the next text the most likely changes are the position, so it is enough to enter:

g4 x-5 y-1 z.1 call 'engrave'

The available character set is:

Space, 0 to 9, A to Z,  +  -  :  .  /
Other symbols may be added by the user. Lowercase alpha characters are converted to uppercase and undefined characters leave spaces.

Sample Program

Notes:


dim A$(80)
copy(cnx$+'bin\engrave.cpl', cpl$)

. . . .

A$='ACME INC'
X-5 y2 z.1 k-.1 f40 Call 'engrave'

. . . .

format(1,0) A$=str$(#20)
x2 y-4 z.1 Call 'engrave'