What's new
What's new

Macro error on Fanuc Om

RCCNCMACHINE

Plastic
Joined
Sep 8, 2011
Location
North Carolina
I get error 115 "ILLEGAL VARIABLE NUMBER" while tring to run the following program:

G90G0G58G17
Z#750

basic x & y moves here


N500IF[#750EQ-1.30]GOTO900
#750=#750-0.030
GOTO25
N900G0Z1.0
M09
M30

This is a VMC with a Fanuc Om control 1995.

Thanks
 
My apologies, I shouldn't have been so brief... What you need to do is change both assignments to #500 or a variable that is available, like this >


G90G0G58G17
Z#500

basic x & y moves here


N500IF[#500EQ-1.30]GOTO900
#500=#500-0.030
GOTO25 THIS MAY CAUSE PROBLEMS AS WELL, I DON'T SEE A LINE N25!
N900G0Z1.0
M09
M30

You should have #100 - #149 for the Common Variables, and #500 - #531. It stops there, so the #750 you were trying to use is gonna fail. Could be other things involved, but that's what I can see from the snipet you posted.

A good resource for a Macro B guide is from CNC Data Ltd out of the UK. They have a handbook you can download, but you'll need to go to their facebook page and get it. Follow the link from the downloads on their webpage CNC Data Limited :: Downloads
 
At the top of my program I have #750=-0.030

Change to #500 doesn't seem to help. On my marco page it starts at 100

If you mean that your Macro variables starts at #100 and not #1, then your control is only has User MAcro A available. Variables #1 to #33 are Local Variables; User Macro A only has Common Variables starting at #100. However, using #500 with User Macro A should not have resulted in the error that you state, but should have raised an error when the conditional IF statement is executed. Check whether you have Macro variables starting at #1.

Regards,

Bill
 








 
Back
Top