User Tools

Site Tools


wiki:en:ppedit

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
wiki:en:ppedit [2019/10/10 11:57]
admin
wiki:en:ppedit [2019/10/10 11:59]
admin [CONDITIONS]
Line 225: Line 225:
 It now remains to create the condition which will output code M66 the first time: It now remains to create the condition which will output code M66 the first time:
  
-''&F25(” M66)''+''%%&F25(M66")%%'' 
  
 This means: //IF FLAG 25 IS NOT SET OUTPUT M66 AND SET FLAG 25.// This means: //IF FLAG 25 IS NOT SET OUTPUT M66 AND SET FLAG 25.//
Line 231: Line 231:
 The flag being zero (not set)  when we start the post processor the condition will be met the first time and since we use the &character the flag will be set which will entail that the condition will not be met the next time. It now remains to insert the condition in the desired position in the macro for the change of tools. The flag being zero (not set)  when we start the post processor the condition will be met the first time and since we use the &character the flag will be set which will entail that the condition will not be met the next time. It now remains to insert the condition in the desired position in the macro for the change of tools.
  
-''M111 Makro for toolchange: M103 <toolnr> ” T#x M6” \ \\ +''%%M111 Makro for toolchange: M103 <toolnr> T#x M6%%'' \\ 
-&F25(” M66)''+''%%&F25(M66")%%'' 
  
 Notice that we use the   \-sign (backslash) to tell the post processor to go on reading the macro on the next line. Notice that we use the   \-sign (backslash) to tell the post processor to go on reading the macro on the next line.
Line 238: Line 238:
 We can also indicate what we want to happen if the condition is not met (OR ELSE). If we want to change the macro for the change of tools so that M66 is output at the first change of tools and M67 (notice that this example is not necessarily logical but only used to explain the functions of the language) is output at all subsequent changes of tools we must add a pair of brackets to be executed if the condition is not met. This is done like this: We can also indicate what we want to happen if the condition is not met (OR ELSE). If we want to change the macro for the change of tools so that M66 is output at the first change of tools and M67 (notice that this example is not necessarily logical but only used to explain the functions of the language) is output at all subsequent changes of tools we must add a pair of brackets to be executed if the condition is not met. This is done like this:
  
-''&F25(” M66),(” M67)''+''%%&F25(M66"),(M67")%%'' 
  
 This means: IF FLAG 25 IS NOT SET OUTPUT M66 OTHERWISE OUTPUT M67 AND SET THE FLAG. This means: IF FLAG 25 IS NOT SET OUTPUT M66 OTHERWISE OUTPUT M67 AND SET THE FLAG.
Line 244: Line 244:
 After all types of conditions we can print an alternative pair of brackets separately with a comma sign to be executed if the first pair of brackets was not executed. Those who know some BASIC would picture the above line like this: After all types of conditions we can print an alternative pair of brackets separately with a comma sign to be executed if the first pair of brackets was not executed. Those who know some BASIC would picture the above line like this:
  
-''IF F25=0 THEN  +''%%IF F25=0 THEN %%'' \\ 
-  PRINT ” M66”  +''%%  PRINT M66" %%''  
-ELSE  +''%%ELSE %%''  
-  PRINT ” M67”  +''%%  PRINT M67" %%''  
-END IF \\ +''%%END IF %%'' \\ 
-F25=1 +''%%F25=1%%''  
-'' +
- +
  
  
wiki/en/ppedit.txt · Last modified: 2019/10/11 13:33 by admin