|
|
| Home » Knowledge Base » Knowledge Base Article | Login | Become a Member | What's New | Site Map |
|
WOODWEB DISCLAIMS any and all RESPONSIBILITY and LIABILITY for the accuracy and application of the information below. Readers agree to evaluate the significance and limitations of the information provided, and accept full responsibility for the application of this information. Read More ... |
|
|
Would you like to add information to this article? Interested in writing or submitting an article? Have a question about this article? Parametric Code Examples for CNC Question
Forum Responses
From the original questioner: I understand that parametric programming is not code but part of the ISO standard. I have purchased the Rover B FT. I am based in Ireland and as such there is no structured training. There will be training provided once the machine arrives but I do not wish to wait till it arrives to start to learn the basics of parametric programming. Imagine - I have no machine and a book teaching CNC programming based on the ISO format (with no parametric code or samples). Once I have this book mastered I then want to introduce myself to parametric CNC programming. Can anyone provide some samples (don't care about the result - just want to see the formulas used) or references to web sites that show examples or the basics for this type of CNC programming? Thanks in advance for any help.
From contributor C: As stated, mathematical formulas are the basis for parametrics. For example: If you needed to perform an operation at x =1000 on a DX=1220 size material you could, instead, write x = DX-220. You could then use this program on a different size material and, by changing the DX value at the header, maintain the operation at DX-220 without going into the program to modify absolute values, i.e. if DX = 820 then the operation would get performed at x = 600. I hope that makes sense to someone other than me. This example is as basic as it gets, but the possibilities are endless.
From the original questioner: I found this sample on a couple of sites. It seems to be a good simple example but should help anyone else like me who would like to find out more on parametric programming. O0001 (Program number)
If people continue to add examples to this post it could become a helpful reference for people who want to learn a bit of parametric CNC programming, as there seems to be a lack of available sample code.
From contributor D: This is an example of a basic parametric program for a Biesse Rover FT with an XNC control. (Note the leading and trailing lines have been removed for clarity.) N10 G70 HC=1 LY=20 PLPZ=0.75 FIL=0 BLO=0 ACC=0 RUO=0 PRS=1 PRL=1 Z=PRK KA=0.000 LZ=0.750 LX=80
LPX = Panel X
This program will adjust the program according to the panel size. Also the parameters are for the radius corner and toe notch.
From contributor E: Here's an old macro subprogram (note the date) for routing holes. It will rout just the diameter of the hole or it will hog the entire center before finishing the hole depending on the value of "H". It assumes the tool is turning and centered over the hole when called from the main. It was written for a Fanuc 11M control. O4028(HOLE BORING)
From the original questioner: These sample code snippets are absolutely ideal and really show just how to start parametric programming. Thanks to all contributors and keep it up. From contributor F: There is a book on parametric programming for CNC machines - you can get it from Amazon - the code is ISBN: 0872634817. From contributor I: Does your software support VBA? Now that's some real parametrics! From contributor G: As someone said above, parametrics isn't necessarily code, it's the math. We machine our entry doors on a Rover30 using parametric sub routines. The XNC language has a set of built in functions for assign values to variables that are the result of equations, as well as values from the machine's tooling database. If you received a manual on the XNC language with your machine there should be a section on all of these functions and their use. The code below is used to machine the mortise for a lock faceplate on the beveled edge of a door. The parameters are passed to the sub and regardless of the length, width or thickness of the faceplate, or the thickness of the door or edge (Y+, Y-) it is machined correctly (or as the parameters were passed, no one said those were right). You can see that no actual machine code is in this mess of text until N480. The code below is an old version I have sitting on my drive here at home. So if you want to pick it apart and find my math errors don't fret too much, I'm sure I've re-written the routine on the machine. ;SUBROUTINE FOR MORTISE LOCK FACEPLATES
From contributor H: This is an example of a pocket clearing template I made using parametric macro variables. Hope it helps someone. (POCKET CLEARING) #100=(FINAL RADIUS------->) 2.6
The comments below were added after this Forum discussion was archived as a Knowledge Base article (add your comment). Comment from contributor J:
Instead of programming different feed-rates, it is possible to have the control calculate feed on the fly. At the top of the program there is a list of variables for feed and rpm. Make subprogram to calculate feed-rate based on size of arc. If move is straight then make feed a specific sfm (surface feed per min). Tool companies list formulas for their tools. Remember that imagination is the key. See it and then sketch your point of logic path you want to accomplish and finally program it. Example; #100=85;sfm #101=.005;chipload per tooth #102=4;number of flutes #103=.375;tool diameter #104=(85*3.82/#103);rpm #105=(#104*#101*#102);feed This program becomes fun to the operator if he wants to experiment with tool life. Also these macros can be installed in posts to solve tool changer problems etc. I have even installed a macro in a post that automatically inserted tool comp and had a line of code that the operator could edit so he never had to go to his off-set page.
Have you reviewed the related Knowledge Base areas below?
|