Hi everyone

I'm learning and messing about with Macro B, and when I run this program on a Fanuc control Series oi-mf I get this error PS0115 Variable no. out of range
See the error on this line.


When I typed that line into mdi on a Fanuc 18i control, it worked.

Please forgive the programming text as it helps me program as I'm just started learning, and I know there are many clever guys on here.

Are the variables different with that control and if so where could I get them as there is no manual on site

I know the DPRNT is probably wrong but not bothered at that for the moment.

I really appreciate any help you can provide.


%
:7581
POPEN
DPRNT [MACO7581 ]
(18/12/2020)
(MACRO B BORE MILLING)
G0 G40 G80 G90
G17 G21
G28 G91 Z0.0
M1
T9
M6
DPRNT [MACT9 ]
G0 G17 G90 G55 S8000 M03
DPRNT [MACS8000.0 ]
(=================)
(ABSOLUTE HOLE POSITION 2 OFF)
G0 G90 G55
X0.0 Y0.0
#155=0
(=================)
(RESET PROGRAM ZERO AT CURRENT POSITION)
#1=#4214
#1=#1-53
#1=20 *#1
#1=#1+5201 Error on this line
# [#1]=#5021
# [#1+1]=#5022
N150
(MACHINE HOLE START)
M198 P7582 (MAIN TWO BORES)
(MACHINE HOLE END)
(PROBE HOLE START)
M198 P7583
(PROBE HOLE END)
IF [#138GE30.01 ]GOTO2
IF [#138LE29.98 ]GOTO3
IF [#138LE30.01 ]GOTO4
(IF [#138GE29.98 ]GOTO4)
(ARGUMENT)
N2#3000=3 (OVER SIZE HOLE)
GOTO50
N4#3000=3 (SIZE HOLE)
#155=#155+1
#12009=0
GOTO700
N3#3000=4 (UNDER SIZE HOLE)
GOTO150
N700
#155=#155+1
G0 G91 Y200.0
(RESET PROGRAM ZERO AT CURRENT POSITION)
#1=#4214
#1=#1-53
#1=20 *#1
#1=#1+5201
# [#1]=#5021
# [#1+1]=#5022
WHILE [#155 LE 2]DO1
GOTO150
END1
DPRNT [MACM30 O7581 ]
PCLOS
N50
M30
%