trying to fix operators from entering blanks

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • trying to fix operators from entering blanks

    I have an issue with operators not entering any information when on comments, and I use that information as variables for file ID saving.

    I thought I have it figured out, but maybe someone can show me what I did wrong. I thought I could just

    C1_REPEAT =LABEL/
    C1 =COMMENT/INPUT,YES,FULL SCREEN=NO,
    WORK ORDER NUMBER:
    ASSIGN/INPUT_1=C1.INPUT
    IF/INPUT_1==""
    END_IF/



    THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    Attached Files
    -riley Lawlor
    Southern California
    Aerospace CNC Machinery

  • #2
    IF/INPUT_1==""
    END_IF/

    There is no action taken if it is empty?

    Comment


    • #3
      C1_repeat =label/
      c1 =comment/input,yes,full screen=no,
      work order number:
      If_goto/c1.input=="",goto = c1_repeat
      sigpic
      Originally posted by AndersI
      I've got one from September 2006 (bug ticket) which has finally been fixed in 2013.

      Comment


      • #4
        thts basically the same thing I already had. When the comment comes up and the operator just pushs enter without typing a value it lets them move on to the next question. I want it to keep going back tell they enter something in.
        -riley Lawlor
        Southern California
        Aerospace CNC Machinery

        Comment


        • #5
          Originally posted by rtlawlor View Post
          thts basically the same thing I already had. When the comment comes up and the operator just pushs enter without typing a value it lets them move on to the next question. I want it to keep going back tell they enter something in.
          then you need to assign it to "" before the label. It might be holding a value from previous run.


          assign/c1=""
          C1_repeat =label/
          c1 =comment/input,yes,full screen=no,
          work order number:
          If_goto/c1.input=="",goto = c1_repeat
          sigpic
          Originally posted by AndersI
          I've got one from September 2006 (bug ticket) which has finally been fixed in 2013.

          Comment


          • #6
            ohhh, okay. let me try that. Sounds simple enough. haha
            -riley Lawlor
            Southern California
            Aerospace CNC Machinery

            Comment


            • #7
              That did not seem to work either. Im confused. Some reason in my head what I did should work.
              -riley Lawlor
              Southern California
              Aerospace CNC Machinery

              Comment


              • neil.challinor
                neil.challinor commented
                Editing a comment
                As other people have already pointed out, the code you originally posted is missing a GOTO command - it should read as below...
                Code:
                C1_REPEAT =LABEL/
                C1 =COMMENT/INPUT,YES,FULL SCREEN=NO,
                WORK ORDER NUMBER:
                ASSIGN/INPUT_1=C1.INPUT
                IF/INPUT_1==""
                GOTO/C1_REPEAT
                END_IF/

            • #8
              Yep, you're missing a GOTO command to send it back the the label you have before the question.

              You can either have a GOTO command in the IF statement, or use IF_GOTO like Matt showed.

              Applications Engineer
              Hexagon UK

              Comment


              • #9
                Time to break out the whip
                Che Guevara is a communist scumbag.

                Comment


                • #10
                  Seeing a future problem... What do you do about the input comment holding the information? If the program is run then saved, when it comes in again on the next work order and the same program is ran, the operator could just hit enter and it'll have the old work order number in it. How would you fix that issue?
                  Remembering my beautiful wife Taz who's life was lost on 6-13-2020. I love you and I miss you.

                  Comment


                  • BIGWIG7
                    BIGWIG7 commented
                    Editing a comment
                    everytime we start a new program we put it in a new folder with the date and the operators initals.
                    I hate rerunning over old programs.

                  • neil.challinor
                    neil.challinor commented
                    Editing a comment
                    In the setup (F5) on the general tab, switch on "Clear Input On Execution".

                  • A-machine-insp
                    A-machine-insp commented
                    Editing a comment
                    neil.challinor thanks. I knew there was a way, just wasn't sure how.

                • #11
                  Try this:
                  Code:
                  C1_REPEAT =LABEL/
                  C1 =COMMENT/INPUT,NO,FULL SCREEN=NO,
                  WORK ORDER NUMBER:
                  ASSIGN/INPUT_1=C1.INPUT
                  IF/INPUT_1==INT("")
                  COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
                  IF/Conditional value = 1
                  GOTO/C1_REPEAT
                  END_IF/
                  Or try this:
                  Code:
                  C1_REPEAT =LABEL/
                  C1 =COMMENT/INPUT,NO,FULL SCREEN=NO,
                  WORK ORDER NUMBER:
                  ASSIGN/INPUT_1=C1.INPUT
                  IF_GOTO/INPUT_1==INT(""),GOTO = C1_REPEAT
                  While loop numbers only:
                  Use IF/INPUT_1==INT("") OR INPUT_1==STR(INPUT_1) for numbers only, IF/INPUT_1==INT("") OR INPUT_1==INT(INPUT_1) for text only and IF/INPUT_1==INT("") for numbers and text only.

                  Code:
                   ASSIGN/ATTEMPT_CNT=0
                  WHILE/ATTEMPT_CNT<5
                  C1_REPEAT =LABEL/
                  C1 =COMMENT/INPUT,NO,FULL SCREEN=NO,
                  WORK ORDER NUMBER:
                  ASSIGN/INPUT_1=C1.INPUT
                  [B]IF/INPUT_1==INT("") OR INPUT_1==STR(INPUT_1)[/B]
                  ASSIGN/ATTEMPT_CNT=ATTEMPT_CNT+1
                  IF/ATTEMPT_CNT<5
                  COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
                  
                  Enter Work Order number
                  .
                  "Attempt "+ATTEMPT_CNT+" out of 5."
                  GOTO/C1_REPEAT
                  END_IF/
                  ELSE_IF/ATTEMPT_CNT>4
                  COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
                  "Reach the maximum "+ATTEMPT_CNT+" attempts."
                  Ending Routine.
                  GOTO/ROUTINE_END
                  END_ELSEIF/
                  END_IF/
                  GOTO/ROUTINE_START
                  END_WHILE/
                  ROUTINE_START=LABEL/
                  COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
                  Starting routing
                  ROUTINE_END=LABEL/
                  Last edited by davehocum; 05-14-2020, 08:52 AM.

                  Comment


                  • #12
                    I think this is not complete without a loop counter, at 5 failed attempts to follow direction an escalated corrective action is then automatically initiated

                    Comment


                    • #13
                      rtlawlor

                      ​​​​​​​I would do this, very simple a clean:

                      Code:
                      C1 =COMMENT/INPUT,NO,FULL SCREEN=NO,
                      Serial Number:
                      IF_GOTO/LEN(C1.INPUT)<1,GOTO = C1

                      Comment


                      • vpt.se
                        vpt.se commented
                        Editing a comment
                        Curveball: What if I just hit spacebar and then OK?

                    • #14
                      Originally posted by Douglas View Post
                      I think this is not complete without a loop counter, at 5 failed attempts to follow direction an escalated corrective action is then automatically initiated
                      You mean like an automated hammer will come down and bash them in the head? I LIKE IT!!!!!
                      sigpic
                      Originally posted by AndersI
                      I've got one from September 2006 (bug ticket) which has finally been fixed in 2013.

                      Comment


                      • Douglas
                        Douglas commented
                        Editing a comment
                        I was thinking of that rack mounted laser that somebody once suggested... still an empty space in rack here

                      • DAN_M
                        DAN_M commented
                        Editing a comment
                        I programmed an automated hammer (see below)

                    • #15
                      rtlawlor

                      Below is some stuff for you to mess with.
                      You'd use V1 for your variable for your report-naming.


                      Code:
                      C1 =COMMENT/INPUT,NO,FULL SCREEN=NO,
                      Serial Number:
                      IF_GOTO/C1.INPUT=="0",GOTO = L1
                      GOTO/L2
                      L1 =LABEL/
                      COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
                      You forgot to type in a serial number!!
                      Press OK to try again or hit Cancel.
                      C2 =COMMENT/INPUT,NO,FULL SCREEN=NO,
                      Serial Number:
                      IF_GOTO/C2.INPUT=="0",GOTO = SERNOLOOP
                      GOTO/L3
                      SERNOLOOP =LABEL/
                      ASSIGN/COUNTER1=0
                      DO/
                      ASSIGN/COUNTER1=COUNTER1+1
                      C3 =COMMENT/INPUT,NO,FULL SCREEN=NO,
                      Serial Number:
                      IF_GOTO/C3.INPUT>="1",GOTO = L4
                      UNTIL/COUNTER1=="5"
                      COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
                      You have failed to type in the part's serial number
                      SEVEN times.
                      
                      Please clock out & go apply at Wal Mart.
                      GOTO/ENDPRG
                      L2 =LABEL/
                      ASSIGN/V1=C1.INPUT
                      GOTO/L5
                      L3 =LABEL/
                      ASSIGN/V1=C2.INPUT
                      GOTO/L5
                      L4 =LABEL/
                      ASSIGN/V2=C3.INPUT
                      GOTO/L5
                      L5 =LABEL/
                      ENDPRG =LABEL/
                      Last edited by DAN_M; 05-05-2020, 02:02 PM.

                      Comment

                      Related Topics

                      Collapse

                      Working...
                      X