What's new
What's new

fanuc 21i variables

GG917

Plastic
Joined
Oct 31, 2018
hello guys !

Continuing to discover the special features on my machine with a fanuc 21i-TB control. I attempted to reproduce a macro I had on my previous job, used #501 to #503 variables, got strange results. I went to check in the macro variables, I can't change the variable from 500 to 530 (can't remember exactly), but some in between can be change, libe 510 !

I though the 500-999 variable were user variable, but some seems to be locked? does anyone have seen that before?

thanks !
 
If parameter 3290 bit 2 (MCV) is a 1, then being able to key in macro variables is disabled.

That wouldn't explain why you can change 510 but not 500. But if you're sure you can change some, but not others, I would suggest that the machine builder may be writing values to them in the ladder/pmc program, and any attempt to change them results in it returning to the same value. But this is speculation.


You likely have macros thru #530 (or is it #531). That's a pretty standard option. If you would like macros thru #999, that's an additional paid option from fanuc, that you'd have to have the machine builder / fanuc turn on.
 
If parameter 3290 bit 2 (MCV) is a 1, then being able to key in macro variables is disabled.

That wouldn't explain why you can change 510 but not 500. But if you're sure you can change some, but not others, I would suggest that the machine builder may be writing values to them in the ladder/pmc program, and any attempt to change them results in it returning to the same value. But this is speculation.


You likely have macros thru #530 (or is it #531). That's a pretty standard option. If you would like macros thru #999, that's an additional paid option from fanuc, that you'd have to have the machine builder / fanuc turn on.
Yup. I think variables from 600-650 are all that the programmer can use on our new EMAGS. On the older EMAGs you can put a value in some variables, run the program and it will contain a different value because their master or a sub program uses that variable. If I'm not mistaken #510 is one of them.

However, I don't know why the OP can input values in some variables and not others unless, as you said, the machine builder locked them out for their use.
 
I checked the parameter, il can edit variables. Some of the 500 variables are used in the MTB own G and M code, so i think they have protected them ?

Anyway I czn use the variables up to 999, so even if some of the 500 variables are locked there is still plenty avalaible !
 
I checked the parameter, il can edit variables. Some of the 500 variables are used in the MTB own G and M code, so i think they have protected them ?

There can be MTB Built In Macros, where a pass word is required to get into these Programs. The parameters for Built In Macro start at circa 12001.

I suspect your issue is that some of the 500 Series Common, Nonvolatile Variables are being used in Built In Macro and have been protected.

Common, Nonvolatile Variables should always be used with caution and only after you have made sure that they're not being used by other Macro Programs. Their greatest asset is that they retain their value when the power to the machine is cycled and therefore, are often used to hold calibration data for measuring systems (Renishaw and the like) etc.

As with all Software developing languages, where its good practice to only use Global Variables where necessary, so it is with the various iterations of the User Macro application. In the majority of cases, a Local Variable will be the correct choice.

Because there are only a relatively small number of Variables in the standard allocation, sometime, in a long and complex Macro Program, you may be forced to use some of the 500 Series Variables simply because there are not enough Local and Common, Volatile Variables available.

If its a case of having to store and retain data, but you're not sure if the 500 Series Variable is being used by another Macro Program, spare Tool Offset can be used. Instead of specifying the 500 Series Variable in the program, you use the System Variable for the Tool Offset you're using instead. There are often more spare Tool Offsets available, than there are Macro Variables; simply use those that are unlikely to be ever get used to store Tool Offsets..

Regards,

Bill
 
Last edited:








 
Back
Top