Get Schneider Electric Modicon data to MQTT and the cloud.
If your Modicon M221, M241, M251, or M340 can serve Modbus, an AppBlocks gateway polls its registers, scales the values, and publishes them to any MQTT broker, an HTTP API, Azure IoT, or AppBlocks Cloud. The gateway is a separate device next to the controller, and its logic is a flowchart your whole team can read.
One mapping on the PLC, then the gateway does the rest.
A one-time Modbus mapping
You decide which values the PLC exposes as Modbus registers. Everything else in the program stays as it is.
Read-only unless you say so
The gateway only reads. If you choose to send setpoints back, limits are checked in the flow before anything reaches the PLC.
Secure on the way out
MQTT over TLS with QoS 0, 1, or 2, and HTTPS for API calls, so plant-side Modbus never leaves the plant.
Two steps from register map to broker.
The flow uses real block names. Open the Designer and you’ll find each one in the palette.
Step 1: Serve Modbus from the Schneider Modicon controller
Modbus was created by Modicon, and Schneider Electric’s Modicon controllers support it natively, over serial and, on Ethernet models, over Modbus TCP. In most cases you only check that Modbus is enabled on the port you’re using. The controller already answers requests for its memory words and bits.
You choose which memory words and bits the gateway reads, and map those addresses to the variables you want to publish.
- Modbus TCP on port 502, or RTU on RS-485
- Memory words read as holding registers, bits as coils
- Check your controller’s Modbus addressing in its manual
PLC address Modbus address Gateway variable %MW0 (tank level) 40001 tank_level %MW1 (pump state) 40002 pump_running %MW2 (line speed) 40003 line_speed
Step 2: Poll the registers and publish
A timer sends a Modbus Request. When the PLC answers, On Modbus Response scales the value and publishes it. If the PLC stops answering, On Modbus Timeout publishes a status topic, so your dashboard can tell zero from offline.
- Function codes 01–06, 15, and 16
- Fast tags every second, slow ones every minute
- Report by exception to save cellular data
Build your first gateway in an afternoon.
Schneider Electric Modicon and the other product names on this page are trademarks of their owners. AppBlocks is not affiliated with or endorsed by them.
Questions, answered.
Do I need to change the Modicon program?
Often not. Modicon controllers answer Modbus requests natively, so the gateway can read the addresses you pick. You only change the program if you want to write setpoints into new addresses.
Does this work with Schneider drives and meters too?
Many Schneider drives and meters speak Modbus RTU, so the same gateway can poll them on the same RS-485 bus as the controller. Check each device’s register map.
Is Modbus TCP secure?
Modbus has no authentication or encryption of its own, so keep the PLC-to-gateway link on the plant network. The gateway then publishes outward over MQTT with TLS or over HTTPS.
What hardware do I use for the gateway?
A Tibbo Project System device with an Ethernet port and an RS-485 module is the usual choice, in a DIN-rail enclosure. Add a 4G LTE module for sites without a network. AppBlocks also runs on Zephyr boards such as the ESP32. Supported boards.
Ready to connect your first device?
Start free in your browser, follow the tutorials, or book a free one-on-one session. No board yet? We’ll demonstrate everything on ours.