Post processor conditional statements

1. Post processor conditional statements

Can I use conditional statements in the post processor? If so, what is the syntax? My control does not support G17,G18,G19 commands, but instead has separate commands for arc interpolation; G02/G03 for XY, G102/G103 for XZ, and G202/G203 for YZ. I'm thinking something similar to:

*CW_ARC_MOTION*
if "plane" == G17 then G02
if "plane" == G18 then G102
if "plane" == G19 then G202

Or is there a better way to do this?

2. Re: Post processor conditional statements

One way is to define the planes as 0, 10 and 20 and then use the "plane" variable for the arc motions.

Define the planes as below.

*PLANE_XY*
0
*PLANE_XZ*
10
*PLANE_YZ*
20

Then use the "plane" variable for the arc motions as below.

*CW_ARC_MOTION*
G"plane"2
*CCW_ARC_MOTION*
G"plane"3

/Joakim

3. Re: Post processor conditional statements

Clever. Thanks!

4. Re: Post processor conditional statements

Using that method, I have the following:
*PLANE_XY*
0

*PLANE_XZ*
10

*PLANE_YZ*
20

R

*RAPID_MOTION*
G00 "x" "y" "z"

*LINEAR_MOTION*
G01 "x" "y" "z"

*CW_ARC_MOTION*
G"plane"2 "x" "y" "z" "r"

*CCW_ARC_MOTION*
G"plane"3 "x" "y" "z" "r"

*RAPID*
N"lnbr" "motion";
*END_SECTION*

*RAPID_APPROACH*
N"lnbr" "motion";
*END_SECTION*

*RAPID_RETRACT*
N"lnbr" "motion";
*END_SECTION*

*APPROACH*
N"lnbr" "motion" F"feedz";
*END_SECTION*

*FIRST_CUT*
N"lnbr" "motion" F"feed";
*END_SECTION*

*CUT*
N"lnbr" "motion";
*END_SECTION*

This outputs a G00/01/02/03 command for every movement. My control has limited memory and must drip feed so it'd be nice to keep the code as minimal as possible. I can strip out the extraneous commands in excel, but is there a better way of writing the post to do this?

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•