- Fanuc Robot Programming Manual
- Fanuc Troubleshooting Manual
- Fanuc Programming Manual Pdf
- Fanuc 15m Operator Manual
- Fanuc Operators Manual Pdf
- Fanuc Robot Programming Manual Pdf
- Move the axis to where you think zero return should be. If you can't get to the position you would like, hold in 'P' and 'Cancel' on power up to bypass soft overtravels or you could change the soft overtravel limits to temporarily. WARNING Do not try holding in any other keys except P and Cancel. You could blow out parameters, programs or other data.
- Select 'MDI' mode
- Press the function key “OFFSET SETTING”
- Press the soft key “SETTING”.
- Move the cursor to “PARAMETER WRITE” . May need to page up or down to get to the top of the Parameter numbers.
- Turn on PWE (Parameter Write) make it a 1
- Press the function Hard key 'SYSTEM'
- Press the softkey 'PARAM'
- Type1815 and press 'No.Search' . This should bring up parameter 1815.
- Arrow down to whichever axis you want to change X,Y,or Z.
- Change bit 4 (APZ) (make sure you count from the right starting with first space is Zero, Bits are as shown here-76543210). This will delete the current reference zero. Alarm must power down will appear, DO NOT POWER OFF
- Go back to the parameter 1815 and make bit 4 a one
- Power off machine for one minute and power up. New home position will be set.
- Check coordinates of program and see how far you are off, if they are not correct repeat the steps. Also, make sure you handwheel the axes slowly to their overtravels. Make sure nothing binds, no servo alarms occur or destroys any way covers. If you set incorrectly, severe damage can occur. Also, remember if this is an axis that the pallet changer or Tool changer is dependant on alignment then you must check this also, because it is based off of zero return. Do not change 2nd reference position to comp for this. Always change home position.
Parameterized Programming: Macro Variables for Fanuc
CNCCookbook’s G-Code Tutorial
Introduction to Fanuc Macro System Variables, Parameterized Programming and Fanuc Macro B
A word about Fanuc Macro B
Parameterized Programming
Parameters to Customize the Machine to the Controller (aka Why We’re Going to Quit Saying “Parameters”)
What Are Variables?
Type of Variable | ||
#0 | Null | You can never assign a value to #0, it’s value is always “null”, which means “no value.” |
#1 – #33 | Local Variables | Local variables are used to pass arguments to macros and as temporary scratch storage. Your controller won’t remember the value of any local variables when the power is turned off. Local variables nest when used with suprograms, so be sure you understand how that works. |
#100 – # 199 #500 – #999 | Common Variables | Common Variables are shared by all your macro programs. When the power is turned off on the controller, #100 – #199 are cleared to null. #500 – #999 remember their values for the next time power is turned on. |
#1000 and up | System Variables | System variables can be used to tell things about what the controller is doing, such as the current position. Don’t assign anything to these unless you know what they do! |
Mach3 has 10,320 variables available, from #0 to #10320. There’s not quite the variety found in Fanuc, but still, plenty of system variables are accessible so you can get at things like work offsets. Mach3’s variables are saved from one control boot up to the next, so be sure to reset them if you aren’t expecting them to have a value.
What Are Variables Good For?
Use variables whenever you think you might want to change a value in different situations. For example, suppose you have a macro or subprogram that cuts a square pocket. You probably want to have variables that let you define the size of the square and the feeds and speeds so they may vary as the material changes. Depending on the subprogram, you might want a variable for the top left corner of the square, or you might simply let that corner be the current position when the routine is called. You may want a variable defining the depth of the square pocket. And lastly, you may want a variable that defines the diameter of the tool.
Which Variables Should I Use in My Programs?
When Variables Can’t Be Used
- Tool Length Geometric Compensation: #11201 or #2400
- Tool Length Wear Compensation: #10201 or #2200
- Cutter Geometric Compensation: #13201
- Cutter Wear Compensation: #12201
- The first digit (1 to 4) tells you the axis. X=1, Y=2, Z=3, A=4.
- The tool length offset value currently in use is held in #5081 to #5084.
- The tool position where the skip signal is turned on via G31 is held in #5061 to #5068. When skip is not turned on, those variables hold the end point of the specified block.
- When variables are marked “disabled” during movement, it’s because they can’t be read due to lookahead.
Expressions: Formulas
Fanuc Uses | Function | ||
Power | #1 ** #2 raises #1 to the power #2. Power takes precedence over the other operators. | ||
Modulus | Modulus divides and returns the remainder. So 5 MOD 2 is the remainder of 5 divided by 2, which is 1. The modules of 4 divided by 2 is 0. Mod is a convenient way to keep a value with a range of 0 to the MOD divisor. | ||
Absolute Value | ABS | Absolute value. ABS(1) = 1. ABS(-1) = 1. | |
FIX | Rounds down to the next smaller integer. FIX(2.8) = 2, FIX(-2.8) = -3. | ||
Rounding Up | FUP | Rounds up to the next larger integer. FUP(2.8) = 3. FUP(-2.8) = -2. | |
ROUND | When used in a macro function like IF, ROUND rounds down by slicing off the fractional decimal places. ROUND(1.1) = 1.0. ROUND(-1.1) = -1.0. When used as a coordinate address, ROUND rounds off to the least input increment of the address = 0.001 for mm and 0.0001for inches. | ||
SQRT | |||
Natural Logarithm | |||
Exponential | |||
Trig Functions (Units are Degrees, 90 degrees 30 seconds = 90.5) | |||
COS | |||
Sine | SIN | ||
TAN | |||
Arc Cosine | ACOS | ||
ASIN | |||
Arc Tangent | ATAN | ||
Logical OR | OR | ||
AND | |||
Logical XOR | XOR | ||
Convert from BCD to BIN | See your Fanuc manuals for more details on these specialized functions. | ||
Convert from BIN to BCD | See your Fanuc manuals for more details on these specialized functions. |
Tip: When in doubt about the order a formula will be calculated in, use extra brackets
Calculating Which Variable to Access
Macro Variables and Expressions in G-Wizard Editor
Fanuc Robot Programming Manual
Debugging Macro Variables and Expressions with G-Wizard Editor…
Just type your expressions on the left. In this case, we have a pretty simple set:
Fanuc Troubleshooting Manual
#101 = #100 * 2
#102 = [[#101 / 3] + 6]
Macro variable values are shown below the backplot…
Fanuc Programming Manual Pdf
This little window shows all the modal activity, for example, we’re in G00 – Rapids mode. The values of Macro Variables are also modes of sorts, so they’re shown too. You get to see values for the last n variables whose value changed, and they’re sorted by variable #. Note how it also gives you a little hint about what the variable does. For example, it says #100, #101, and #102 are “Volatile Common Variables”. “Volatile” means their values are not remembered when the controller is switched off, and as we saw from the table up near the top of this page, variables in this range are Common Variables. G-Wizard doesn’t have all the variable values, but is has an awful lot of them and it will try to use this information to help you understand what’s going on.
Fanuc 15m Operator Manual
Fanuc Operators Manual Pdf
Conclusion
Fanuc Robot Programming Manual Pdf
Exercises
1. Pull out your CNC controller manual and see what differences exist between your controller and what’s described here.
2. Use GWE to experiment with Macro Variables and Expressions until you’ve got a good grasp of them.
3. Modify one of your existing G-code programs to use some variables and expressions. Verify that it still produces the correct results when you’ve finished.