This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
wiki:en:ppedit [2019/10/10 11:20] admin |
wiki:en:ppedit [2019/10/10 11:57] admin |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
We begin by looking at the different types of definitions accessible in the post processor file. All definitions begin with a letter and then a number, the letter deciding what type of definition it is and the number being an address to distinguish between the definitions. | We begin by looking at the different types of definitions accessible in the post processor file. All definitions begin with a letter and then a number, the letter deciding what type of definition it is and the number being an address to distinguish between the definitions. | ||
Line 7: | Line 7: | ||
These definitions are used to give the Cam program | These definitions are used to give the Cam program | ||
- | '' | + | '' |
- | I1 Block number start : | + | '' |
- | I2 Block number step : | + | '' |
- | I3 Scale factor X :1\\ | + | '' |
- | I4 Scale factor Y :1\\ | + | '' |
- | I5 Scale factor Z :1\\ | + | '' |
- | I6 Scale factor angles :1\\ | + | '' |
\\ | \\ | ||
- | I101 Last name of file : | + | '' |
- | I102 Search path to file: | + | '' |
\\ | \\ | ||
- | I201 Dividing arcs into quadrants: No\\ | + | '' |
- | '' | + | |
===== FLAGS (F) ===== | ===== FLAGS (F) ===== | ||
Line 57: | Line 57: | ||
===== MACROS (M) ===== | ===== MACROS (M) ===== | ||
- | M-definitions or macros are used to " | + | M-definitions or macros are used to " |
Mandatory Macros | Mandatory Macros | ||
- | '' | + | '' |
- | :< | + | '' |
- | | + | '' |
- | | + | '' |
- | | + | '' |
- | '' | + | |
===== PARAMETERS ===== | ===== PARAMETERS ===== | ||
Line 77: | Line 77: | ||
The parameters are: | The parameters are: | ||
- | '' | + | ^Parameter^Description^ |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | 0=Off 1=Left 2=Right | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
- | < | + | |< |
NB. It is possible to write the name of the parameter in capitals as well as small letters but we use small letters as our standard. | NB. It is possible to write the name of the parameter in capitals as well as small letters but we use small letters as our standard. | ||
Line 152: | Line 152: | ||
It is important to understand the way the Cam program thinks when post processing a BEA file to enable you to produce a functioning post processor. Notice that the program does NOT read the macros in numerical order (M1,M2,M3 etc.) but jumps between these depending on which type of machining is involved. | It is important to understand the way the Cam program thinks when post processing a BEA file to enable you to produce a functioning post processor. Notice that the program does NOT read the macros in numerical order (M1,M2,M3 etc.) but jumps between these depending on which type of machining is involved. | ||
+ | {{: | ||
===== THE MACRO LANGUAGE ===== | ===== THE MACRO LANGUAGE ===== | ||
Line 157: | Line 158: | ||
In our macro a special language is used which we have chosen to call "The Macro Language" | In our macro a special language is used which we have chosen to call "The Macro Language" | ||
- | M125 My own macro : | + | '' |
We will try to write some macros of our own a little further on in this booklet. Remember that even the spaces are counted as long as they are found inside the quotation marks so if we want a space character after Kalle we will have to write it like this: | We will try to write some macros of our own a little further on in this booklet. Remember that even the spaces are counted as long as they are found inside the quotation marks so if we want a space character after Kalle we will have to write it like this: | ||
- | M125 My own macro : | + | '' |
Inside the "" | Inside the "" | ||
- | M125 My own macro : | + | '' |
Another control code is used to output the contents of a parameter and is called #x. This control code prints out the contents of the last-mentioned parameter. Mentioning a parameter implies printing it outside the "" | Another control code is used to output the contents of a parameter and is called #x. This control code prints out the contents of the last-mentioned parameter. Mentioning a parameter implies printing it outside the "" | ||
- | M125 Print spindle rotation speed : < | + | '' |
Other control codes can be used to decide the appearance of a number | Other control codes can be used to decide the appearance of a number | ||
- | M125 Print out X : < | + | '' |
- | Below you will find a lists of control codes: | + | ==== Lists of control codes ==== |
- | #b end-of-block | + | ^Code^Description^ |
- | #nnn prints the asciisign | + | |#b |end-of-block| |
- | ## prints # | + | |#nnn |prints the ascii sign nnn (e.g. #003)| |
- | #" | + | |## |prints #| |
- | #x prints active parameter | + | |#" |
- | #$ | + | |#x |prints active parameter| |
- | #Dn | + | |#$ |prints active text parameter| |
- | #dn | + | |#Dn |max. n number of decimals (3)| |
- | (-1 =no decimal point) | + | |#dn |min. n number of decimals (-1 =no decimal point)| |
- | #Rt | + | |#Rt |fills in concluding zeros by t (ä = none)| |
- | (ä = none) | + | |#Hn |max. n-number of integers (9)| |
- | #Hn | + | |#hn |min. number of integers (1| |
- | #hn | + | |#Lt |fills in introductory zeros by t | |
- | #Lt | + | |#Pt |sign for decimal point (ä= no decimal point (.))| |
- | #Pt | + | |#Tt |sign at positive number (ä=none)| |
- | (ä= no decimal point (.)) | + | |#Nt |sign at negative number (-)| |
- | #Tt | + | |#Fn |fills in to the right to the number of positions with the sign indicated by #R (0).| |
- | #Nt | + | |
- | #Fn | + | |
Line 253: | Line 252: | ||
'' | '' | ||
- | ====== Examples ====== | ||
- | ====== SETTING VARIABLES AND FLAGS ====== | + | |
+ | ===== SETTING VARIABLES AND FLAGS ===== | ||
The $-sign is used to set unconditionally a variable at a value or to set a flag. If for instance we want to set variable 10 with the contents of < | The $-sign is used to set unconditionally a variable at a value or to set a flag. If for instance we want to set variable 10 with the contents of < | ||
Line 274: | Line 273: | ||
- | ====== REPETITIONS (LOOPS) | + | ===== REPETITIONS (LOOPS) ===== |
By means of the *-character we can perform repetitions or loops as they are also called. | By means of the *-character we can perform repetitions or loops as they are also called. | ||
Line 290: | Line 289: | ||
< | < | ||
<V1> \\ | <V1> \\ | ||
- | < | + | < |
- | + | ||
- | '' | + | |
==== Example ==== | ==== Example ==== | ||
Line 358: | Line 355: | ||
Besides checking if a parameter and a variable are equal we can also check if they are greater or smaller and then we write it like this: | Besides checking if a parameter and a variable are equal we can also check if they are greater or smaller and then we write it like this: | ||
- | ''< | + | '' |
or | or | ||
- | ''< | + | '' |
Line 369: | Line 366: | ||
We can also use an integer and then we write it like this: | We can also use an integer and then we write it like this: | ||
- | ''< | + | '' |
meaning: IF THE PARAMETER IS GREATER THAN 10 CARRY OUT BRACKETS. | meaning: IF THE PARAMETER IS GREATER THAN 10 CARRY OUT BRACKETS. | ||
Line 375: | Line 372: | ||
or | or | ||
- | ''< | + | '' |
IF THE PARAMETER IS LESS THAN 10 CARRY OUT THE BRACKETS | IF THE PARAMETER IS LESS THAN 10 CARRY OUT THE BRACKETS | ||
Line 397: | Line 394: | ||
Then we can write a new macro calculating the X,Y coordinates according to the values input in V12 and V13: | Then we can write a new macro calculating the X,Y coordinates according to the values input in V12 and V13: | ||
- | '' | + | '' |
- | : $V10< | + | '' |
- | $V11< | + | '' |
- | '' | + | |
When calling macro 120 our coordinate will be found stored in V10 and V11. | When calling macro 120 our coordinate will be found stored in V10 and V11. | ||
Line 471: | Line 468: | ||
===== FAQ ===== | ===== FAQ ===== | ||
+ | |||
+ | //- How do I change my lathe post processor to make it feed out the programs with diameter programming instead of radius programming? | ||
+ | // | ||
+ | |||
+ | ANSWER: | ||
+ | |||
+ | - Find the macro feeding out the X-coordinate usually M104 and enter *2 into the parameter < | ||
+ | |||
+ | |||
+ | Before: \\ | ||
+ | '' | ||
+ | |||
+ | After: \\ | ||
+ | '' | ||
+ | |||
+ | //- How do I get a decimal point after all numbers, even integers? My machine requires this otherwise the numbers will be interpreted as thousandths. | ||
+ | // | ||
+ | |||
+ | ANSWER: | ||
+ | |||
+ | Find the macros writing out the X, | ||
+ | |||
+ | Before: \\ | ||
+ | '' | ||
+ | M105 Set new Y-pos : & | ||
+ | M106 Set new Z-pos : & | ||
+ | |||
+ | After: \\ | ||
+ | '' | ||
+ | M105 Set new Y-pos : & | ||
+ | M106 Set new Z-pos : & | ||
+ | |||
+ | It could be that coordinate values are written out in several places in the post processor and then you will have to find these and enter the code #d0 there too. | ||
+ | |||
+ | //- How do I get R-values instead of I and J on arcs less that 180 degrees// | ||
+ | |||
+ | ANSWER: | ||
+ | |||
+ | Change the macros M6-M9 from looking like this: | ||
+ | |||
+ | '' | ||
+ | : M108 M103 " G02" M104 M105 < | ||
+ | |||
+ | '' | ||
+ | |||
+ | '' | ||
+ | : M108 M103 " G03" M104 M105 < | ||
+ | |||
+ | '' | ||
+ | |||
+ | To look like this: | ||
+ | |||
+ | '' | ||
+ | '' | ||
+ | '' | ||
+ | '' | ||
+ | \\ | ||
+ | '' | ||
+ | '' | ||
+ | \\ | ||
+ | '' | ||
+ | '' | ||
+ | |||
+ | Notice that your macros may not look exactly like the above and then of course you will have to consider this when changing your macros. | ||
+ | |||
+ | //- How do I make changes to have my NC-programs stored in a different folder?// | ||
+ | |||
+ | ANSWER: | ||
+ | |||
+ | There is a position at the beginning of the post processor indicating where the NC-programs will be stored. This position is called I102. Enter the search way into the catalogue where you want to store your programs after the colon of I102. | ||
+ | |||
+ | '' | ||
+ | |||
+ | //-My machine writes all values in thousandths and without decimals. How do I fix this?// | ||
+ | |||
+ | ANSWER: | ||
+ | |||
+ | Change the positions I3-I5 at the beginning of the post processor so that it says 1000 instead of 1 on these: | ||
+ | |||
+ | '' | ||
+ | '' | ||
+ | '' | ||
+ | |||
+ | Then change the macros that write out the X,Y, Z values (usually M104-M106) so that it says #D0 in front of # in them. Then check if X, Y, Z-values are entered into any more positions of the post processor and change those too, if necessary. | ||
+ | |||
+ | '' | ||
+ | '' | ||
+ | '' | ||
+ | |||
+ | //-I want my first change of tools to look different from the subsequent ones in my NC-program. Can I change this?// | ||
+ | |||
+ | ANSWER: | ||
+ | |||
+ | Yes, look up the section on conditions at the beginning of this booklet. A similar case is described there. | ||
+ | |||
+ | //- I have problems when I want to test-run my post processor. A red square appears where it says "Wrong character" | ||
+ | |||
+ | ANSWER: | ||
+ | |||
+ | It could be somewhat tricky to find out where the error is but begin by checking all macros and see to it that no colon is missing after their commentaries. Then make sure that all lines broken in the middle have a backslash ( \ ) afterwards. Also make sure that \ has not been entered on lines where it should not be. Also see to it that all text strings begin and end with a quotation mark ("). | ||
+ | Above all, concentrate on the macros you entered last. Hopefully this will help you find the error. | ||
+ | |||
+ | |||
+ | //- I have entered that I want the number of the tool output at the start of the program but I get the wrong number. What am I doing wrong?// | ||
+ | |||
+ | |||
+ | ANSWER: | ||
+ | |||
+ | The softwaresearches the bea-file step by step and sets the parameters needed at each operation. At the start of the program the tool number has not yet been set. This is done only in connection with "Fast transport to new X, Y position with one tool". In order to get the number of the tool output at the start of the program you will have to use a parameter called < | ||
+ | |||
+ | |||