Selection guide
Selecting a Revolution Pi Connect gateway for S7-1500 and Azure MQTT
Short answer
A RevPi Connect covers both jobs: two Ethernet ports separate the PLC network from the Azure uplink, up to five extension modules carry the analog and fieldbus hardware, and Node-RED is preinstalled. Size the analog side by counting 4-20 mA loops against the AIO's current-capable channels, and take Modbus TCP for the read-only feed so the S7-1500 keeps PUT/GET closed.
On this page
- Which base module covers both the S7-1500 link and the Azure MQTT uplink?
- How many analog modules do ten mixed current-loop and voltage signals need?
- Should the PLC talk Modbus TCP, S7 or Profinet to the gateway?
- How does Node-RED carry the PLC values to Azure over MQTT?
- How do you scale the analog channels and catch a broken 4-20 mA loop?
- Can the same unit log data and run a shop-floor mini-HMI?
- What replaces the SIM slot on a site with poor internet?
- Questions asked
A RevPi Connect answers both requirements in one bill of materials. The base unit carries two Ethernet ports, so the PLC network and the Azure uplink stay separated, it accepts up to five extension modules, and Node-RED is preinstalled, so the gateway logic, the analog calculations, the logging and a dashboard mini-HMI need no purchased software. Size the analog side by counting 4-20 mA loops against the AIO module's current-capable channels, because the MIO reads voltage only. For the S7-1500 link, commit to Modbus TCP for a read-only feed of calculated values; the S7 route needs PUT/GET permitted in the CPU, and Profinet fits only plants that mandate it. No RevPi has a SIM slot, so a cellular site gets an industrial router on the uplink port.
Which base module covers both the S7-1500 link and the Azure MQTT uplink? #
The RevPi Connect is the base unit for both jobs: it brings two Ethernet ports, so one sits on the PLC network and one on the uplink, and it accepts up to five extension modules for the analog and fieldbus hardware you add later. Put the machine subnet on the first port and the uplink subnet on the second, and leave routing between them off unless you enable it on purpose; that separation is the security boundary of the whole design. Node-RED is already on the current Buster image, so work starts at the flow, not at an install. When more separated networks are needed, the newer Connect 5 of the Compute Module 5 generation offers up to four multi-Gigabit Ethernet ports. If you prefer a packaged host over the module ecosystem, the same flow also runs on a fanless industrial mini PC as the gateway.
How many analog modules do ten mixed current-loop and voltage signals need? #
Count the current loops first, because they are the scarce resource: an AIO module provides 4 inputs that accept a loop current or a voltage signal, while an MIO provides 8 inputs at 0-10 V only.
| Module | Inputs | Accepted signals | Role here |
|---|---|---|---|
| AIO | 4 | 4-20 mA / 0-10 V | The only current-capable channels |
| MIO | 8 | 0-10 V only | Voltage density where no loop exists |
Worked example, six loops and four voltage signals: the loops need 6 current-capable channels, and 6 / 4 = 1.5 rounds up to 2 AIO modules with 8 channels, of which 6 go to the loops and 2 stay free, so only 2 of the 4 voltage signals fit and a third module is unavoidable. Take it as a third AIO: 3 x 4 = 12 channels, every one accepting either signal type, 2 spares, one module type to wire and document, using 3 of the 5 extension slots. The other branch: with 4 loops or fewer, one AIO covers the loops (4 loops fit 4 channels) and one MIO covers the voltages (10 - 4 = 6 signals inside its 8), so 2 modules suffice.
The datasheet settles two wiring details: whether the input range is set per channel or per module, and whether the AIO supplies transmitter loop power; if it does not, add an external 24 V supply for the loops.
Check: the current-loop count does not exceed the current-capable channels you ordered, and the module total stays inside the extension budget.
Should the PLC talk Modbus TCP, S7 or Profinet to the gateway? #
Choose Modbus TCP for a read-only feed of calculated values: the PLC program exposes one defined register block, and the S7-1500 keeps its data blocks closed instead of permitting PUT/GET communication from remote partners. The tag list is small and fixed, so all three routes carry it; what differs is where the work lands and who must agree.
| Route | Where the work lands | What decides it |
|---|---|---|
| Modbus TCP | The PLC copies the values into a register block you define; Node-RED polls it | Vendor-neutral, read-only by design, no PLC protection change |
| S7 connection | A Node-RED S7 client reads data-block addresses | Non-optimized data blocks plus a CPU protection change |
| Profinet gateway module | The RevPi gains a modular Profinet gateway; the process image carries the values | Plants that mandate Profinet-only integration; extra hardware |
Siemens documents that PUT/GET access from a remote partner must be permitted in the CPU before an S7 connection reads a byte, and every block to be read needs optimized access off so its tags carry absolute addresses. Modbus TCP avoids both, and the register map you publish fixes the REAL word order. Keeping MQTT off the PLC altogether is the case for a gateway, worked through in PLC MQTT direct publishing versus an IoT gateway.
Decision: Modbus TCP for the pump test bench; S7 only with the PLC owner's acceptance of the access change; the Profinet module only where the plant forbids the other two. Where the wider plant runs older buses, the same modular gateway family also comes in Profibus, and a fieldbus comparison of Modbus, Profibus and CANopen shows where each legacy bus still earns its place.
Check: ping both directions on the PLC subnet, then read one known value in Node-RED and match it to the TIA Portal watch table including sign and decimal scaling. A byte-swapped REAL appears as an implausibly large or tiny number; fix the word order, not the scaling.
How does Node-RED carry the PLC values to Azure over MQTT? #
Build the flow from three nodes: a poll node reads the PLC register block, a function node stamps a timestamp onto a JSON payload, and an MQTT out node publishes to the Azure endpoint over TLS using credentials from your Azure administrator. Take the broker host, client ID, credentials or certificates and the topic from that administrator rather than guessing them; when the Azure side is IoT Hub, the broker settings follow the pattern in selecting a gateway to publish Modbus data to Azure IoT Hub. Keep the poll interval equal to or slower than the PLC's update of the register block.
When the site firewall opens only 443, the publish depends on the ALPN extension, the handshake case traced in why MQTT over port 443 to a cloud needs ALPN. Buffer against uplink loss: when the MQTT node's status reports disconnected, write each payload to a local file or queue and drain it on reconnect, or every outage leaves a hole in the bench record. Harden the unit before the first tag leaves the plant, along the lines of securing Revolution Pi data for Azure IoT Edge.
Check: the MQTT status shows connected, and a cloud-side subscriber receives the payload with the watch-table values and a correct timestamp.
How do you scale the analog channels and catch a broken 4-20 mA loop? #
Scale every channel linearly before any math runs: for a current loop use EU = EU_min + (I_mA - 4) / 16 x (EU_max - EU_min), and flag any reading below 4 mA as bad instead of scaling it. Voltage channels scale as EU = EU_min + V / 10 x (EU_max - EU_min).
// Illustrative function-node code; these variable names are this example's own.
let euMin = 0.0; // engineering units at 4 mA, example span start
let euMax = 100.0; // engineering units at 20 mA, example span end
let iMa = 12.0; // measured loop current in mA
let eu = euMin + (iMa - 4.0) / 16.0 * (euMax - euMin); // 0 + (8 / 16) * 100 = 50.0
let bad = iMa < 4.0; // true means broken wire or dead transmitter
msg.payload = { value: eu, bad: bad };
return msg;
The test that proves it: run with iMa at 12.0 and the payload must carry value 50.0 with bad false; drop iMa to 0.0 and eu computes (0 - 4) / 16 x 100 = -25.0 with bad true. That negative is exactly why the flag gates the value before any consumer sees it. Average in a function node with a fixed-length window, exclude channels flagged bad, and never mix filtered with unfiltered values inside one calculation; for the flow calculations, implement the equation your transmitter documentation specifies for your measurement principle. Calibrate by injecting 4, 12 mA and full scale on the loop channels, then 0, 5 and 10 V, from a loop calibrator or bench supply, and expect 0, 50 and 100 % of span within the datasheet tolerance; an opened loop must raise the bad flag.
Can the same unit log data and run a shop-floor mini-HMI? #
Yes, with no purchased software: Node-RED is preinstalled on the current Buster image, so its dashboard nodes run the shop-floor mini-HMI and its function and file nodes handle the calculations and logging. Attach a display to the unit and serve the dashboard on it; the dashboard nodes carry no licence fee. Log from the same flow to a local file or database so the record survives an uplink outage, size the retention to the storage on the unit and rotate old records, because a full flash volume stops the flow from writing and can destabilize the OS.
Check: open the dashboard on the attached screen, compare each value against its source, and confirm every sample has a log entry with a matching timestamp.
What replaces the SIM slot on a site with poor internet? #
No current RevPi or extension module offers a SIM slot or WWAN modem, so place an industrial cellular router on the uplink port: the Teltonika RUT950, or the smaller RUT240 when space is tight. A WWAN module sits on the vendor's roadmap without a date, so do not plan around it. The RevPi sees an ordinary Ethernet gateway, so the MQTT flow is unchanged: set the router's SIM and APN parameters per the carrier, and keep the PLC-side port off the router's LAN so the machine network never touches the cellular side.
End-to-end check: run the pump test on cellular alone, cut the link for several minutes, restore it, and confirm the buffered samples drain without gaps while the PLC values and the ten analog values arrive at Azure with correct timestamps.
Questions asked
Which port does the MQTT publish use toward Azure?
MQTT over TLS uses port 8883 by default. When the site firewall passes only 443, the publish still works if the client sends the ALPN extension naming MQTT during the TLS handshake; without that extension the broker refuses the connection. Take whichever port the network team has opened and set it in the MQTT out node's broker configuration before the first end-to-end test.
How much storage does local buffering need during an uplink outage?
Size it from your own payload. For example, one 200-byte JSON message per second is 200 x 86,400 = 17,280,000 bytes, about 17.3 MB per day, so a week-long outage holds about 121 MB until the link returns and the queue drains. Measure the payload with your real tags before trusting that figure.
Does Profibus still fit anywhere in this design?
Only beside a legacy machine network. The modular fieldbus gateway for the RevPi comes in a Profinet or a Profibus version, and the choice follows the plant environment, not the gateway. An S7-1500 carries a Profinet interface as standard, so a new pump test bench takes the Profinet version if it takes a fieldbus module at all; Profibus earns its slot only next to older controllers.
Can one RevPi Connect serve both projects, or do I need two units?
One unit covers both when the pump bench and the analog station share a cabinet and an owner: the base unit's Ethernet ports already serve the PLC network and the uplink, and the analog side needs at most three modules, which leaves two extension slots free for growth or a fieldbus gateway. Specify two units when the stations sit in different locations, belong to different teams, or must not share a failure domain.