Hi all... Machine is Daewoo Puma 2100SY FANUC 32i control. Trying to set secondary home for tool changes both on main and sub spindle. Having 2 separate issues. I have a macro program that we use in another Puma but with 18i control:

O9999(SET G30 FROM CURRENT POSITION)
#100=[#5021*25.4]
#101=[#5022*25.4]

#102=[#101*1000]
#103=[#101*1000]
G10L50
N1241P1R#102
N1241P2R#103
G11
M30

Issue when running this (besides having to change G10L50 to G10L52) is that after I run this it the value entered into the parameters is way off..

N1241 X axis, machine pos. 13.289 after running should be 337.54. Actually comes up as 857.354
N1241 Z axis, machine pos. 6.7594 after running should be 171.696. Actually comes up as 1177.287

Somewhere the calculation is off or possibly I am using the wrong system variable for machine pos.??

I can work around it by entering the values manually into parameter 1241 for safe tool change to use for both spindles, and using 1242 for the main side and 1243 for the sub side.

OK, now issue # 2 I am having...when I either in MDI or in the program use G30 U0 W0 it goes to the home position, however when I enter G30P3U0W0, I get an alarm "46 - ILLEGAL REFERENCE RETURN COMMAND" same result with G30P4U0W0.

Any ideas or suggestions?
Thanks in advance!