.

Your Products have been synced, click here to refresh
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.
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
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.
IF_GOTO/V1<1,GOTO = L1 IF_GOTO/V1>2,GOTO = L1 IF_GOTO/V1>1,GOTO = L2
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)
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
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/
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.
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |