PRACTICAL TIP – Rewrite old PAL programs for the PAL2020

September 2022

With the PAL2020 reform, some of the commands in the PAL coding were changed. The commands were changed so that programs written after PAL2008 or PAL2012 will no longer run and lead to any error messages in the newer PAL2020 simulators (or PAL2020 C/Y or PAL2020 3+2). This means that you have to rewrite the program blocks almost completely – and that takes time.

A faster way to do this is to use the “Find/Replace” trick:

This trick works when “translating” PAL2008 or PAL2012 commands to PAL2020, because there is a simple mapping between old and new here. Below we will briefly touch on how you can rewrite the cycles more easily. You need this, for example, for the piercing cycles in turning, which are still called G86 or G88, but have many new or changed cycles.

Step 1

Open the program, which you have already programmed in an older PAL coding, in the “PAL2020” mode. You will then get the following message: “The NC program is faulty!” Delete this message by pressing “F10”. The last block that does not correspond to the PAL2020 coding is now marked in the editor. In the example (exercise program “LAGER3” from the workbook “Plane Swivel”): “N65 G17 CR180 AR90”. Here (and in many other places in the program) G17 must be replaced by G15.

Step 2

Now select the “Search/Replace” function using “F1” and enter “G17” in the “Search for” field and “G15” in the “Replace with” field:

Accept the dialogue box with “F10” and in the whole document “G17” will be replaced by “G15”.

Step 3

Subsequently, in our example, the line “N45 G48 G40 R10 Z0” is marked as incorrect, because after PAL2020 the commands for tangential approach and departure have also changed. Replace them according to the same principle: “G48 G40 R” becomes “G40 G46 RR”. And then “G41 G45 D” = “G41 G45 DL”.

Step 4

For the training program “LAGER3″ all necessary replacements are done with it, and you can use ” F7 Editor” to switch back to the “guided mode”. There you can simulate the program using “F9” and finally save the changed program with for example the name extension “2020”.

A complete table with a comparison between ” PAL2008/PAL2012″ and “PAL2020” (as of summer 2022) can be found at the very bottom of this post.

Rewrite Cycles:

This is not quite as simple as the PAL commands. But with this little trick you will surely save some effort:

Step 1

Start by commenting out the “old” cycle blocks in the editor. Then program the cycle blocks again in the guided mode (“F7 Editor”). Note that commenting out changes the line numbering (which affects jumps with G23), since pure comment lines have no line numbers. To avoid this, write the previous cycle as a comment after a regular (innocuous) NC block. This will then look for example like this:

N28 M1 ; G86 X60 Z-55 ET54 EB6 RO-0.5

Step 2

After you have changed the cycle set, just delete this comment again.


To learn more practical tips, please visit KELLER.News on our website or visit the KELLER YouTube channel KELLER-YouTube-Kanal.


PAL2008/PAL2012PAL2020MeaningWhere is it found?
G41 G45 DG41 G45 DLLinear tangential approachMilling and Turning with driven tools
G42 G45 DG42 G45 DLLinear tangential approachMilling and Turning with driven tools
G40 G46 DG40 G45 DLLinear tangential departureMilling and Turning with driven tools
G41 G47 RG41 G46 RRTangential approach on a quarter circleMilling and Turning with driven tools
G42 G47 RG42 G46 RRTangential approach on a quarter circleMilling and Turning with driven tools
G48 G40 RG40 G46 RRTangential departure on a quarter circleMilling and Turning with driven toolsn
G17G15Svivelling and Resetting the machining levelMilling Level selection
G17G15 G17 IP3Level selection face end with virtual Y axisTurning with driven tools
G17 CG15 G17 IP0Level selection face end with polar coordinatesTurning with driven tools
G17 Y CG15 G17 IP5 CMLevel selection face end with real Y axisTurning with driven tools
G18G15 G18 TURNLevel selection for TurningDrehen mit angetr. Werkzeugen
G19 XG15 G19 IP1 DMLevel selection surface area with virtual Y axisTurning with driven tools
G19 CG15 G17 IP0Level selection surface area with polar coordinatesTurning with driven tools
G19 Y XG15 G17 IP5 DMLevel selection chord area with real Y AxisTurning with driven tools
G86M1 ; G86Radial recessing cycleTurning, not automatically “translatable”, therefore commented out here with M1 ;. The cycle must then be reprogrammed.
G88M1 ; G86Axial recessing cycleTurning, not automatically “translatable”, therefore commented out here with M1 ;. The cycle must then be reprogrammed.

You will find more tips in the upcoming newsletters.

You have questions? Contact our experts using the contact form below.


Do you have any questions?

Our experts are at your disposal. We look forward to your inquiry!

Klaus Reckermann


    This might also be of interest to you

    Newsletter October 2022

    New edition workbooks for PAL2020. In 2 months it will be Christmas, but before we settle down comfortably on the sofa with cookies, we still have a PAL exam coming up. To help you prepare for…

    Training - DIN/PAL Programming

    This week's topic in KELLER.Academy was "Basics of DIN/PAL Programming with SYMplus™". We had 5 wonderful visitors for this course - Mr. Lattwein and Mr. Riedinger from the Gewerbliche Schule Ehingen…