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: Plot_pen=5; Rap_level= -2.2;
ASSIGN: Z= Rap_level-Finish_depth;
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: G00X{Xtoolch}Y{Ytoolch}M6
OUTPUT: G01Z{Rap_level-Finish_depth}F{Feed}
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*Y*Z |
RAPID: X= 1.2563; Y= -3.25; Z= -1.25;
RAPID: Z= Rap_level+ Tool_clearance;
In the second example, no XY movement will occur if the current X,Y variables are unchanged since the last movement.
FEED: This command will generate a feed 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:
FEED: gcode= 1 feed std blk= N*G*X*Y*Z*F
Then the FEED command will generate a feed move to the current X,Y,Z position.
Examples:
FEED: X= 3.25; Y= -4.5; Z= 3.125;
FEED: Z= Rap_level- Finish_depth; Feed= 5.4; Codes= "M10";
In the second example the block generated in decimal format would look like:
G01Z-1.25F5.4M10
If the block format is defined as follows:
CANCEL: gcode= 80 rapid std blk= N*G*X*Y*Z
Examples:
CANCEL: Z= Ztoolch; Codes= Coolant_off;
this command might output:
G80Z12.5M9
This command should only be necessary on machines where only a G80 will cancel a canned cycle.
Most modern machines will cancel canned cycles with either G00 or G80.
The following commands may generate many blocks of motion:
TEMPLATE: This command will insert a template into the NC code.
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: cut_contour
MACRO: scut_contour Repeats= 5;
In the second command the macro will be repeated five times.
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.
| CUTPATH: | This command generates the NC output for a path. It will generate only the X,Y motion along the path. |
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 z moves and approach cuts to the path.
Related to the CUTPATH command are the functions:
Pathstartpt and Pathendpt.
Pathstartpt will place the X,Y values of the start point of the path into the variables Xstart, Ystart.
Pathendpt will place the X,Y values of the end point of the path into the variables Xend, Yend.
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; Y= Ystart; Feed= 4.0;
Pathstartpt will also place the X,Y components of the normal and tangent vectors of the starting element of the path into the variables Xtangent, Ytangent, and Xnormal, Ynormal.
Pathendpt will do the same for the end of the path.
CUTSURF: This command will generate NC output for a cutter path on a 3D surface defined in 3D Machining.
Example:
ASSIGN: Cutter_file= "cpathfile15";
CUTSURF:
ROUND: This command will generate NC output for a round cutting cycle.
The round cut cycle machines a circle and includes a tangent circular leadin.
Example:
ASSIGN: Diameter= 3.5;
ASSIGN: Clearance= .5;
ASSIGN: Starting_angle= 90;
ASSIGN: Cutter_offset= .375;
ASSIGN: Inside= "I";
ASSIGN: Cwccw= "CW";
ROUND: X= 3.25; Y= 4.25;
If the round cycle is to occur at a hole location the command sequence would be:
Example:
ASSIGN: Diameter= 3.5;
ASSIGN: Clearance= .5;
ASSIGN: Starting_angle= 90;
ASSIGN: Cutter_offset= .375;
ASSIGN: Inside= "I";
ASSIGN: Cwccw= "CW";
ASSIGN: Start_hole= 5; Holestartpt
ROUND: X= Xstart; Y= Ystart;
Here the function Holestartpt places the X,Y of hole number 5 into the variables Xstart, Ystart.
The variables listed above must be assigned values for the round cycle to work properly.
The variables do not have to be respecified for each round cycle.
Only assign the variables which change value.
The radius of the tangential leadin is one half of the Clearance.
If no circular leadin is desired a value of zero is required.
The functions Roundstartpt and Roundendpt are similar to the functions Pathstartpt and Pathendpt.
Roundstartpt places the calculated value of the start point of the round cycle into the variables Xstart and Ystart.
Roundendpt places the calculated value of the end point of the round cycle into the variables Xend, Yend.
ROUND is most often used in a macro which will handle z moves and approach moves.