View Full Version : engraving with variables


Shizzlemah
06-08-2005, 09:05 PM
Hey folks,
I want to use L9201 to engrave a number on a workpiece. The number is contained in the V9 variable.

L9201 R0+.1 R1+0. R2+.5 R3+0. F20 (TEST V9
will engrave "TEST V9"

L9201 R0+.1 R1+0. R2+.5 R3+0. F20 (TEST #V9
will engrave "TEST #V9"

L9201 R0+.1 R1+0. R2+.5 R3+0. F20 #V9
gives an error "only / allowed in macros"


So is it possible to engrave a number from a variable?
Any thoughts??

gar
06-09-2005, 03:47 PM
050609-1430 EST USA

Shizzlemah:

No idea on Fadal. On newer HAAS machines G47 is Text Engraving.

G47 P0 (ENGRAVE THIS) ------- engraves the string ENGRAVE THIS
....... this looks similar to what you described.

Additionally HAAS has

G47 P1 (####) --------- this is a formatting command of sorts where
........ the number of # positions indicates the number of digits engraved.
........ No description if this becomes a mod N number internally or not.
........ If you have MACROS you should be able to do a DPRINT of the
........ content of #599.

The initial serial number can be set to 5031 by
G47 P1 (5031) ....... or whatever number you want.

or load macro variable #599 with the initial value, does not require MACROS.

I have never tried this, and as usual the description in the manual is vague.

What you can not do is work with string variables because there is no provision for such animals.

www.beta-a2.com

.

Neal
06-09-2005, 04:05 PM
The L9201 Engraving Cycle is strickly literal. It will only engrave the exact characters after the "(" sign. Macro statements can not be on the same line as any "G" codes.
You can serialize by using R1+2 font and add R4+1 for the increment you wish:
L9201 R0+.05 R1+2 R3+0 R4+1 Z-.005 F40. (Test 01
This line will increment by one (R4+1) each time the cycle is executed.

Neal

Shizzlemah
06-10-2005, 06:15 PM
Thanks guys, I guess I'll have to write a pile of code to get this job done.

Shizzlemah

gar
06-10-2005, 09:57 PM
050610-2050 EST USA

Shizzlemah:

I do not known enough about Fadal to understand Neal's comment, but from a genaral standpoint I would not classify the job as a large amount of code. I believe it was on Gurus where I showed someone how to do this.

Division by 10expN and use the integer value of the result to extract digits from the variable.

beta-a2.com

.

Shizzlemah
06-11-2005, 09:13 AM
Neal's post said that the command will engrave text or numbers, and can increment numbers - but you can't pass a macro variable.

It will probably be about 30 lines of code, not horrible but nowhere near as convenient as one ! Divide and pull out each digit, engrave it, and move the machine some distance based on which charachter was just engraved.

I'm not scared, just was hopin' for a shortcut :)