How to define the graphics area dimensions at the beginning of the program
Some controllers require an initialization of the graphics area by setting up the overall dimensions of the “blank” or the total travel envelope. For example, on a Heidenhain iTNC 530 control programmed in ISO format, the two lines below will define a 100 x 80 x 30 mm blank, with the origin located in the center of the upper face:
N10 G30 G17 X-50 Y-40 Z-30*
N20 G31 X+50 Y+40 Z+0*
The problem is that this information is needed at the beginning of the program, when most post-processors still have no information whatsoever about the total travel envelope of the upcoming program.
With CAM-POST, this challenge becomes very simple, as the post-processor can look ahead for information that normally becomes available at the end of the process. Here are the outlines of a macro solution to do this:
1. Machine Startup Macro:
This macro declares some global variables, then searches ahead for whichever values these variables will be set to at the end of the program. Finally, it uses these variables to output the codes which configure the blank dimensions.
- INSERT/’G30 G17 !(@X) !(@Y) !(@Z)’,XMIN,YMIN,ZMIN
- INSERT/’G31 !(@X) !(@Y) !(@Z)’,XMAX,YMAX,ZMAX
2. Machine Shutdown Macro:
This macro writes into the global variables above the minimum and maximum travel boundaries taken from the $TLMIN and $TLMAX arrays. These arrays are built up automatically by the post throughout the process, and can be used to extract travel information for individual tools or for all tools together (as in our case).
Benefit to User
Automatically obtain information about the program travel boundaries to define the graphics area dimensions at the beginning of the program.
For more information or comments, please do not hesitate to contact Phil at TechTipTuesday@icam.com