# Omron FINS to MQTT

> PLCGateway reads Omron CJ, CS, CP, NJ and NX controllers with FINS over Ethernet and publishes DM, CIO, work and holding areas to your MQTT broker.

FINS is built into Omron controllers and their Ethernet units, so reading them needs no change to the program. PLCGateway connects with FINS/UDP or FINS/TCP on port 9600, reads the memory areas you list and publishes every tag as an MQTT topic.

Consecutive words are merged into single read requests, 32-bit values use Omron's word order, and BCD values are converted. Subscribers receive plain numbers with a quality and a timestamp.

- **Source:** [Omron FINS](https://plcgateway.com/protocols/omron-fins.md) (`fins_udp`, `fins_tcp`)
- **Connection:** FINS/UDP · FINS/TCP · port 9600
- **Target:** [MQTT](https://plcgateway.com/integrations.md)
- **Writing:** yes
- **Included in:** PLCGateway Connect, PLCGateway SCADA, PLCGateway Embedded

## Set it up in five steps

1. Give the controller (or its Ethernet unit) an IP address and FINS node number in CX-Programmer or Sysmac Studio.
2. Add a FINS/UDP or FINS/TCP device with the IP address; for NJ/NX map the variables to read to a memory area with an AT address.
3. Create the tags or import them from CSV and test the connection.
4. Open Gateway → MQTT, enter the broker address, port and login, switch on TLS if the broker requires it, and choose the base topic.
5. Choose publishing on change or at an interval and the JSON or plain-value format, then check the topics with mosquitto_sub or in your platform.

## Example: topics and payloads

A device with the id packer1 and these tags is published as shown below; the lines are what mosquitto_sub -v prints. Names and values are examples.

| Tag | Address | Example value |
|---|---|---|
| `Speed` | `D102` | 64 1/min |
| `Ready` | `D100.5` | true |
| `HopperLevel` | `H5` | 73 % |

**MQTT topics and payloads**

```
plcgateway/status online
plcgateway/packer1/Speed {"q":"GOOD","t":1794465246839,"u":"1/min","v":64}
plcgateway/packer1/Ready {"q":"GOOD","t":1794465246839,"v":true}
plcgateway/packer1/HopperLevel {"q":"GOOD","t":1794465246839,"u":"%","v":73}
```

Topic: base topic / device id / tag name. The JSON payload carries the value (v), the quality (q), the timestamp in milliseconds (t) and the unit (u).

## The MQTT publisher in PLCGateway

PLCGateway publishes every tag to your MQTT broker – Mosquitto, EMQX, HiveMQ, AWS IoT Core or a cloud platform behind a bridge – so IT systems subscribe to topics instead of polling the controller. It speaks MQTT 3.1.1 over TCP or TLS, with user name and password.

Values are sent when they change or at a fixed interval, as JSON with quality and timestamp or as the bare value. A retained status topic with a last will tells subscribers whether the gateway is online.

- One topic per tag: base topic / device / tag, with a base topic of your choice
- QoS 0 or 1, retained messages, birth message and last will
- Optional writing: a value published to the tag's /set topic is written to the controller
- Messages are queued while the broker is unreachable and sent after the reconnect

![MQTT publisher settings: broker, TLS, base topic, publish mode and payload format](https://plcgateway.com/assets/img/shots/mqtt-1400.webp)

## Controllers and devices

- [Omron FINS](https://plcgateway.com/protocols/omron-fins.md)
- [Omron SYSMAC](https://plcgateway.com/controllers/omron.md)

## Questions and answers

### Does it work with NJ and NX controllers?

Yes, for variables that have an AT address in a memory area such as D or CIO. Controllers with an OPC UA server can be read through PLCGateway's OPC UA client instead.

### FINS/UDP or FINS/TCP?

Both work. FINS/TCP obtains the node address automatically in the handshake; FINS/UDP needs the node numbers but is the classic choice in a machine network.

### Can values be written from MQTT?

Yes. When writing is enabled in the MQTT settings, a value sent to the tag's /set topic is written to the PLC memory.

## Related solutions

- [Omron FINS to OPC UA](https://plcgateway.com/solutions/omron-fins-to-opc-ua.md)
- [Modbus to MQTT](https://plcgateway.com/solutions/modbus-to-mqtt.md)
- [Mitsubishi MC protocol to MQTT](https://plcgateway.com/solutions/mitsubishi-mc-to-mqtt.md)
- [FANUC FOCAS to MQTT](https://plcgateway.com/solutions/fanuc-focas-to-mqtt.md)
- [Haas CNC to MQTT](https://plcgateway.com/solutions/haas-to-mqtt.md)
- [MTConnect to MQTT](https://plcgateway.com/solutions/mtconnect-to-mqtt.md)
- [All protocols](https://plcgateway.com/protocols.md)

_Product and model names are trademarks of their owners. They are named only to show which equipment the drivers communicate with; PLCGateway is not affiliated with these companies._

---
Source: https://plcgateway.com/solutions/omron-fins-to-mqtt
