On the IG21 each Digital IO terminal can be used as either an input or an output. This includes the "Counters Digital IOs" terminals though in the Samsara Dashboard these are known as terminals 5 and 6.
On the IG21 the "GND" terminals are internally tied to the negative terminal. Thus when wiring inputs - such as a switch - connect one end to the Digitial IOs GND terminal and the other end to the desired input terminal.
An output or "Load" - in this example a light - is wired with one end connected to the positive power terminal and the other end to the desired output terminal.
Configuring Digital IO
By default all Digital IO are configured as Inputs. Outputs turned on via logic in the IG21 should be set as "PLC", not Output. To make changes, find the IG21 Gateway under Settings --> Gateways and click "Inputs"
Below the image of the IG21 are the Analog and Digital IO. To change them click on the input and select the desired mode. In the picture below note that terminals 3 and 4 are set to PLC.