Hello Oovo,
Using arbitrary values for #5001, #5002, #5003 of X0.0, Y0.0, Z50.0 respectively and values passed with the Call Block of:
#7 = 50.0
#20 = 20.0
#8 = 2.0
#11 = 0.0
#18 = 2.0
#26 = -21.5
Following is the resulting NC Code.
G0 G90 Z50.000
G0 G90 Z2.000
G91 G1 X15.000 Z-2.000
G3 G91 I-15.000 Z-2.000
G3 G91 I-15.000 Z-2.000
G3 G91 I-15.000 Z-2.000
G3 G91 I-15.000 Z-2.000
G3 G91 I-15.000 Z-2.000
G3 G91 I-15.000 Z-2.000
G3 G91 I-15.000 Z-2.000
G3 G91 I-15.000 Z-2.000
G3 G91 I-15.000 Z-2.000
G3 G91 I-15.000 Z-2.000
G3 G91 I-15.000 Z-1.500
G3 G91 I-15.000
X-15.000 I-7.500
G0 G90 Z2.000
G0 G90 Z50.000
X0.000 Y0.000
Accordingly, there appears to be no issue with the structure of the Macro. However, you have no Feed Rate specified in the Macro that doesn't work for you, whereas, you have a Feed Rate specified in the Macro that does work for you. Depending on the magnitude of the Feed Rate that was set in the Calling Program, this will be the issue.
You say that the error occurs in the first execution of the WHILE LOOP. As the error doesn't occur with the G91G1X#27Z-#18 prior to the WHILE LOOP, there must be a Feed Rate specified in the Calling Program. When executing Helical Interpolation, the Feed Rate is specified along a circular arc. Therefore, the feed rate of the linear axis (Z in your case) is as follows:
FZ=LZ/LC
Where:
FZ = Linear Axis Feed Factor
LZ = Linear Axis Length
LC = Circular arc Length
The above ratio is used to determine the feed rate so the linear axis feed rate does not exceed any of the various limit values set via parameter. There are parameters that can be used to prevent the linear axis feed rate from exceeding various limit values. Therefore, the reason the program may work on your other machines and not the 10M, is that the Feed Rate Limits may be set differently and or the parameter to prevent the linear feed rate exceeding various limits may be set on your other machines and not the 10M.
Another clue that the error is due to the Feed Rate of the Linear Axis, is that the other program that worked that you listed earlier has no Linear Axis Move; its a Macro for Spiral Interpolation. Its similar to the program that raises the error as White Paint is similar to Black Paint in that they are both Paint, but that's where the similarity ends.
Following is the NC Code generated by your Spiral Interpolation Macro:
N1 G0 G90 X0.000 Y0.000
G0 G90 Z50.000
Z2.000
G1 Z-20.000 F2000
G3 G91 X4.000 I2.000 F200.000
G3 G91 X-8.500 I-4.250
G3 G91 X9.500 I4.750
G3 G91 X-10.500 I-5.250
G3 G91 X11.500 I5.750
G3 G91 X-12.500 I-6.250
G3 G91 X13.500 I6.750
G3 G91 X-14.500 I-7.250
G3 G91 X15.500 I7.750
G3 G91 X-16.500 I-8.250
G3 G91 X17.500 I8.750
G3 G91 X-18.500 I-9.250
G3 G91 X19.500 I9.750
G3 G91 X-20.500 I-10.250
G3 G91 X21.500 I10.750
G3 G91 X-22.500 I-11.250
G3 G91 X23.500 I11.750
G3 G91 X-24.500 I-12.250
G3 G91 X25.500 I12.750
G3 G91 X-26.500 I-13.250
G3 G91 X27.500 I13.750
G3 G91 I-14.000
G3 G91 I-14.000
X-14.000 I-7.000
G0 G90 Z50.000
X0.000 Y0.000
G0 G90
Regards,
Bill