It has to work. Use a defined system variable. Look into your manual and try to find out what #3120 is.
Is there a way to assign a system parameter value to a custom macro variable in Fanuc OiMD ?
Just giving #101 = #3120 (example) does not work and raises an alarm on the machine. I know there is some method to do this so may be gurus out here could help
Thanks a lot
It has to work. Use a defined system variable. Look into your manual and try to find out what #3120 is.
As Sinha suggests, your syntax is correct and must work. System variables fall broadly into two groups; read and write, and read only. I can't find a reference to #3120, does it actually exist for your machine. You haven't stated the alarm you're getting, accordingly, its difficult to know exactly what the issue is, but I'd be leaning towards the variable not being a defined system variable.
#4001 is a system variable that is common for most, if not all, controls; it holds the value of the current model Group 1 "G" code. Try the following program and check the value of #100 when the program stops at M00. The resulting value in #100 should be 1.
Regards,
Bill
%
G91 G01 X0.0
#100 = #4001
M00
M30
%
Last edited by angelw; 01-12-2012 at 07:16 AM.
I'm confused. The TITLE of your original post is "Is there a way to assign a system parameter value to a custom macro variable in Fanuc 0iMD?" Am I the only one who searched high and low to see what Parameter 3120 was? If I'd have known you wanted to assign a system variable to a custom macro variable...
Hi All,
Sorry for the confusion regarding the title. It should have been system variable and i mentioned it as system parameter.
Confusion also seems to have been created by me giving an example of #3120. I was only giving an example.
Anyways as everyone here said, my Syntax was correct but the # was not present on the specific machine. I was looking for values in #1032 - #1035. I could get these on one machine but on the other machine it raised an alarm stating it was out of range and i got confused. Finally i discovered that this range was not existing on that particular machine and i did have problem with my Syntax or method !
Thanks again for chipping in with your answers and suggestions.