DMS_COUNTS

This command displays a screen for the operator to enter defects and counts, and the results are placed in the record buffer.

Syntax

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.

 

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:

Instructions for entering data in button mode (the default):

To do this:

Use these options or steps:

Add 1
to a defect:

Options:

  • Click the defect button.

  • Type the hot key for the defect.

    In button mode, the letters [A] to [Z] are automatically assigned to the first 26 defects. When a defect button is highlighted or the cursor is blinking in the number field, pressing the hot key is the same as clicking the associated defect button – even when the hot key letters are hidden.

  • Press the LEFT ARROW key, RIGHT ARROW key, TAB key, or SHIFT+TAB to highlight the defect. Then press the SPACEBAR or the ENTER key.

Subtract 1
from a defect:

  1. Press and hold the SHIFT key.

  2. Click the defect button.

  3. Release the SHIFT key.

OR

  1. Type the minus sign or click the button. The defect entry screen is now in subtract mode.

  2. Follow the instructions to "Add 1 to a defect" (above).

  3. To turn off subtract mode, type the minus sign or click the button again.

Add a
larger number to a defect:

Options:

  • Enter the number by typing it or clicking the number buttons, and then click the defect button.

  • Enter the number by typing it or clicking the number buttons, and then type the hot key for the defect.

  • Press the LEFT ARROW key, RIGHT ARROW key, TAB key, or SHIFT+TAB to highlight the defect button.
    Enter the number by typing it or clicking the number buttons, and then press ENTER.

Subtract a
larger number from a defect:

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
to a defect:

Options:

  • Highlight the defect, and then click Add or press the ENTER key.

  • Double-click the defect.

Subtract 1
from a defect:

  1. Press and hold the SHIFT key.

  2. Click the defect.

  3. Release the SHIFT key.

OR

  1. Highlight the defect.

  2. Type the minus sign or click the button. The defect entry screen is now in subtract mode.

  3. Click Add or press the ENTER key.

  4. To turn off subtract mode, type the minus sign or click the button again.

Add a
larger number to a defect:

  1. Highlight the defect.

  2. Enter the number by typing it or clicking the number buttons.

  3. Click Add or press the ENTER key.

Subtract a
larger number from a defect:

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.

  1. While the cursor is blinking in the box next to the Add button, type a number to add to the highlighted defect. If there is nothing to add to the highlighted defect, leave the box blank.

  2. Press the ENTER key. This will add the number you entered to the defect that was highlighted, and then it will highlight the next defect in the list.

  3. Repeat steps 1 and 2 until you have added as many defect counts as needed.

Add a number to a specific defect in the list:

  1. Highlight the defect.

  2. Click in the box next to the Add button.

  3. Enter the number by typing it or clicking the number buttons.

  4. Click Add or press the ENTER key.

Subtract 1
from a defect:

  1. Press and hold the SHIFT key.

  2. Click the defect.

  3. Release the SHIFT key.

OR

  1. Highlight the defect.

  2. Type the minus sign or click the button. The defect entry screen is now in subtract mode.

  3. Click Add or press the ENTER key.

  4. To turn off subtract mode, type the minus sign or click the button again.

Subtract a
larger number from a defect:

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 one-click 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:

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.

-1

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
User Message

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.")
+ GOTO [D1]

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.")
+ EXIT

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.")
+ EXIT

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