Mazak Part Program, Offset Method, Control Key, cycle, Canned Cycle, Drilling Cycle, Macro - Cncprograming.blogspot.com.
Okuma Part Program, Offset Method, Control Key, cycle, Canned Cycle, Drilling Cycle, Macro - Cncprograming.blogspot.com.
Cincinnati Part Program, Offset Method, Control Key, cycle, Canned Cycle, Drilling Cycle, Macro - Cncprograming.blogspot.com.
Fanuc Turning Part Program, Offset Method, Control Key, cycle, Canned Cycle, Drilling Cycle, Macro - Cncprograming.blogspot.com.
Local Variables: These variables are local to the program. Normally used to transfer values to a cycle call, or as intermediate mathematical value holders. I hate using local variables because of one major issue with them. They are reset to null (not 0) when the control is reset or the program ends. While perfectly fine for use in transferring variables to canned cycles, etc. They can get you in trouble if you use them for other things. I, just by policy, never use them for anything. In Fanucese, these are typically #100-#499 (if you have that many available). Local variables are only available to the program in which they are used.
Global Variables: These variables, once set, remain set unless you change or reset them via macro or the control keyboard. Unlike local variables, global variables are available to any program in the control. I use gobal variables because they are retained, can be used in any program, and you can track what's going on if you have an issue. In Fanucese, these are typically #500-#999
System Variables: These variables are available to use in macro programming and allow you to write and retrieve information from the control itself, such as tool in the spindle, tool offset active, write and read offsets, check active codes, etc. Very handy indeed, BUT, these are _NOT_ standardized to a great extent. You will have to consult the macro programming portion of your control manuals to determine what these are.
String Variables: String variables are a group of characters interpreted as a single value. Typically defined with a $ symbol. String variables allow you to manipulate text and phrases etc. Not all controls support string functions.
I typically define my variable fields along the following lines:
#500-599 : Input variables to the macro
#600-799 : Mathmatical functions of the macro
#800-899 : Variables needed with regard to tooling, offsets and system variables.
#900-999 : Logic keep bits, counters, etc
All computer programming is on a fundamental level, very similar. The syntax of the commands, and purpose of the programming may change, but the fundamentals of how to approach it, how logic works, and program flow are pretty much the same.
The first step to any programming is to define the _functionality_ required of the program. Functionality is defined as the end result(s) and abilities expected of the computer code. In other words, what is it supposed to do.
When we write a macro, we have a desired result in mind. Write down the broad-based result you are looking for from the program. A broad-based result would be something like: Bolt circle drilling, rectangular pocketing, block facing, slotting, etc.
For an example, lets use bolt circle drilling.
After we have defined the broad-based functionality, we need to narrow down the specifics of what we desire from the program. We must set limits to the functionality we want to achieve. If no limits are set, then the program becomes too large, cumbersome and time consuming.
In our example, one of the main limits we need to set is the maximum number of holes we will be allowed to drill in the macro. For the sake of brevity, lets limit ourselves to 10 holes (We have another question coming up that, in reality, allows unlimited holes using only 10 as a maximum here)
So: Max Holes in pattern == 10.
Next up on the functionality list regarding hole drilling: Do we have a drilling cycle in the machine control or not? Most of the time, this is going to be a yes, so we will go with that.
So: Have drilling cycle in control == Yes
Next up on the functionality list: Do we want the ability to start the hole pattern at some angle other than directly along one of the major machine axis (X,Y,Z), this is seen often in parts, so yes, we want this functionality.
So: Ability to start holes at operator input angle == Yes
Next: Do we want the macro to call the tool, or will you already have the tool in the spindle when you call the macro? Lets do macro does not call tool. This is really a programmers preference as to which way to go, but since the possibility exists that we could do multiple bolt patterns with the same tool, we wouldn't want to go to tool change position each time between patterns.
So: Macro calls tool == No
Next: Do we want to induce multiples of our max holes? This would allow you to drill more than our stated maximum number of holes. I think we can implement this in a short manner, so we will do this.
So: Macro allows multiples == Yes
What other functionality should we define?......hrm.....for now I can't think of anything, so onward we go with the functionality described above.
- Ascii Code Conversion
- Binary to Decimal / Decimal to Binary Code Conversion
- Drill Size Conversions
- Fanuc Ellipse Programmer and Point Plotter
- Fanuc Grid Point Programmer
- General Conversion Tool (mm > inch etc)
- Grid Pattern Point Plotter
- Hexagon Diameter Calculator
- Decimal to Hexadecimal Code Conversion
- CNC Letter Codes Explained
- Fanuc Macro B Variables Explained
- Oblique Triangle Calculator
- Fanuc PCD (Bolt Hole) Programmer and Point Plotter
- Pocket Milling Programmer (Circular)
- Right Angle Triangle Calculator
- Speeds and Feeds Calculator
- Square Diameter Calculator
- Thread Milling Fanuc Program Generator
- Tapping Chart with Fanuc Cycle Generator
CNC Programming Software Free Download