hexagon logo

i need a work around for the "Cancel" Button.

I have been searching for a possible solution to my problem and not had a whole lot of luck. For starters I have 7107 silver advantage CMM with 2014.1 PC DMIS. My problem is that i need a way to ask for an operator input of "YES" or "NO" without the operator having the ability to use the "Cancel" button that is in the input pop up screen. I need a definitive way to get a YES or NO answer without the operator being able to hit cancel and stop the program instead of answering. Any suggestions would be greatly appreciated
.
  • Sounds like you need new operators if they don't follow instructions.

    But seriously, couldn't they always cancel the program another way, like the E-Stop button? Someone here might talk you through how to create a custom form without a cancel, but it could be dangerous not to be able to stop the program at all.
  • Create a form with a yes/no dropdown?

    How do you create an Input Comment with multiple inputs? - PC-DMIS User Forum
    http://www.pcdmisforum.com/forum/pc-dmis-enterprise-metrology-software/pc-dmis-code-samples/28132-how-do-you-create-an-input-comment-with-multiple-inputs

    Post your code samples here<br> For all versions of PC-DMIS

  • Sounds like you need new operators if they don't follow instructions.

    But seriously, couldn't they always cancel the program another way, like the E-Stop button? Someone here might talk you through how to create a custom form without a cancel, but it could be dangerous not to be able to stop the program at all.


    The CANCEL in the execution box isn't the same thing.

    You CAN keep them from ignoring (canceling) that using CODE. Easiest way off the top of my head is to use numeric values as inputs (and clear previous instances in a setup menu). Such as:
    1) YES
    2) NO
    And then put a label BEFORE the input and IF/GOTO after so that if they don't enter a valid number, it just keeps looping through that comment/input

    here is an example I did for a part that may or may not have nuts put in it:

    L1         =LABEL/
    C1         =COMMENT/INPUT,NO,'1 = NUTS
                                ,2 = NO NUTS'
                ASSIGN/V1 = C1.INPUT
                IF_GOTO/V1<1,GOTO = L1
                IF_GOTO/V1>2,GOTO = L1


    If a number less than 1 is entered or a number greater than 2, it loops back to label L1 and asks again.
    (later in the program I use the value to branch for nuts or no-nuts)
  • I understand that they can still use the e-stop. i can explain in a little more detail the reason behind why i need what this setup. The company i work for does not use data page, and the way we gather and store our data is through our Hertzler system. At the very end of the program we have a tail made up of variables that go through and grab all the significant data that they want and stores them into those variables. Those variables are then sent through a program and made into a format that our hertzler program can understand. I know its a very round about method and it is very far from ideal. My boss wants me to set up a way for the operator to be able to say yes get this data and send it to our hertzler system or no do not send it to hertzler system and skip over our data variable tail. By skiping over the data tail it still stores our layout sheet in a paperless file on network so we can look back if we need to but doesn't go into our master system. If an operator hits the cancel button during that question then the program ends where it is and no data is captured what so ever in our paperless file or master system. So they want me to try and idiot proof this process by taking the away the ability for the operator to cancel the program, at least as much as possible.
  • I understand that they can still use the e-stop. i can explain in a little more detail the reason behind why i need what this setup. The company i work for does not use data page, and the way we gather and store our data is through our Hertzler system. At the very end of the program we have a tail made up of variables that go through and grab all the significant data that they want and stores them into those variables. Those variables are then sent through a program and made into a format that our hertzler program can understand. I know its a very round about method and it is very far from ideal. My boss wants me to set up a way for the operator to be able to say yes get this data and send it to our hertzler system or no do not send it to hertzler system and skip over our data variable tail. By skiping over the data tail it still stores our layout sheet in a paperless file on network so we can look back if we need to but doesn't go into our master system. If an operator hits the cancel button during that question then the program ends where it is and no data is captured what so ever in our paperless file or master system. So they want me to try and idiot proof this process by taking the away the ability for the operator to cancel the program, at least as much as possible.


    see my previous post, it will work like a champ. After the IF/GOTO as shown, you simply add a label at the END of the program, past all that data collection stuff, and then use NO-NUTS (NO) value to send it to the label at the end of the program.

    IF_GOTO/V1<1,GOTO = L1            
    IF_GOTO/V1>2,GOTO = L1            
    IF_GOTO/V1>1,GOTO = L2

    where L2 is the label at the end of the program.


  • The CANCEL in the execution box isn't the same thing.

    You CAN keep them from ignoring (canceling) that using CODE. Easiest way off the top of my head is to use numeric values as inputs (and clear previous instances in a setup menu). Such as:
    1) YES
    2) NO
    And then put a label BEFORE the input and IF/GOTO after so that if they don't enter a valid number, it just keeps looping through that comment/input

    here is an example I did for a part that may or may not have nuts put in it:

    L1 =LABEL/
    C1 =COMMENT/INPUT,NO,'1 = NUTS
    ,2 = NO NUTS'
    ASSIGN/V1 = C1.INPUT
    IF_GOTO/V1<1,GOTO = L1
    IF_GOTO/V1>2,GOTO = L1


    If a number less than 1 is entered or a number greater than 2, it loops back to label L1 and asks again.
    (later in the program I use the value to branch for nuts or no-nuts)


    This is the setup that we are currently using. the problem is in the comment input box that opens up. That comment box has a place to put in the input value and it has an OK button to accept the information or a Cancel button that just ends the program where its at. I need a way that the operator is not able to press the cancel button in the input pop up box.
  • I would do what MJA75 suggested, create a form which has two options, to collect the data and not to collect.

    FORM1      =LABEL/
                ASSIGN/OPTION1=0
                ASSIGN/OPTION2=0
    CS1        =FORM/FILENAME= V316_LHRH.FORM
                PARAM/CHECKBUTTON1.CHECK=OPTION1
                PARAM/CHECKBUTTON2.CHECK=OPTION2
                PARAM/=
                ENDFORM/
                IF_GOTO/OPTION1==1 AND OPTION2==1,GOTO = FORM1
                IF_GOTO/OPTION1==0 AND OPTION2==0,GOTO = FORM1


    I create the form with two radio buttons and a continue button, the form can only be moved on by pressing the continue button. If nothing is selected it loops back to the form again, if both are selected again it loops back. Of course the wrong one can always be selected
  • You could do something like this...

    RESTART    =LABEL/
                DO/
    C1         =COMMENT/INPUT,NO,FULL SCREEN=NO,
                1 runs Cir 1
                2 runs Cir 2
                3 runs Cir 3
                4 runs Cir 4
                5 runs Cir 5
    
                Anything else will exit this loop
                SELECT/C1.INPUT
                  CASE/1
                  GOTO/CIR_ONE
                END_CASE/
                CASE/2
                GOTO/CIR_TWO
                END_CASE/
                CASE/3
                GOTO/CIR_THREE
                END_CASE/
                CASE/4
                GOTO/CIR_FOUR
                END_CASE/
                CASE/5
                GOTO/CIR_FIVE
                END_CASE/
                DEFAULT_CASE/
                GOTO/END
                END_DEFAULTCASE/
                END_SELECT/
                UNTIL/C1.INPUT > 6 OR C1.INPUT < 0
    CIR_ONE    =LABEL/
    CIR1       =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
                THEO/<0,0,0>,<0,0,1>,50
                ACTL/<0,0,0>,<0,0,1>,50
                TARG/<0,0,0>,<0,0,1>
                START ANG=0,END ANG=0
                ANGLE VEC=<1,0,0>
                DIRECTION=CCW
                USE_PIN=NO
                REPORT VEC=<0.003282,-0.6004511,-0.7996548>
                SHOW FEATURE PARAMETERS=YES
                  VOID DETECTION=NO
                  REMEASURE=NO
                  SURFACE=THICKNESS_NONE,0
                  MEASURE MODE=NOMINALS
                  RMEAS=NONE,NONE,NONE
                  CIRCULAR MOVES=STRAIGHT
                  GRAPHICAL ANALYSIS=NO
                  FEATURE LOCATOR=NO,NO,""
                SHOW CONTACT PARAMETERS=YES
                  NUMHITS=5,DEPTH=0.25,PITCH=0
                  SAMPLE METHOD=SAMPLE_HITS
                  SAMPLE HITS=3,SPACER=3
                  AVOIDANCE MOVE=BOTH,DISTANCE=10
                  FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
                SHOW HITS=NO
    DIM CTQ_1= LOCATION OF CIRCLE CIR1  UNITS=MM ,$
    GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH  HALF ANGLE=NO
    AX    NOMINAL       MEAS       +TOL       -TOL        DEV     OUTTOL
    X         0.00       0.00       0.10       0.10       0.00       0.00 ----#----
    Y         0.00       0.00       0.10       0.10       0.00       0.00 ----#----
    Z         0.00       0.00       0.10       0.10       0.00       0.00 ----#----
    D        50.00      50.00       0.10       0.10       0.00       0.00 ----#----
    END OF DIMENSION CTQ_1
                GOTO/RESTART
    CIR_TWO    =LABEL/
    CIR2       =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
                THEO/<100,0,0>,<0,0,1>,50
                ACTL/<100,0,0>,<0,0,1>,50
                TARG/<100,0,0>,<0,0,1>
                START ANG=0,END ANG=0
                ANGLE VEC=<1,0,0>
                DIRECTION=CCW
                USE_PIN=NO
                REPORT VEC=<0.003282,-0.6004511,-0.7996548>
                SHOW FEATURE PARAMETERS=YES
                  VOID DETECTION=NO
                  REMEASURE=NO
                  SURFACE=THICKNESS_NONE,0
                  MEASURE MODE=NOMINALS
                  RMEAS=NONE,NONE,NONE
                  CIRCULAR MOVES=STRAIGHT
                  GRAPHICAL ANALYSIS=NO
                  FEATURE LOCATOR=NO,NO,""
                SHOW CONTACT PARAMETERS=YES
                  NUMHITS=5,DEPTH=0.25,PITCH=0
                  SAMPLE METHOD=SAMPLE_HITS
                  SAMPLE HITS=3,SPACER=3
                  AVOIDANCE MOVE=BOTH,DISTANCE=10
                  FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
                SHOW HITS=NO
    DIM CTQ_2= LOCATION OF CIRCLE CIR2  UNITS=MM ,$
    GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH  HALF ANGLE=NO
    AX    NOMINAL       MEAS       +TOL       -TOL        DEV     OUTTOL
    X       100.00     100.00       0.10       0.10       0.00       0.00 ----#----
    Y         0.00       0.00       0.10       0.10       0.00       0.00 ----#----
    Z         0.00       0.00       0.10       0.10       0.00       0.00 ----#----
    D        50.00      50.00       0.10       0.10       0.00       0.00 ----#----
    END OF DIMENSION CTQ_2
                GOTO/RESTART
    CIR_THREE  =LABEL/
    CIR3       =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
                THEO/<-100,0,0>,<0,0,1>,50
                ACTL/<-100,0,0>,<0,0,1>,50
                TARG/<-100,0,0>,<0,0,1>
                START ANG=0,END ANG=0
                ANGLE VEC=<1,0,0>
                DIRECTION=CCW
                USE_PIN=NO
                REPORT VEC=<0.003282,-0.6004511,-0.7996548>
                SHOW FEATURE PARAMETERS=YES
                  VOID DETECTION=NO
                  REMEASURE=NO
                  SURFACE=THICKNESS_NONE,0
                  MEASURE MODE=NOMINALS
                  RMEAS=NONE,NONE,NONE
                  CIRCULAR MOVES=STRAIGHT
                  GRAPHICAL ANALYSIS=NO
                  FEATURE LOCATOR=NO,NO,""
                SHOW CONTACT PARAMETERS=YES
                  NUMHITS=5,DEPTH=0.25,PITCH=0
                  SAMPLE METHOD=SAMPLE_HITS
                  SAMPLE HITS=3,SPACER=3
                  AVOIDANCE MOVE=BOTH,DISTANCE=10
                  FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
                SHOW HITS=NO
    DIM CTQ_3= LOCATION OF CIRCLE CIR3  UNITS=MM ,$
    GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH  HALF ANGLE=NO
    AX    NOMINAL       MEAS       +TOL       -TOL        DEV     OUTTOL
    X      -100.00    -100.00       0.10       0.10       0.00       0.00 ----#----
    Y         0.00       0.00       0.10       0.10       0.00       0.00 ----#----
    Z         0.00       0.00       0.10       0.10       0.00       0.00 ----#----
    D        50.00      50.00       0.10       0.10       0.00       0.00 ----#----
    END OF DIMENSION CTQ_3
                GOTO/RESTART
    CIR_FOUR   =LABEL/
    CIR4       =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
                THEO/<0,100,0>,<0,0,1>,50
                ACTL/<0,100,0>,<0,0,1>,50
                TARG/<0,100,0>,<0,0,1>
                START ANG=0,END ANG=0
                ANGLE VEC=<1,0,0>
                DIRECTION=CCW
                USE_PIN=NO
                REPORT VEC=<0.003282,-0.6004511,-0.7996548>
                SHOW FEATURE PARAMETERS=YES
                  VOID DETECTION=NO
                  REMEASURE=NO
                  SURFACE=THICKNESS_NONE,0
                  MEASURE MODE=NOMINALS
                  RMEAS=NONE,NONE,NONE
                  CIRCULAR MOVES=STRAIGHT
                  GRAPHICAL ANALYSIS=NO
                  FEATURE LOCATOR=NO,NO,""
                SHOW CONTACT PARAMETERS=YES
                  NUMHITS=5,DEPTH=0.25,PITCH=0
                  SAMPLE METHOD=SAMPLE_HITS
                  SAMPLE HITS=3,SPACER=3
                  AVOIDANCE MOVE=BOTH,DISTANCE=10
                  FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
                SHOW HITS=NO
    DIM CTQ_4= LOCATION OF CIRCLE CIR4  UNITS=MM ,$
    GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH  HALF ANGLE=NO
    AX    NOMINAL       MEAS       +TOL       -TOL        DEV     OUTTOL
    X         0.00       0.00       0.10       0.10       0.00       0.00 ----#----
    Y       100.00     100.00       0.10       0.10       0.00       0.00 ----#----
    Z         0.00       0.00       0.10       0.10       0.00       0.00 ----#----
    D        50.00      50.00       0.10       0.10       0.00       0.00 ----#----
    END OF DIMENSION CTQ_4
                GOTO/RESTART
    CIR_FIVE   =LABEL/
    CIR5       =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
                THEO/<0,-100,0>,<0,0,1>,50
                ACTL/<0,-100,0>,<0,0,1>,50
                TARG/<0,-100,0>,<0,0,1>
                START ANG=0,END ANG=0
                ANGLE VEC=<1,0,0>
                DIRECTION=CCW
                USE_PIN=NO
                REPORT VEC=<0.003282,-0.6004511,-0.7996548>
                SHOW FEATURE PARAMETERS=YES
                  VOID DETECTION=NO
                  REMEASURE=NO
                  SURFACE=THICKNESS_NONE,0
                  MEASURE MODE=NOMINALS
                  RMEAS=NONE,NONE,NONE
                  CIRCULAR MOVES=STRAIGHT
                  GRAPHICAL ANALYSIS=NO
                  FEATURE LOCATOR=NO,NO,""
                SHOW CONTACT PARAMETERS=YES
                  NUMHITS=5,DEPTH=0.25,PITCH=0
                  SAMPLE METHOD=SAMPLE_HITS
                  SAMPLE HITS=3,SPACER=3
                  AVOIDANCE MOVE=BOTH,DISTANCE=10
                  FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
                SHOW HITS=NO
    DIM CTQ_5= LOCATION OF CIRCLE CIR5  UNITS=MM ,$
    GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH  HALF ANGLE=NO
    AX    NOMINAL       MEAS       +TOL       -TOL        DEV     OUTTOL
    X         0.00       0.00       0.10       0.10       0.00       0.00 ----#----
    Y      -100.00    -100.00       0.10       0.10       0.00       0.00 ----#----
    Z         0.00       0.00       0.10       0.10       0.00       0.00 ----#----
    D        50.00      50.00       0.10       0.10       0.00       0.00 ----#----
    END OF DIMENSION CTQ_5
                GOTO/RESTART
    END        =LABEL/
    



    This is functional but was just me playing around with the case select case default case stuff

    Mike
  • At the very end of the program we have a tail made up of variables that go through and grab all the significant data [...]. By skiping over the data tail it still stores our layout sheet in a paperless file on network [...]. If an operator hits the cancel button during that question then the program ends where it is and no data is captured what so ever in our paperless file or master system.


    Why not move the question so that the "paperless file on network" is written before you ask the question? Then it doesn't matter if they answer "NO" or "Cancel".
  • Here is a small applet that simply offers a YES NO dialog box. Optionally you can add the question to dialog through a command line parameter or use a file that is located in the same folder.



    This is a standalone program that can be launched from another program to get a response of yes or no.

    Example:

    yesno.exe Do you want to print?

    This will give you a YES NO dialog box with Do you want to Print" in the instruction window.

    After the operator selects one of the choices, a text file called yesno.txt is created with the answer on the first line. Other lines include the question and the date and time of the response.

    You may also use a file instead of the command line parameter to ask the question. The file is named yesno.ask. Place the question to be asked on the first line only. It will be read in when the yesno.exe is launched.

    When used in PCDMIS, use the external command function and select to have PCDMIS wait for the called program to close.

    https://dl.dropboxusercontent.com/u/40148759/ForumLinks/Permanent/yesno/yesno.zip

    the yesno.exe file can be placed anywhere you want such as the folder where your parts are stored or if you organize your parts into their own folders, you could put it into each folder. There is no install required.