hexagon logo

doubt

Hello.
There must be a way I tell if the deviations that are within a range to do something, if not, do something else. Could someone help me a little?

thanks
Parents
  • IF/ and END_IF/ pairs ar a good basic way to start.
    They are under Insert -> Flow Control -> Control Pairs

    They must be in a pair.

    the IF command makes a statement and tests to see if it's true or false.
    If it's true, the program continues executing each line of code.
    If it's false, the program skips any lines of code until it reaches the END_IF.

    Key: Any lines of code between the IF/ and END_IF/ only get run when the IF statement is true.

    Example 1:
    IF/CIR1.DIA.MEAS<1.005
    (English: IF the actual measured diameter of the feature CIR1 is less than 1.005, then execute the lines of code before the End_If...)
    COMMENT/OPER,NO,Full Screen=NO,HOLE IS UNDERSIZED, CANCEL RUN AND SEND PART TO REWORK
    END_IF/




    I often use these with LABEL and GOTO.
    GOTO is a command to skip lines of code until a certain LABEL is reached.

    Example 2:
    C1 =COMMENT/INPUT,YES,Full Screen=NO,'PART NUMBER:'
    (A simple Operator Input to instruct what part # is being run)

    IF/C1.INPUT==251
    GOTO/BEGIN_PART_251_SPECIFIC_DIMS
    END_IF/

    ~
    Here would be some lines of code that will get skipped for a 251 part.
    ~

    BEGIN_PART_251_SPECIFIC_DIMS=LABEL/

    The program resumes running a 251 part here.
Reply
  • IF/ and END_IF/ pairs ar a good basic way to start.
    They are under Insert -> Flow Control -> Control Pairs

    They must be in a pair.

    the IF command makes a statement and tests to see if it's true or false.
    If it's true, the program continues executing each line of code.
    If it's false, the program skips any lines of code until it reaches the END_IF.

    Key: Any lines of code between the IF/ and END_IF/ only get run when the IF statement is true.

    Example 1:
    IF/CIR1.DIA.MEAS<1.005
    (English: IF the actual measured diameter of the feature CIR1 is less than 1.005, then execute the lines of code before the End_If...)
    COMMENT/OPER,NO,Full Screen=NO,HOLE IS UNDERSIZED, CANCEL RUN AND SEND PART TO REWORK
    END_IF/




    I often use these with LABEL and GOTO.
    GOTO is a command to skip lines of code until a certain LABEL is reached.

    Example 2:
    C1 =COMMENT/INPUT,YES,Full Screen=NO,'PART NUMBER:'
    (A simple Operator Input to instruct what part # is being run)

    IF/C1.INPUT==251
    GOTO/BEGIN_PART_251_SPECIFIC_DIMS
    END_IF/

    ~
    Here would be some lines of code that will get skipped for a 251 part.
    ~

    BEGIN_PART_251_SPECIFIC_DIMS=LABEL/

    The program resumes running a 251 part here.
Children
No Data