# SLMP Protocol Scanner Operations

SLMP Scanner is a command/response-based protocol, which originates from the In-Sight vision system, and the vision system must send read requests to the PLC at periodic intervals to determine if there are changes in the control bits. This process is called "polling," and defines the polling cycle.

## Polling Cycle

At the beginning of every polling cycle, the Control block is read from the PLC. The vision system then processes any bit state-changes in the control block, in order. Some state-changes require additional communication with the PLC, such as reading a Job ID or the User Data fields, or writing the Status block. These requests are placed in a queue. The polling mechanism processes these requests in order, until there are either no more items in the queue, or the polling interval has been exceeded. Once the polling cycle has been completed, the cycle does not repeat.

Note:

- Any communication items that were placed in the queue from the previous cycle, but were not processed, become the first items processed during the next cycle. If there are several items in the queue at the beginning of the cycle, at least one item from the queue is always processed during each polling cycle, even if the processing can delay the next polling cycle.

- The Poll Interval (ms) parameter in the SLMP Scanner Settings dialog allows you to define the polling cycle interval.

## Block Communications

The table below defines the actions that the In-Sight vision system takes in response to a status bit change in the Control block:

Block | When Read/Written | Action
--- | --- | ---
Control | Read at a user-specified periodic interval. | Acquisition Trigger External Event Read or Write of any other block
Status | Written when the connection is first established, and when a new status is available. |
Input Block | Written when new inspection results are available, or when a job change occurs. |
Output Block | Read when the Set User Data bit changes from 0 to 1, or when the Execute Command bit changes from 0 to 1. | Setting the User Data Ack bit after reading the User Data field.
Command | Read when the Initiate String Command bit changes from 0 to 1. | Processing the String Command.
Command Result | Written when new string command results are available. | Setting the String Command Ack bit, after writing the Command Result.