# Operation

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

## Theory of Operation

Triggering an acquisition from a PLC consists of setting certain control bits and reading status bits. These bits work together to form a 4-way handshake to keep the PLC and the vision system in sync. The following is a generalized set of relationships for any handshaking used within the vision system (trigger or acquisition, results, external events, errors and commands).

When event trigger and acknowledgement signals implement a 4-way handshaking sequence, the following relationships are held between the two signals:

1. The EventTrigger signal sent from the PLC can only be set when the Acknowledgement signal is low.

2. The Acknowledgement signal is set in the vision system when the EventTrigger signal is received or processed.

3. The EventTrigger is held high in the PLC until the Acknowledgement signal is received from the vision system.

4. The Acknowledgement signal must be held high until the EventTrigger signal is cleared in the PLC.

Note: If either side of the communications channel does not follow the above sequence, indeterminate results occur.

## Process

1. When the vision system is set to the online state, it can be enabled to accept triggers from a PLC.

2. Once the PLC sends the Trigger Enable signal, the vision system returns a status signal to the PLC that it is ready to accept a trigger.

3. The PLC sets a Trigger bit and the vision system begins an image acquisition.

4. The vision system returns 2 status signals to the PLC:

   1. An acknowledgement signal that the trigger request was received.

   2. A change in the status signal that the vision system is not ready to accept another trigger.

5. The PLC receives the trigger acknowledgement and clears the Trigger bit.

6. When the vision system receives the signal that the Trigger bit was cleared it clears the trigger acknowledgement signal.

Steps 3 to 6 correlate to the 4-way handshake described previously.