hexagon logo

Forcing Operator Input

I am using an INPUT COMMENT at the beginning of my program to have the CMM operator put in his name. Knowing our operators on the off-shifts, I am willing to bet they will simply hit the OKAY button without inputting their info. I believe there is a way using an IF/THEN expression to prevent the program from continuing if there is no input but I am just getting my feet wet using expressions. I would be extremely grateful if someone could share their expertise in this.
Parents
  • Here's a piece of code I wrote for a similar problem. You should be able to adapt it for your needs. Probably longer than it needs to be but it works.

    L1         =LABEL/
    CHECK      =COMMENT/INPUT,NO,FULL SCREEN=NO,
                Enter the type of check:
                [P]roduction    
                [R]eceiving     
                [S]tudy or PPAP 
                [O]ther         
                IF/CHECK.INPUT=="P"
                GOTO/L2
                END_IF/
                IF/CHECK.INPUT=="p"
                GOTO/L2
                END_IF/
                IF/CHECK.INPUT=="R"
                GOTO/L2
                END_IF/
                IF/CHECK.INPUT=="r"
                GOTO/L2
                END_IF/
                IF/CHECK.INPUT=="S"
                GOTO/L2
                END_IF/
                IF/CHECK.INPUT=="s"
                GOTO/L2
                END_IF/
                IF/CHECK.INPUT=="O"
                GOTO/L2
                END_IF/
                IF/CHECK.INPUT=="o"
                GOTO/L2
                END_IF/
                ELSE/
                GOTO/L1
                END_ELSE/
    L2         =LABEL/


    edit/ just noticed I missed the OP by 2 months. Oops.
Reply
  • Here's a piece of code I wrote for a similar problem. You should be able to adapt it for your needs. Probably longer than it needs to be but it works.

    L1         =LABEL/
    CHECK      =COMMENT/INPUT,NO,FULL SCREEN=NO,
                Enter the type of check:
                [P]roduction    
                [R]eceiving     
                [S]tudy or PPAP 
                [O]ther         
                IF/CHECK.INPUT=="P"
                GOTO/L2
                END_IF/
                IF/CHECK.INPUT=="p"
                GOTO/L2
                END_IF/
                IF/CHECK.INPUT=="R"
                GOTO/L2
                END_IF/
                IF/CHECK.INPUT=="r"
                GOTO/L2
                END_IF/
                IF/CHECK.INPUT=="S"
                GOTO/L2
                END_IF/
                IF/CHECK.INPUT=="s"
                GOTO/L2
                END_IF/
                IF/CHECK.INPUT=="O"
                GOTO/L2
                END_IF/
                IF/CHECK.INPUT=="o"
                GOTO/L2
                END_IF/
                ELSE/
                GOTO/L1
                END_ELSE/
    L2         =LABEL/


    edit/ just noticed I missed the OP by 2 months. Oops.
Children
No Data