Home     Contact     Forum     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science     RSS     Terms of services     Privacy policy  
   
 Home     Forum     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science   

Author Topic: CNC machine - Parametric programming - Drawing methodology  (Read 3280 times)

0 Members and 1 Guest are viewing this topic.

stamatis

  • Guest
CNC machine - Parametric programming - Drawing methodology
« on: September 16, 2008, 21:28:32 PM »
It is most important, before we start talking about geometry and maths, to have already acquired the proper methodology on how to start making a parametric program.

First of all, a constant error that all people do when they start to program with parameter: They start to program with parameters... This is absolutely wrong. The first step is to draw a big AND CLEAR drawing of what you are about to make. Our example will be a very very simple and also very common door drawing and you can see it attached to this message (drawing.gif). This is the best ''how to start parametric programming for CNC'' and never to forget. Also, remember to add the zero point on your drawing and the direction of positive number on each axis. That will be very helpful.

Second step, is to distinguish and mark all the coordinates of  the drawing on the X and Y axis. This job may seem easy for this example but it will require from you to gain experience in order to manage more complicated drawings. In simple words, we need to find all the points that lines and arcs start and stop. And then , we need to name those coordinates. I usually name them in series, for example L1, L2, L3 etc etc etc. You may use different 'coding' for your drawings, for example you may use numbers from 1 to 49 for coordinates on the X axis and 50 to 99 for coordinates on Y axis. On some machines, you may use complete words like X1, X2, Y1, Y2 or more complicated like Position_X1 etc. In our machine we may use only the letter L followed by a number. So we will use numbers in series. You may see how I name the coordinates in the attached drawing named points.gif.
What to notice is that L1 to L3 belongs ONLY to X axis and L4 to L9 belongs ONLY to Y axis. So, in any case during programming the drawing, if you have something like X=L5 or Y=L2, then you are by default mistaken...
And something more. You may have notice that all coordinates are pointing to a corner, to a connection between lines. This connection we will cal l it from now on a 'node', and each line or arc we will call it a 'vertex'. So you may notice that that all coordinates crosses a node between vertexes, except L2. L2 is pointing in the middle of L1 and L3. And why we do this? This is something not to bother you at this moment. You should only know that this L2 is in the middle of  L1 and L3.

The numbers could be random, or in any way you like. There is no such a 'right way' to label the coordinates, just do it in a way that you understand more. I use this kind of naming coordinates when the machine accepts only numbers (like our machine). If the machine accepts alphanumeric, I would have name the coordinates L1 to L3 as X1, X2 and X3 and the coordinates L4 to L9 would be Y1, Y2, Y3... Y9.

And here is the trick: A pair of coordinates will define a point! This is the idea. If you manage to understand, but really understand this trick, if you feel it in you bones, then you are ready to program with parameters any drawing you may. Let me make things more clear. For example, in our points.gif, we will discuss for the most bottom parallelogram of the drawing. This parallelogram is defined (like any parallelogram does) with four corners. These corners are pretty clear to you. The top left corner, the top right corner, the bottom left corner and the bottom right corner. And now I will use our coordinate pairs to tell you again these corners in a 'parametric' way:

CornerX coordinateY coordinate
Top left cornerL1L5
Top right cornerL3L5
Bottom left cornerL1L4
Bottom right cornerL3L4