# Typical Inspection Sequence

The Status block and Control block allow the Automation Controller to monitor the vision processing portion of the In-Sight vision system to determine when new results are available, and to request that the vision system queue any new results.

## Inspection/Result Sequence

When an image is acquired by an In-Sight vision system, the image is placed in a queue for processing. When the vision system has finished processing the image, the Inspection Completed bit is toggled.

The Buffer Results Enable bit determines how inspection results are handled by the vision system:

- If the Buffer Results Enable bit is set to False, then the inspection results are immediately placed into the Output Block and the Results Valid bit is set to True.

- If the Buffer Results Enable bit is set to True, the new results are queued in the buffer. The earlier inspection results remain in the Output Block until they are acknowledged by the Automation Controller, which sets the Inspection Results Ack bit to True. After the Results Valid bit is cleared, the Automation Controller sets the Inspection Results Ack bit back to False to allow the buffered results to be placed into the Output Block. This is a necessary handshake to ensure that the results are received by the Automation Controller.

## Status Block Behavior

Bit | Bit Name | Results If Buffering Is Disabled | Results If Buffering Is Enabled
--- | --- | --- | ---
0 | Reserved | Not implemented, reserved for future use.
1 | Inspection Complete | Toggled on completion of an inspection. | Toggled on completion of an inspection.
2 | Results Buffer Overflow | Remains set to 0. | Set when the inspection results could not be queued because the Automation Controller failed to acknowledge the previous results, causing the results buffer to overflow. Cleared when an inspection result is successfully queued.
3 | Results Valid | Set when new results are placed in the Output Block. Stays set until the results are acknowledged by setting the Inspection Results Ack bit to True. | Set when new results are placed in the Output Block. Stays set until the results are acknowledged by setting the Inspection Results Ack bit to True.

## Result Buffering

A buffer for inspection results can be enabled. If enabled, this allows a finite number of inspection data results to be buffered until the Automation Controller has time to read them. This is a useful feature for smoothing out data flows if different parts of the system, including the external Automation Controller, slow down for short periods of time.

If inspections occur faster than the results can be sent out, the primary difference between buffering and not buffering is determining which results get discarded:

- If buffering is not enabled, the most recent results are kept, and the earlier result that the Automation Controller was unable to read is lost. The most recent result overwrites the earlier result.

- If buffering is enabled, and the buffer becomes full, the most recent results are discarded until room becomes available in the buffer.

Example - Results Overflow Sequence
Note: In the following image, the term "PLC A Programmable Logic Controller is a ruggedized computer that you can use for automating processes or even an entire production line." is used as "Automation Controller".