Quantcast
Channel: PC-DMIS User Forum - Forums
Viewing all articles
Browse latest Browse all 11658

Simple Fail Safe Operator Input Code?

$
0
0
Hi all,

Just looking for a way of making operator input more obvious than it already is in our programs.

In the program we ask the operators to enter the serial number of the parts by scanning the barcode on the batch cards by using the barcode reader (I did have a picture accompanying this but the picture was too intermittent). We ask the operators to scan the barcode twice just in case they accidentally scan the wrong one then there is a IF/GO_TO command that if the two inputs match to continue with the program.

Now, I thought this was simple enough for the operators but they always have a way of proving you wrong! The barcodes of our batch cards are in the order of batch number followed by serial number (e.g. 123456 0001A). Our programming of the input (shown below) takes the first six values as the batch number and removes the first 7 values and you're left with the serial number.

However, we have an issue when an operator just manually types in the serial number without the batch number. So the serial number becomes the batch number and there is no serial number. A pain, but the data is still there. However, issues arise with this when the serial number is longer than 6 digits. Also, there are certain operators who literally type in/scan nothing. So there is nothing in any field. Idiots.

Is there a code i can use that makes this fool proof so that by typing in serial number (or nothing) will not let the operator continue. I have a bit of a brain block currently ha.

Cheers.

Code:
COMMENT/OPER,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO,
            PROGRAM USES BARCODE READER
SERIAL_TEST=LABEL/
C_1        =COMMENT/INPUT,YES,FULL SCREEN=NO,
            PLEASE INPUT PART SERIAL/BATCH NUMBER
            USE BAR CODE READER
            ===================
C_2        =COMMENT/INPUT,NO,FULL SCREEN=NO,
            PLEASE RE-INPUT PART SERIAL/BATCH NUMBER                  
            USE BAR CODE READER
            ===================
            IF_GOTO/C_1.INPUT==C_2.INPUT,GOTO = SERIAL_PASSED
            COMMENT/OPER,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO,
            THE TWO SERIAL/BATCH NUMBERS DO NOT MATCH! PLEASE CHECK AND RE-SCAN
            ===================================================================
            GOTO/SERIAL_TEST
SERIAL_PASSED=LABEL/
FPTR       =FILE/OPEN,C:\ProgramData\CMMNUMBER.txt,READ
CMM_NO     =FILE/READLINE,FPTR,{CMMNUMBER}
            FILE/CLOSE,FPTR,KEEP
            TRACEFIELD/NO_DISPLAY,LIMIT=50 ; K0006 : LEFT(C_1.INPUT,6)
            TRACEFIELD/NO_DISPLAY,LIMIT=50 ; K0053 : RIGHT(C_1.INPUT,LEN(C_1.INPUT)-7)
            TRACEFIELD/NO_DISPLAY,LIMIT=50 ; K0012 : CMMNUMBER
            TRACEFIELD/NO_DISPLAY,LIMIT=50 ; FileName : C_1.INPUT

Viewing all articles
Browse latest Browse all 11658

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>