# Operation

This section describes how certain processes work in theory and in practice.

## Theory of Operation

Sending user data consists of populating user data in the PLC logic, copying that data into the User Data array field and sending it to the vision system in the next cyclic update. The User Data sent from the PLC to the vision system can then be used in the next inspection when the Spreadsheet runs. The user data in the the vision system does not get used until a control bit is set to 1. A status bit is also read into the PLC to create a handshake with the vision system.

As with trigger or acquisition, these bits work together to form a 4-way handshake to keep the PLC and vision system in sync. The handshaking diagram in How to Acquire an Image is similar and applies to sending user data from the PLC.

1. The Set User Data event signal is sent from the PLC and needs only to be set when the Set User Data Ack acknowledgement signal is low.

2. The Set User Data Ack acknowledgement signal is set in the vision system when the Set User Data event signal is received or processed.

3. The Set User Data event is held high in the PLC until the Set User Data Ack acknowledgement signal is received from the vision system.

4. The Set User Data Ack acknowledgement signal must be held high until the Set User Data event signal is cleared in the PLC.

## Process

1. The PLC sets the Set User Data bit and the vision system moves the User Data from the the user data holding buffer into the Spreadsheet to be used the next time the Spreadsheet runs.

2. The vision system returns the Set User Data Ack acknowledgement signal to the PLC set to 1.

3. The PLC receives the Set User Data Ack acknowledgement and clears the Set User Data bit to 0.

4. When the vision system receives the signal that the Set User Data bit was cleared, it clears the Set User Data Ack acknowledgement signal.

The steps above correlate to the 4 steps above describing the 4-way handshake.

This handshaking is the default behavior to send user data from the PLC although a legacy mode of sending user data is also supported which does not use the 4-way handshake. This legacy mode setting is disabled by default and can be enabled in the protocol settings setup in In-Sight Vision Suite by checking the Enable User Data Bypass checkbox. It works by populating the user data in the PLC logic, copying that data into the User Data array field and sending it to the Spreadsheet of the vision system directly in the next cyclic update, bypassing the user data holding buffer. The user data is then available next time the Spreadsheet runs.

User Data can be sent from the PLC to the vision system using manual triggering when the vision system is in Offline mode. This is useful for testing and debugging purposes.