The following are the commands which are built into TurboPost.
These commands can be used to create macros to customize cycles.
The first set of commands define single block motion only.
ASSIGN: This command is used to make assignments to variables in the command file.
Examples:
ASSIGN: Pen=5; Zfeed= Feed;
ASSIGN: Shift_off= 1-Startpt;
Note that more than one variable assignment can be put in a line.
Try to limit the command line to less than 80 characters.
OUTPUT: This command is for a one line template.
Examples:
OUTPUT: G50X{Diahome/2}Z{Zhome}S{Speedmax}
OUTPUT: G00T{Tcode}M{36+Range}
OUTPUT: G96S{Speedcode} {Coolant}
The rules for a one line template are the same as for templates in general.
RAPID: This command will generate a rapid traverse move. The composition of the block will be based on the block format defined in the output format file. If the block format is defined as:
RAPID: gcode= 0 rapid std blk= N*G*X*Z
Then the RAPID command will generate a rapid move to the current X,Z position.
Examples:
RAPID: X= 1.2563; Z= -1.25;
RAPID: Z= Zend;
In the second example, no X movement will occur if the current X variable is unchanged since the last movement.
The following commands may generate many blocks of motion:
TEMPLATE: This command will insert a template into the NC code.
Examples:
TEMPLATE: tool_change
TEMPLATE: startup
The template name references the filename in the format directory for the post processor.
Make sure that all variables used in the template are defined in the command file.
MACRO: This command will call a macro.
Examples:
MACRO: pro_contour
MACRO: sturn_contour Repeats= Ncuts;
In the second command the macro will be repeated the number of cuts specified in the question file.
The macro name references the filename in the format directory for the post processor.
Macros may contain macro calls within them.
Make sure that all variables used in the template are defined in the command file.
IMPLIED_PATH: - cut the path bound by Xstart and Zstart.
i.e. only do those geometric elements greater than xstart and less than zstart.
IMPLIED_FPATH:- first do bounding as in IMPLIED_PATH above, second avoid undercuts as in CUTFPATH.
ROUGH: - rough out path defined by Path using Rough_angle as angle of cut
CUTFPATH: - cut the path selected by Path but don't cut any part of undercuts not reachable according to Uncut_angle.
UNDERPATH: - cut the undercut path selected by Upath on the path selected by Path.
The undercut is determined by Uncut_angle, the number of passes is set with Npasses and the Depth_of_cut sets the depth per pass.
{NOTE CUTFPATH: and UNDERCUT: are somewhat opposites}
CUTPATH: This command generates the NC output for a path.
It will generate only the X,Z motion along the path.
Example:
ASSIGN: Path= 5;
CUTPATH:
Example:
CUTPATH: Path=2; Feed= 4.5;
The CUTPATH command will most commonly be used in a macro, which will take care of the moves and approach cuts to the path.
Related to the CUTPATH command are the functions: Pathstartpt and Pathendpt.
Pathstartpt will place the X,Z values of the start point of the path into the variables Xstart, Zstart.
Pathendpt will place the X,Z values of the end point of the path into the variables Xend, Zend.
For example, to feed to the start point of path 5 we would have the following command sequence:
ASSIGN: Path=5; Pathstartpt
FEED: X= Xstart; Z= Zstart; Feed= 4.0;
Pathstartpt will also place the X,Z components of the normal and tangent vectors of the starting element of the path into the variables Xtangent,Ztangent, and Xnormal,Znormal.
Pathendpt will do the same for the end of the path.