modbus-outstation plugin exposes OpenFMB measurements as a Modbus server
for non-control OpenFMB profiles. It also maps Modbus write commands to OpenFMB
name: the name used in the logs to identify the communication session.
log-level: protocol log level to print to the logs
adapter: network adapter to use to establish a TCP connection (typically 0.0.0.0)
port: TCP port on which the outstation will be listening
unit-identifier: Modbus unit identifier of the outstation (aka address)
max-num-connections: maximum number of concurrent TCP connections to the server
Non-control profiles (reading, status, etc) are mapped to Modbus coils, discrete inputs, holding registers and input registers. When the message is received on the internal message bus, it updates the internal Modbus database. Then, masters polling the outstation read the updated values.
Each OpenFMB value can be mapped to multiple Modbus values.
OpenFMB Boolean values can be mapped to one or more coil and discrete input(s).
negate is set to
true, the OpenFMB value is negated before updating the
float values can be mapped to a Modbus holding
register or a Modbus input register. A scaling value can also be specified.
For 32-bit values, two indices are specified: one containing the two LSBs and the other containing the two MSBs.
OpenFMB enumerations can be mapped to multiple values in the Modbus database. For each variant, a coil or discrete input can be updated to a fixed value, or a holding register or input register can be updated to a fixed value.
A list of each enum variant is specified with the desired actions to perform.
Modbus write commands can be translated to OpenFMB control profile messages.
There are three actions that can be specified for each point:
update: simply updates the current profile
clean_and_update: clears the current message and updates the value
publish: updates the current message and sends it to the message bus
All the write targets are mapped to values in the internal database. Therefore, a read will report the last written value.
Boolean values in control profiles can be mapped from Modbus writes to coils. Optionally, the value can be negated.
Integer and floating point values can be mapped from one or more holding
register writes. If multiple writes are required, be sure to use
Otherwise, transient values will be published.
Register writes can be mapped to OpenFMB enums. A list of enumeration variants is provided with the source register value.
These are currently not supported.