This command displays a screen for the operator to enter defects and counts, and the results are placed in the record buffer.
Syntax
DMS_COUNTS "part_number", "process", "date_time"
The combination of "part_number" and "process" determines the DMS standard for which this data will be stored.
The "process" parameter must name an existing DMS process that has been configured for one or more defects. These are the defects that will be shown on the defect entry screen. If this process does not exist, an error message will be displayed.
The "date_time" parameter defines the date/time stamp for this data record. If this is blank or is not a valid date/time stamp, the current date/time (from the computer clock) will be used.
DMS_COUNTS "part_number", "title<defect>defect_desc1</defect><defect>defect_desc2</defect>", "date_time"
You can also replace the "Process" with a list of defects.
To do this, replace the "Process" parameter with an XML delimited list of defects as in the following example. This will display a Defect Entry screen containing only the listed defects. You can have one or more defects included in your string. The title text is optional.
"title<defect>defect_desc1</defect><defect>defect_desc2</defect>..."
In this mode of operation, the "Process" tag is not set (the automatic DB_Set_Value that typically occurs is skipped), so you must set it yourself if you wish to use the record buffer.
See the Examples section.
Notes
Display options for this defect entry screen are set by the DMS_OPT command.
Before displaying the defect entry screen, the DMS_COUNTS command checks the record buffer for existing defects and for the sample size:
If the sample size has been set in the record buffer, then the user can click Summary to view the Defect percent. If the sample size is not set, the Defect percent will be NA.
If defect IDs and counts have been set in the record buffer, they will be displayed on the defect entry screen.
Instructions for entering data in button mode (the default):
To do this: |
Use these options or steps: |
Add 1 |
Options:
|
Subtract 1 |
OR
|
Add a |
Options:
|
Subtract a |
Follow the instructions to "Add a larger number to a defect" (above), but enter a negative number. |
Instructions for entering data in list mode (when add-next mode and replace mode are disabled):
To do this: |
Use these options or steps: |
Add 1 |
Options:
|
Subtract 1 |
OR
|
Add a |
|
Subtract a |
Follow the instructions to "Add a larger number to a defect" (above), but enter a negative number. |
Instructions for entering data in list mode when add-next mode is enabled:
To do this: |
Use these options or steps: |
Add to the defect counts for all of the defects in the list: |
When the defect entry screen is displayed, the cursor is automatically placed in the box next to the Add button and the first defect is highlighted.
|
Add a number to a specific defect in the list: |
|
Subtract 1 |
OR
|
Subtract a |
Follow the instructions to "Add a number to a specific defect in the list" (above), but enter a negative number. |
To finish entering data:
|
in normal mode |
|
In button mode: |
Click OK. |
Click a defect button. |
In list mode: |
Click OK. |
Options: • Double-click a list item. • Click the Add button or press the ENTER key. |
After the operator has finished entering data, the following information is set in the record buffer:
Part Number and Process
Date/time stamp
Defect reasons and counts
Return value
This command returns one of the following numbers:
1 |
The user clicked OK (in normal mode) or entered data for one defect (in one-click mode). |
0 |
The user clicked Cancel. This command will also return 0 if no defects have been defined for this process. |
|
An error occurred. |
Examples
DMS_COUNTS "A-50 INSERT", "M-CUT OFF", ""
This formula will display a defect entry screen for the "M-CUT OFF" process. When the user clicks OK, this formula will place these values in the record buffer:
XML tag |
Value |
Part_Number |
A-50 INSERT |
Process |
M-CUT OFF |
DateTime |
(computer clock date and time) |
Defect_ID1 through Defect_ID20 |
(defects entered by the user) |
Defect_Description1 through Defect_Description20 |
(defects entered by the user) |
Defect_Count1 through Defect_Count20 |
(defect counts entered by the user) |
DMS_COUNTS "A-50 INSERT", "M-CUT OFF", "1/1/2007 15:29"
or
DMS_COUNTS "A-50 INSERT", "M-CUT OFF", "2007010115290000"
Both of these formulas will display a defect entry screen for the "M-CUT OFF" process. When the user clicks OK, this formula will place these values in the record buffer:
XML tag |
Value |
Part_Number |
A-50 INSERT |
Process |
M-CUT OFF |
DateTime |
2007010115290000 |
Defect_ID1 through Defect_ID20 |
(defects entered by the user) |
Defect_Description1 through Defect_Description20 |
(defects entered by the user) |
Defect_Count1 through Defect_Count20 |
(defect counts entered by the user) |
DMS_COUNTS "A-50 INSERT",
"Choose a scratch type<defect>Carton Damaged</defect><defect>Carton Popping</defect><defect>Case Packer</defect>", ""
This will display a Defect Entry screen with only the listed defects.
Sample template to collect and store defect data:
Cell |
Column |
Method and |
Formula |
Explanation |
A1 |
Calculated |
Formula |
DMS_OPT 0, 0 : DMS_OPT 8, 1 : DMS_OPT 9, 1 : DB_RESET 0 |
• Reset attribute data entry options to default settings • Configure this template to automatically set the number of defective units equal to the number of defects • Configure the defect entry screen to display the Note button • Clear the record buffer |
B1 |
Calculated |
Formula |
Q_CONNECT 1, "GainSeeker71_O", "Y", "N" |
Connect to the GainSeeker database |
C1 |
Dept. |
Keyboard Choose your Dept. from the list: |
|
Prompt the user to enter traceability information |
D1 |
Calculated |
Keyboard Enter Sample Size: |
|
Prompt the user to enter the sample size |
E1 |
Calculated |
Formula |
IF [D1] < 1, (MESSAGE "Sample Size must be a number greater than 0. Please re-enter the sample size.") |
Check the sample size to make sure it's a positive number |
F1 |
Calculated |
Formula |
DB_SET_VALUE "Trace_3", [C1] : DB_SET_VALUE "Sample_Size", [D1] |
Set the record buffer values for traceability field 3 (Dept.) and sample size |
G1 |
Calculated |
Formula |
DMS_COUNTS "T-55ST", "INCOMING", "" |
• Display the defect entry screen for Part Number "T-55ST" and Process "INCOMING" • Apply the date/time stamp from the computer clock |
H1 |
Calculated |
Formula |
IF [G1] = 0, ( IF (YESNO "Are you sure you want to Cancel? This will exit the template without saving your data."), EXIT, GOTO [D1] ) : IF [G1] = -1, (MESSAGE "An error has occurred. Please contact your System Administrator.") |
Check the results of the defect entry screen: • If the user clicked Cancel, give them the choice to keep entering data or exit • If some kind of error has occurred, display a message and exit |
I1 |
Calculated |
Formula |
DB_INSERT 1, "DMS" : IF (LEN (DB_VALUE "Note")) > 0, (Q_EXECUTE 1, DB_NOTE_SQL "DMS*") : DB_RESET 0 |
• Save this defect data record • If a note was entered, save this defect note record • Clear the record buffer |
J1 |
Calculated |
Formula |
IF [I1] = 0, (MESSAGE "An error has occurred. Please contact your System Administrator.") |
If there was an error storing the data, display a message and exit |
K1 |
Calculated |
Formula |
IF (YESNO "Enter more data for this Department?"), GOTO [D1], EXIT |
Allow the user to enter another data record or exit |