The following diagram displays a configuration with GPIO 3 set to Input and GPIO1, GPIO2, and GPIO3 set to Output.
The GPIO Outputs are the Current Sink (NPN), and the GPIO Input is the Current Source (NPN). Input is received from an NPN proximity sensor. The power source is a PLC 24VDC PSU, and the GPIO functions are not opto-isolated.