Hello all ... I am engraving, using command L9201, on some work-pieces. The program that I am using / writing utilizes user-input variables based on measurements that the operator takes on the workpieces ... in this way, I am trying to get a uniform depth of engraving on workpieces whose engraving surfaces vary, in z-height, fairly substantially from one piece to another. My question is that L9201 appears to go beserk when I use a variable to define the depth of engraving. The pertinent portions of the code:
N8 G20
N9 G90 G17 G64 G40 E6
N10 M5 M9
N11 #CLEAR
N12 #PRINT "ENTER THICKNESS IN S/N AREA"
N13 #INPUT V1
N14 #PRINT "ENTER DELTA BETWEEN ENGRAVING SURFACES"
N15 #INPUT V2
N16 (V3 = THICKNESS IN S/N AREA USED WHEN ZEROING TOOLS)
N17 #V3=0.882
N18 (V4 = DELTA Z-HEIGHT, IN S/N AREA, FROM NOMINAL)
N19 #V4=V1-V3
N20 (R1 = Z DEPTH OF SERIAL NUMBER AND LOGO)
N21 #V11=V4-0.006
N22 #R1=V11
....
N68 G0 X3.855 Y0.095
N69 G0 D30 Z0.1
N70G0 Z0.018
N71 L9201 R0+0.018 R1+1. R2+0.1 R3+0 R4+1. Z+R1 F25. (TACTICAL
N72G0 Z0.1
N73 G0 X4.58 Y0.095
N74 G0 Z0.018
N75 L9201 R0+0.018 R1+1. R2+0.1 R3+0 R4+1. Z-0.003 F35. (KINETICS
N76 G0 Z0.1
....
So ... variable R1 defines the depth of engraving in the pertinent area. The value of R1 evaluates to -0.003. So line N71 has the z-depth defined by the variable R1 while line N88 simply defines the Z-depth in the usual way. There's a screenshot in the attached image showing N71 is evaluated to have Z-0.003. Fantastic!
The problem is that it goes crazy at line N71. It begins to retract to Z=1.000 and then rapid back down to the cutting depth (which does appear to be accurate) over and over ... eventually I get a Z-axis servo motor fault before it can finish engraving "TACTICAL". It is as if the act of having the z-depth defined by variable R1 messes with the R0 (retract value). Line N75, conversely, works perfectly having the Z-depth defined in the usual way.
Again, to restate my problem, is that Z-0.003 doesn't engrave every part correctly ... sometimes its too light and sometimes its too deep ... thus the operators measure the part beforehand and enter pertinent thicknesses/measurements via the console so that the controller calculates the correct z-heights. I hope this makes sense ...
In short, what in the wide-wide-world-of-sports (in lieu of many other expletives) is going on? This program works wonderfully defining z-depths everywhere else in the program (we're engraving a picture, for goodness sakes, and the z-depth of that picture is always evaluated correctly to its R-variable - because its a bunch of G0, G1, G2, and G3 moves). Its something to do with this L9201 ... the reason I'm using the L9201 is that each part has to be serialized ... and serializing (which is on line N90 or so), via L9201, works perfectly (except for being unable to define the z-depth via a variable).
Can anyone help?
Thanks in advance!