Originally Posted by
everettengr
well.., i'm stumped.
i run the simple program below.
it records initial x y z positions, stops the program, i JOG x y z positions, rerecord x y z positions, then probe z axis and record final z position.
the program is restarted using Option 3 and it does what it says it does which is to keep original coordinate system. this is correctly shown on the absolute coordinate display on the monitor.
but when axis position is read using Axis Position Variables the absolute position is not recorded correctly.
what is recorded is the position prior to the the JOG???
at this point i will have to run two separate programs, one to calculate the center of the circle (x & y) and another get the z position. bummer...
i suspect this is my error, but i just can't seem to figure it out...???
Option 3 will cause the tool to remain at this current position, the tool
coordinate system will remain at its original position, and execution of the
program will continue.
O0010 (PROBE.ZTEST)
N5 #CLEAR
N10 #PRINT "Z PROBE TEST WITH JOG"
N15 #PRINT "SAVE IN FIXTURE OFFSET TABLE"
N20 #PRINT "INPUT FIXTURE OFFSET #"
N25 #INPUT V10
N30 #R9=V10
N35 M64 M66
N40 (SAVE INITIAL X Y Z POSITION)
N45 #V18=AX
N50 #V19=AY
N55 #V20=AZ
N56 #R1=V18
N57 #R2=V19
N60 (STOP PROG FOR X Y Z POSITION JOG)
N65 M0
N70 (Z PROBE TOUCH MOVEMENT)
N75 G1 G91
N76 #V28=AX
N77 #V29=AY
N80 #V30=AZ
N85 #V31=V20-V30
N90 Z-3.0 F15. G31
N95 Z.50 F15. G31.1
N100 Z.01 F15. G1
N105 Z-3.0 F.1 G31
N110 #V5=AZ
N115 #V6=(V5+10.4593-V31)
N120 #R3=V6
N125 G1 G91 Z.5 F30.
N130 (SAVE Z TOUCH POSITIONS TO FIXTURE OFFSET TABLE)
N135 G90 G10 L2 P+R9 X+R1 Y+R2 Z+R3
N150 M0
N155 M30