%
O7777(CO ROTATE MOVE)
(G65 P8111 X#24Y25Z#26 OFFSET)I#4(BUILD CO NO)J#5(ORIGIN CO NO)R#18
#4=FIX[#4]
#5=FIX[#5]
#18=-#18
IF[#4GT59]THEN#3000=1(OVER RANGE)
IF[#5LT54]THEN#3000=1(OVER RANGE)
#1=-635(TABLE CENTER X)
#3=-1120(TABLE CENTER Z)
#11=5221+20*[#4-54](BUILD CO X ADRESS)
#12=5222+20*[#4-54](BUILD CO Y ADRESS)
#13=5223+20*[#4-54](BUILD CO Z ADRESS)
#21=5221+20*[#5-54](ORIGIN CO X ADRESS)
#22=5222+20*[#5-54](ORIGIN CO Y ADRESS)
#23=5223+20*[#5-54](ORIGIN CO Z ADRESS)
#14=#[#21]+#24(ORIGIN CO X )
#16=#[#23]+#26(ORIGIN CO Z )
#[#11]=[#14-#1]*COS[#18]+[#16-#3]*SIN[#18]+#1
#[#12]=#[#22]+#25
#[#13]=[#16-#3]*COS[#18]-[#14-#1]*SIN[#18]+#3
M99
%
O7777(CO ROTATE MOVE)
(G65 P8111 X#24Y25Z#26 OFFSET)I#4(BUILD CO NO)J#5(ORIGIN CO NO)R#18
#4=FIX[#4]
#5=FIX[#5]
#18=-#18
IF[#4GT59]THEN#3000=1(OVER RANGE)
IF[#5LT54]THEN#3000=1(OVER RANGE)
#1=-635(TABLE CENTER X)
#3=-1120(TABLE CENTER Z)
#11=5221+20*[#4-54](BUILD CO X ADRESS)
#12=5222+20*[#4-54](BUILD CO Y ADRESS)
#13=5223+20*[#4-54](BUILD CO Z ADRESS)
#21=5221+20*[#5-54](ORIGIN CO X ADRESS)
#22=5222+20*[#5-54](ORIGIN CO Y ADRESS)
#23=5223+20*[#5-54](ORIGIN CO Z ADRESS)
#14=#[#21]+#24(ORIGIN CO X )
#16=#[#23]+#26(ORIGIN CO Z )
#[#11]=[#14-#1]*COS[#18]+[#16-#3]*SIN[#18]+#1
#[#12]=#[#22]+#25
#[#13]=[#16-#3]*COS[#18]-[#14-#1]*SIN[#18]+#3
M99
%