CountPassFail

Counts and returns passes, failures and total events for a given referencedvalue.

CountPassFailInputs

Syntax: CountPassFail(Event,Value,CountWhen Offline,ResetEvents.Manual,ResetEvents.Online,ResetEvents.Job Load)

Parameter Description

Event

Specifies the event on which to incrementthe counter. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Value

Specifies a required reference to the cell containing the source ofthe data stream to be counted.If no cell is referenced, the functionreturns a #ERR for all results.The counter that is incremented (Pass,Fail or #ERR) is based on the returned Value, as follows:

Pass

Value > 0

Fail

Value = 0

#ERR

Value < 0

Count When Offline

Specifies whether the counters will be incrementedwhile the sensor is Offline.

0 = OFF

Do not increment counters when thesensor is Offline.

1 = ON (default)

Increment counters when the sensoris Offline.

Reset Events

Forces the counters to reset depending onspecific events.

Manual

Specifies whether the counters will be resetto zero when the specified Eventoccurs.This parameter automatically references the Reset button, whichis inserted into the spreadsheet when the function is initially created.

Note: If this checkboxin manually toggled in the Property Sheet, the reference to the Resetbutton will be removed.To use the Reset button, this parameter must referencethe cell containing the Reset button.

0 = OFF (default)

Do not reset counters when the specifiedEvent occurs.

1 = ON

Reset counters when the specifiedEvent occurs.

Online

When the sensor is put Online, specifies whether the counters will be resetto zero after the first Eventoccurs.

0 = OFF

When the sensoris put Online, do not reset counters after the first Event occurs.

1 = ON (default)

When the sensor isput Online, reset counters after the first Event occurs.

Job Load

Specifies whether the counters will be resetto zero when a job is loaded.

0 = OFF

Do not reset counters when a jobis loaded.

1 = ON (default)

Reset counters when a job is loaded.

CountPassFailOutputs

Returns

A Count data structure containingthe incremented counters or #ERR if any of the input parameters are invalid.

Results

When CountPassFailis initially inserted into a cell, a result table and a Reset button arecreated in the spreadsheet.When the Reset button is pressed, all counterswill be reset to zero.

CountPassFailVision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Clocked Data Storage.

Passes

GetPassCount(Count)

The incremental count of passes.The counteris incremented when the returned Valueis greater than zero.

Failures

GetFailCount(Count)

The incremental count of failures.The counteris incremented when the returned Value is equal to zero.

Errors

GetErrorCount(Count)

The incremental count of errors.The counteris incremented when the returned Value is less than zero.

Total

GetTotalCount(Count)

The total number of passes, failures anderrors.