GPIO and Opto-Coupled GPIO
GPIO and Opto-Coupled GPIO

GPIO and Opto-Coupled GPIO

The GS20 devices have two dedicated input and two dedicated output general purpose IO that are optically coupled to provide electrical isolation and wiring flexibility.

Optically Coupled GPIO

Optocoupled GPIO has the advantage of being electrically isolated from the rest of the system and requires external reference through the COMMON_IN and COMMON_OUT wires. The termination of COMMON_IN and COMMON_OUT to an external voltage or ground determines if the input or output is Sinking (also known as NPN) type or Sourcing (also known as PNP) type.
The output GPIO performs similarly to switches connecting the GPIO pin to COMMON_OUT. When disabled, the GPIO pin is disconnected from COMMON_OUT and allowed to float. As a result, optocoupled outputs turn on relatively quickly, while the turn-off time is dependent upon how quickly the connected load dissipates charge.
Optocoupled inputs are enabled when voltage is applied across the GPIO pin and COMMON_IN.
Optocoupled GPIO can be operated in a non-isolated fashion by terminating COMMON_IN and COMMON_OUT to the DC_IN or GND wires used to power the device.
The following table provides a useful reference for such connections.
Wire
Termination
Configuration
COMMON_IN
GND
Sinking Input (NPN)
COMMON_IN
DC_IN
Sourcing Input (PNP)
COMMON_OUT
GND
Sinking Output (NPN)
COMMON_OUT
DC_IN
Sourcing Output (PNP)
While it is possible to configure inputs and outputs as the same type, this is not recommended as inputs and outputs must be of an opposite type on the device and auxiliary equipment to be compatible. All optocoupled GPIO share the COMMON_IN for inputs and COMMON_OUT for outputs. Therefore, all inputs must be of the same type and all outputs must be of the same type. For example, it is not possible to simultaneously configure sinking output on OUT0 and sourcing output on OUT1.
Refer to the documentation of the connected auxiliary equipment to ensure a compatible configuration, and remember to leave unused GPIO in a disabled state.
Optocoupled outputs are individually fused to protect against damage from short circuits or overload events. No power is consumed from the vision system, therefore, optocoupled GPIO are always available regardless of power source and have no impact on power budgeting.