Fanuc Macro Variables

Hi folks

Fanuc 21i. Is it possible to select a screen display which shows the variable addresses along with their contents. ie a display which shows say #2001 and its value? If so, how?

I know for this example I can look at the offset/setting screen but this doesn't reference the variable number.

Thanks Rob

Reply to
Rob
Loading thread data ...

Rob,

I am sure someone will correct me if I am wrong.

The offset/setting screen shows "Common Variables" your example #2001 is a "System Variable".

If you are looking for a screen that shows all variables (Local, System & Common) all in a row from #0-#9999 with their corresponding value, I don't believe you can.

If you are looking to see just the value of #2001 (IIRC is an offset) you could look at the corresponding offset menu where it's value is displayed.

If you are debugging or checking out a macro/program and want to see (snap shot) list of all the variables with values, try using "Dprint". Unless you are only using "common variables" then you can look at the offset/setting screen.

I had a Bridgeport with 21i & their "Fast op" keys which we could create custom menu's. So it should be possible (if your machine/controller has the same available options) to create your own menu and tie it to a macro that retrieves and displays the information any way you want.

Tom

Reply to
brewertr

Another way is to create a program that sets the values of user values to those of system values. Then you can look at them. For Example: % O6969 #501=#2001 #502=#2002 #503=#2003 #504=#2004 #505=#2005 #506=#2006 #507=#2007 ... ... M30 % Off the top of my head I don't know if those 2000 series #s listed are real registers in the machine or not, but you get the idea. You can also use the 100 series: % O6969 #101=#2001 #102=#2002 #103=#2003 #104=#2004 #105=#2005 #106=#2006 #107=#2007 ... ... M30 % This series may or may not clear when you hit reset, depending on how you have your parameters set. You can even use the more volatile series % O6969 #1=#2001 #2=#2002 #3=#2003 #4=#2004 #5=#2005 #6=#2006 #7=#2007 ... ... (up to 33 most controls) M30 % This series clears on reset on most controls. Anyway, after you run such a program, (which causes no machine movement, so no worries) you look at the user variable listing, which is a sub-menu of the offset menu. Sometimes you have to hut for it, some combination of the page & "Oper" soft keys.

There is no real risk as long as:

1) You don't end up overwriting a user variable which is being used for something. For example, if you have a probe, pallet system, etc., the software used to control these things often makes use of the user variables. In my example I started with #501 to make it easy to remember that that refers to #2001, but #501 might be "taken" by your probe or pallet software. That is one of the advantages of using the 100 or 1-2-3 series. 2) Always put the USER variable on the LEFT, and the SYSTEM variable on the right! Have fun. If you want to discuss this more email me robustus at newsguy dot com.

-plh

Reply to
plh

plh - thanks for that. I tried something similar and got the info I needed.

----------------------------------------------------------------------- Another way is to create a program that sets the values of user values to those of system values. Then you can look at them. For Example: % O6969 #501=#2001 #502=#2002 #503=#2003 #504=#2004 #505=#2005 #506=#2006 #507=#2007 ... ... M30 %

plh wrote:

folksD> >Fanuc 21i. Is it possible to select a screen display which shows the variable>addresses along with their contents. ie a display which shows say #2001 andÿ>its value? If so, how?ÿ>ÿ>I know for this example I can look at the offset/setting screen but thisÿ>doesn't reference the variable number./>1>Thanks9>Rob>>@>BAnother way is to create a program that sets the values of user values to those

Reply to
Rob

Exactly.

Or to get more of a real-time access to the values, you could put your routine into a sub. Call that sub from the main, then follow the call with an MO. The machine grabs the variables, puts them where you can read them, and then waits for you to have a look. If the M98 and the M0 are both preceded by a block delete slash, then you don't have to stop and read unless you want to.

As you caution, though, this only works if the variables used for reading system stuff aren't also used for other things in the program. That could get messy.

KG

Reply to
Kirk Gordon

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.