Full control over the program, i.e. a few words about parametric programming

Nowadays, you can see a clear tendency to program with a CAM module rather than standard manual programming with, for example, an ISO code. No wonder, as it is a fast and effective method of creating machining paths. Coming back to one of my first articles, where I emphasized that in programming, e.g. five-axis continuous – CAM is in fact the only right choice. This is true, but in the life of a programmer, we often have to create a program over which we will have absolute 100% control, e.g. when programming for large series. In that case, it makes sense to make friends with the powerful “tool” of parametric programming.

Parametric programming, as the name suggests, is a way of creating a parameter-dependent path. Thanks to the examples that will be described later in the article, it will be easier to understand. Either way, it’s programming mathematical functions that control the flow of a program. What is the use of this programming style? Honestly? Sky is the limit J Starting from a simple linking of dimensions and distances with each other, to program loops, jumps to various machining blocks, generating messages for operators, counting pieces or in measuring procedures such as e.g. machine tool testing with an interferometer. What are the benefits? First of all – full control. In CAM, it often happens that a program is incredibly long. There is a lack of “smart licks” that shorten the program by looping it. The fact is that writing a deliberate program using parameters can take up to 3 times as long, but the great advantage is that the programmer knows each block very well. He knows what he may require from the machine. Correction of certain parameters affecting the final machining result is simple and quick. In my opinion, it’s worth it! Second – with parametric programming, making your own personalized machining cycle is not a problem. We do not have to be dependent on ready-made cycles of a given control. Third – a lot easier when cutting technologically similar treatments. Let’s say there is drilling and simple milling always with the same shape. But the dimensions will depend on the size of the blank. And what now? Will you choose to write ten different programs for each blank or one parametric program that will apply to all parts? The choice is yours.

The parameters are defined differently in different controls. In the case of FANUC, you may come across hashes #:

# 521. = 1.

And at this point it is worth exploring the topic, because there are several scopes that define different types of variables, e.g. local, common or system variables.

Sinumerik defines the parameters in eras R:

R1 = 0.0001

And in Heidenhain, all Q parameters.

Attention – a short life anecdote. My beginnings of parametric programming were during my studies in “Programming of Numerically Controlled Machine Tools”. As a student, I felt that it was an important, but quite complicated topic. An example during the classes was a cube in which all dimensions depended on the parameters. The task was that when the cube length declared as parameter Q1 was less than 100, holes with a diameter of 10 had to be drilled. However, when the Q1 dimension would be greater than or equal to 100, the holes should be tapped using M14. And at this point I asked myself – will I ever use it in my professional work? Well, yes J It turns out that practically every serious program in mass machining is packed with parameters.

At the end, I will leave you with my homework during my studies. A simple task – making a spiral depending on the parameters. Enjoy!

 

Fig. 1. Number of turns: 10; Initial radius: 5 [mm]; End radius: 120 [mm]

 

Fig. 2. Number of turns: 5; Initial radius: 10 [mm]; End radius: 120 [mm]

 

Fig. 3. Number of turns: 3; Initial radius: 10 [mm]; End radius: 100 [mm]

Fig. 1. Program excerpts from the report “Parametric programming” [source: own materials]

 

Natalia Matuszczyk

 

0 Points


Leave a Reply

Your email address will not be published. Required fields are marked *