The FairCom Modbus connector service allows reading and writing data tags to and from industrial devices, such as PLCs, that use the Modbus communication protocol. Once the FairCom server collects data from a Modbus device, it automatically stores it for later use in analytics, forward the data to dashboards or other devices, or transform the data into a format compatible with devices that use a different protocol. This functionality turns raw data into a powerful asset that data scientists and engineers can use for a wide range of sophisticated applications that move beyond basic monitoring.
Note A tag is a named data point. For example, a tag named temperature represents the location in a device where the temperature value can be collected from or delivered to. FairCom Edge also associates each tag with an integration table. When a data point is collected, FairCom Edge stores the tag in a newly inserted, timestamped record in the table. A tag is always stored in the record as a JSON property in the source_payload field, such as
"temperature": 70. The FairCom server automatically delivers the contents of the source_payload field as an MQTT message to the table's MQTT topic. Additionally, the tag may be optionally stored as a field in the table, such a field named temperature. This is useful for engineers who run SQL queries on the collected data for analytics.
Delivering data to Modbus devices
Upon collection, FairCom Edge can instantly deliver the processed data to multiple destinations, such as publishing MQTT messages to various topics, sending data to REST endpoints, writing to other devices, or delivering to cloud platforms.
Because FairCom's Modbus connector can write to devices, you can use any FairCom connector to write to an Modbus device.
- You can use SQL or FairCom's JSON DB API to insert a record into a table connected to an Modbus device and that data will be written to the device. This enables data scientists and software to write enriched data back to devices to improve processes, change recipes, provide guidance to operators, troubleshoot issues, etc.
- You can take messages sent to an MQTT topic, transform them, and write their data to an Modbus device. This empowers you to automate a factory by sending MQTT commands to devices.
- You can OPC UA, Modbus, EtherNet/IP, MTConnect, and so forth, to collect data from a device, transform the data, and write it into a table that immediately sends the data to an Modbus device where it can change a recipe, alter recipe parameters, change configuration, etc.
Sampling of devices that support Modbus
FairCom Edge integrates with devices that support the Modbus protocol, including devices from the companies in the following table.
| Type of Device | Sample Companies with Modbus Devices |
|---|---|
| PLCs | Allen-Bradley, AutomationDirect, Delta, Mitsubishi, Motors, Omron, Rockwell Automation, Schneider Electric, Raspberry Pi, Siemens, etc. |
| Actuators | Badger Meter, Belimo, Emerson AVENTICS, Flowserve Limitorque, LINAK, Novanta IMS, Parker Hannifin Exlar, Rotork, Valworx, WITTENSTEIN, etc. |
| Energy Storage Systems | BMZ Group, GoodWe, Eaton, Hitachi Energy, Huawei, SMA Solar, Victron Energy, etc. |
| HMIs | AutomationDirect C-More, Maple Systems, Weintek, Unitronics, Red Lion, EZAutomation EZTouch, Pro-face, Schneider Electric Magelis, ICP DAS, Veichi, etc. |
| Power Inverters | GoodWe, Huawei, OutBack Power, SMA Solar, Victron Energy, etc. |
| Power Meters | Accuenergy Acuvim series, Eaton Power Xpert Meter, E-Mon D-Mon PowerSmart series, Schneider Electric PowerLogic, Siemens SENTRON series, Socomec DIRIS series, etc. |
| Temperature Sensors | DataNab MBus, InfraSensing, ControlByWeb, EBYTE, etc. |
| Pressure Sensors | ANDIVI, Rheonics DV, SensorsONE, S+S Regeltechnik PREMASGARD, etc. |
| Flow Sensors | AW-Lake Edge, Turbines Inc., Ubidots, etc. |
| Vibration Sensors | Broadsens SVT, Erbessd Phantom, Ubidots, etc. |
| Ultrasonic Sensors | APG LOE-7126, TrenaTech MNU, etc. |
| Valves | Badger Meter, Belimo, Bürkert, Flowserve Limitorque, Rotork, SMC Corporation, Valworx, etc. |
| VFDs | ABB, AutomationDirect, Control Techniques, Danfoss/Vacon, KEB America, Lenze, Schneider Electric Altivar series, SEW-EURODRIVE, Toshiba, Yaskawa, etc. |
Use Modbus to convert collected integers to floating point numbers
Modbus devices prefer to store integer numbers in their registers, but a machine often needs to deliver floating point numbers to the customer. Modbus devices typically use one of four techniques to represent a floating point number:
- Store an integer number in a register and let the customer divide it by a number, such as
7014divided by100to create70.14. - Store two integer numbers in two registers, such as
70and14, and let the customer append them to create70.14. - Same as #2 but the registers are in reverse order.
- Store the bytes of an IEEE Floating point number in multiple registers, and let the customer combine them, such as
0x428C47AErepresenting70.14.
FairCom's Modbus connector supports all four techniques when it collects data from registers and converts it into JSON numbers.
Dividing collected integers
The machine stores an integer number in a register and requires the customer to divide it by a number, such as 10, 100, or 1000, to create a floating-point number.
- FairCom's Modbus connector uses the following JSON configuration to convert the integer value
7014in register address2000into70.14.

