Post processor conditional statements


Results 1 to 4 of 4

Thread: Post processor conditional statements

  1. #1

    Default 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?


    Similar Threads:


  2. #2
    Member
    Join Date
    Feb 2006
    Location
    Sweden
    Posts
    183
    Downloads
    0
    Uploads
    0

    Default 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. #3

    Default Re: Post processor conditional statements

    Clever. Thanks!



  4. #4

    Default Re: Post processor conditional statements

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

    *PLANE_XZ*
    10

    *PLANE_YZ*
    20

    *ARC_RADIUS_CHAR*
    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?



Tags for this Thread

Posting Permissions

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


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Post processor conditional statements

Post processor conditional statements