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:34] admin [REPETITIONS (LOOPS)] |
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 57: | Line 57: | ||
===== MACROS (M) ===== | ===== MACROS (M) ===== | ||
- | M-definitions or macros are used to " | + | M-definitions or macros are used to " |
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 395: | 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 521: | Line 520: | ||
To look like this: | To look like this: | ||
- | '' | + | '' |
- | : M108 M103 " G02" M104 M105 < | + | '' |
- | M7 Clockwise arc > than 180° \\ | + | '' |
- | : M108 M103 " G02" M104 M105 < | + | '' |
\\ | \\ | ||
- | M8 C.Clockwise arc < than 180° \\ | + | '' |
- | : M108 M103 " G03" M104 M105 < | + | '' |
\\ | \\ | ||
- | M9 C.Clockwise arc > than 180° \\ | + | '' |
- | : M108 M103 " G03" M104 M105 < | + | '' |
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. | 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. | ||
Line 538: | Line 537: | ||
ANSWER: | 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. | + | 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?// | //-My machine writes all values in thousandths and without decimals. How do I fix this?// | ||
Line 548: | Line 547: | ||
Change the positions I3-I5 at the beginning of the post processor so that it says 1000 instead of 1 on these: | Change the positions I3-I5 at the beginning of the post processor so that it says 1000 instead of 1 on these: | ||
- | '' | + | '' |
- | I4 Y scale : 1000 \\ | + | '' |
- | I5 Z scale : 1000'' | + | '' |
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. | 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. | ||
- | '' | + | '' |
- | M105 Set new Y-pos : & | + | '' |
- | M106 Set new Z-pos : & | + | '' |
- | //-I want my first change of tools to look different from the subsequent ones in my nc-program. Can I change this?// | + | //-I want my first change of tools to look different from the subsequent ones in my NC-program. Can I change this?// |
ANSWER: | ANSWER: | ||
Line 564: | Line 563: | ||
Yes, look up the section on conditions at the beginning of this booklet. A similar case is described there. | 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: | ANSWER: |