{
"propertyPath": "temperature",
"modbusDataAddress": 2000,
"modbusDataAccess": "holdingregister",
"modbusUnitId": 5,
"modbusDataLen": 1,
"modbusRegisterType": "int16SignedAB",
"modbusConvertToFloat": "divideByInteger",
"modbusDivisor": 100
}
- To configure the Modbus connector to convert an integer into a floating point number, add the
"modbusConvertToFloat": "divideByInteger"and"modbusDivisor": 100settings to the configuration. You can set"modbusDivisor"to10,100,1000,10000, or another integer number. The connector reads the value of the Modbus register, divides it by the integer number in the"modbusDivisor"property, and stores the result at the"propertyPath"location in the JSON document it generates.
Storing two separate integers
The machine stores two integer numbers in two registers to represent one floating point number.
- FairCom's Modbus connector uses the following JSON configuration to convert the integer value
70in the specified register and14in the next register into70.14. FairCom's Modbus connector always considers the decimal number as positive. So, if the value read is-14, for example, it will be converted to14.

{
"propertyPath": "temperature",
"modbusDataAddress": 2000,
"modbusDataAccess": "holdingregister",
"modbusUnitId": 5,
"modbusDataLen": 1,
"modbusRegisterType": "int16SignedAB",
"modbusDecimalDigits":2,
"modbusConvertToFloat": "appendAdjacentRegisters"
},
- To configure the Modbus connector to convert integers in successive registers into a floating point number, add the
"modbusConvertToFloat": "appendAdjacentRegisters "setting to the configuration. The connector reads the value of the specified Modbus register and the next register and appends them with a decimal point between them. It stores the result at the"propertyPath"location in the JSON document it generates. - If you are using this configuration with a createOutput command, it is necessary to change
"modbusDecimalDigits"to properly convert the float number to two integers. The default value is2.
Storing two separate integers in reverse order
Store two integer numbers in two registers to represent one floating point number, but the fractional part is in the first register.
- FairCom's Modbus connector uses the following JSON configuration to convert the integer value
14in the specified register and70in the next register into70.14.

{
"propertyPath": "temperature",
"modbusDataAddress": 2000,
"modbusDataAccess": "holdingregister",
"modbusUnitId": 5,
"modbusDataLen": 1,
"modbusRegisterType": "int16SignedAB",
"modbusDecimalDigits":2,
"modbusConvertToFloat": "appendAdjacentRegistersReversed"
},
- To configure the Modbus connector to convert integers in successive registers into a floating point number, add the
"modbusConvertToFloat": "appendAdjacentRegisters"setting to the configuration. The connector reads the value of the specified Modbus register and the next register and appends them with a decimal point between them. It stores the result at the"propertyPath"location in the JSON document it generates. - If you are using this configuration with a createOutput command, it is necessary to change
"modbusDecimalDigits"to properly convert the float number to two integers. The default value is2.
Storing the bytes of an IEEE floating point number
Store the bytes of an IEEE Floating point number in multiple registers.
- FairCom's Modbus connector uses the following JSON configuration to convert the IEEE bytes stored in two registers. For example, the first two bytes,
0x428C, can be stored in register2000, and the bytes0x47AEcan be stored in register2001. The connector reads the bytes in both registers, combines them into four bytes, and treats them as an IEEE floating point number representing70.14.

{
"propertyPath": "temperature",
"modbusDataAddress": 2000,
"modbusDataAccess": "holdingregister",
"modbusUnitId": 5,
"modbusDataLen": 2,
"modbusRegisterType": "ieeefloat32ABCD"
},
- To configure the Modbus connector to convert the bytes of an IEEE floating point number in successive registers into a floating point number, add the
"modbusRegisterType": "ieeefloat32ABCD"setting to the configuration. You can assign any of the following values to"modbusRegisterType"to specify different byte orders and sizes of IEEE floating point numbers:
"ieeeFloat32ABCD" |
"ieeeFloat32CDAB" |
"ieeeFloat32DCBA" |
"ieeeFloat32BADC" |
"ieeeFloat64ABCDEFGH" |
"ieeeFloat64BADCFEHG" |
"ieeeFloat64CDABGHEF" |
"ieeeFloat64DCBAHGFE" |
"ieeeFloat64HGFEDCBA" |
"ieeeFloat64GHEFCDAB" |
"ieeeFloat64FEHGBADC" |
"ieeeFloat64EFGHABCD" |