How to wire the gateway’s panel I/O (ADC, DI, relay, RS485)
Wiki: Setup, edge and devices
New to gateway setup? Start at How to set up a gateway: from hardware to green, > this page is a detail reference for step 3 (wire and power on) of that flow, covering the screw-terminal panel I/O instead of the network ports.
When to use this
Your gateway’s carrier board has a screw-terminal panel with analog inputs (ADC), isolated digital inputs (DI), a relay output, and serial ports (RS232/RS485), in addition to its two Ethernet ports. This page covers wiring each of those terminals and which protocol and source to pick in the app so the wired signal shows up as a live tag.
Before you start
- Power the gateway off while wiring the panel terminals.
- Know what you’re connecting: a 4-20mA loop sensor, a dry-contact switch, a PNP/NPN proximity sensor, a relay-driven load, or an RS485 device (VFD, meter, PLC).
- The panel is a removable screw terminal block, strip ~7mm of wire, insert, and tighten the screw. No crimp connectors needed.
ADC, 4-20mA / analog inputs
The panel breaks out three analog input channels (labeled ADC1, ADC2, ADC3) plus a shared GND.
- Wire your sensor’s signal output to ADC1 (or ADC2 / ADC3) and its return/common to GND.
- For a 4-20mA current-loop sensor (the common case, pressure, level, flow transmitters): wire the loop’s signal line to the ADC terminal and the loop return to GND, per your sensor’s own datasheet for loop power (most 2-wire loop sensors are externally powered).
- In the app: add a source with protocol Analog Input (ADC), then add a tag per wired channel with address 1, 2, or 3 matching the terminal you used (ADC1 → address 1, and so on). Scale the raw reading to engineering units (e.g. PSI, %) with the tag’s scale/offset fields once you know your sensor’s calibration curve.
Converting counts to engineering units
The tag’s raw value is the ADC’s own count, not a voltage or a PSI reading, the scale and
offset fields on the tag are what turn that count into something you actually care about.
The math is value = raw_count × scale + offset, and it’s applied for you on every read. You
just fill in scale/offset from your sensor’s spec sheet.
Worked example: the gateway’s onboard ADC reads about ±4.1V across a 12-bit count, so each count is about 2mV. Say you’ve wired a 4-20mA loop sensor through a 100Ω shunt resistor, and the sensor’s rated span is 0-100 PSI:
- 4mA through 100Ω = 0.4V → about 200 counts
- 20mA through 100Ω = 2.0V → about 1000 counts
You want 200 counts to read 0 PSI and 1000 counts to read 100 PSI, so:
scale = 100 / (1000 − 200) = 0.125offset = -0.125 × 200 = -25
Enter those two numbers on the tag, and a raw reading of 600 counts (the loop’s 12mA midpoint) comes through as 50 PSI instead of a meaningless count. Leave scale/offset at their defaults (1.0 / 0.0) and the tag just shows the raw count, unchanged.
DI, isolated digital inputs
The panel has two isolated digital input channels, DI1 and DI2, each with its own +
and - terminal pair.
Two wiring styles are supported:
- Dry contact (passive), a simple switch or relay contact with no power of its own. Wire
the switch across the DI’s
+/-pair. The gateway supplies the sensing current. - Wet contact (active), a powered sensor (e.g. a PNP or NPN proximity switch). Wire the
sensor’s output to the DI’s
+terminal and its return to-, using either your own power supply or the panel’s own 12VVoutterminal if your sensor draws little current.
In the app: add a source with protocol GPIO, then add a tag per DI with the pin address your gateway model documents for DI1/DI2, hover the info icon on the tags table’s Address column header for the exact pin numbers, since they vary by carrier board. If your switch reads inverted (open = “on” instead of “off”), set that tag’s active low option to flip the sense in software instead of rewiring.
Relay, controlled output
The panel has one relay output (double-pole, double-throw) with NC (normally closed), COM (common), and NO (normally open) terminals.
- Wire your load (a light, a horn, a PLC digital input, a contactor coil) between COM and either NC (energizes when the relay is off) or NO (energizes when the relay is on), pick whichever matches the fail-safe behavior you want if the gateway loses power.
- In the app: add a GPIO source and a tag for the relay’s pin (same Address column info-icon reference as DI above). Writing the tag drives the relay.
Relay outputs are for low-power control signals (driving a PLC input, an indicator, a small contactor coil), not for switching mains-voltage loads directly. Check your relay’s rated current/voltage before wiring a load straight to it.
Using the relay as a machine status light? Skip the manual GPIO tag above and use the dedicated Lights tab instead, see How to set up a machine light. It wires the relay to your machine’s running state and open andon calls automatically, with fail-safe wiring (NC) already decided for you, no separate tag to configure.
RS232 / RS485, serial devices
- RS232: one port, wired GND/TXD/RXD to a single external device (point-to-point only).
- RS485: two independent channels, each a twisted pair (A/B) that can daisy-chain multiple devices sharing the same bus (common for Modbus RTU meters, VFDs, and PLCs).
In the app: add a source with protocol Modbus RTU, then set the Serial device field to
whichever port you wired, its help text underneath names the exact device path for each labeled
panel port (/dev/rs485-1, /dev/rs485-2) on the standard gateway carrier board. Set baud rate,
parity, and stop bits to match your downstream device’s own serial settings, then address tags by
the device’s Modbus register map (e.g. 40001 for holding register 1).
Ethernet devices on a dedicated machine network
Panel terminals aren’t the only way a machine reaches the gateway, many devices (Modbus TCP meters, I/O modules, PLCs) are Ethernet. The gateway’s second network port exists for exactly this: keep machine traffic on its own wire, separate from the plant’s office network.
Three steps, in this order:
- Give the gateway’s second port an address. On the gateway’s own console
(its IP in a browser, on the plant network), under IP addressing, set the
second port, usually
eth1, to a static address on a subnet you pick for machines, e.g.192.168.1.10with subnet255.255.255.0. Leave the gateway field blank. Nothing on this segment routes anywhere. - Give each machine a static address on that same subnet. A dedicated
machine network has no DHCP server, so a device left on “automatic” will
never get an address and will sit disconnected. Set it in the
device’s own configuration tool (for a LabJack T4, that’s Kipling →
Network Settings → switch from DHCP to static, e.g.
192.168.1.207), then power-cycle the device so the change takes effect. If the device’s tool says its Ethernet is disconnected, that’s a cable or port problem, fix that before anything else. An address can’t help a link that isn’t there. - Point the source at it in the app. On the source, set NIC / interface to the second port and Host / IP to the device’s new address, then save, and push the configuration to the gateway (see below), which is what actually delivers the change to the device.
Saving vs. pushing: how a change reaches the gateway
Saving a source stores what you want. The gateway keeps running its current configuration until you push, since a push restarts the gateway’s data collection, so you can make several edits, review what will change, and then apply them all at once.
After saving, use the configuration-sync section at the bottom of the source page: review the pending changes, then push. The gateway confirms with “Configuration accepted, restarting to load it”, and within a few seconds the source’s status turns to Polling with a fresh timestamp.
Until you push, the source’s status still describes the OLD configuration, a failure message with a timestamp from several minutes ago is telling you the truth about the last poll it actually attempted, not a stale display.
Verifying a wired signal
Whatever protocol you configured, the fastest check is the gateway’s own Status tab (see manage gateways: the gateway home), every tag you add should show a live, changing value once the physical signal is present. For a fresh install, a good bench sanity check before wiring anything real:
- ADC: jumper a known voltage/current source into an ADC channel and confirm the tag moves.
- DI: short the DI’s
+/-terminals together (dry-contact test) and confirm the tag flips. - Relay: write the relay tag and listen/feel for the click, or check continuity across COM/NO with a meter.
- RS485: confirm the downstream device answers at all (a “no response”/timeout error in the source’s status usually means wiring polarity (A/B swapped) or a baud-rate mismatch before it means anything more exotic).
Related
- How to set up a gateway: from hardware to green
- How to manage gateways: the gateway home
- Need more analog channels than the onboard panel has? How to monitor more sensors than your gateway has terminals covers scaling past this panel’s 3 ADC channels with a sensor aggregator.