Modbus

The Modbus runtime component is responsible for interfacing between modbus and DDS. It handles data flow both ways and over both serial and ethernet. There are four distinct modes of this component, named after the modbus side of this compopnent: Serial client, serial server, Tcp/ip client, Tcp/ip server. They all have the following fields in common:

  • Options:
    • PeriodMs: The update period in milliseconds.
  • ModbusSetup: ..
    • Type: Type of client or server. Can be SerialClient, SerialServer, TcpClient, or TcpServer
    • Port: Typically COM-port for serial components, and network ports for TCP/IP components
  • ModbusRead: List of signals to read from modbus to DDS.
  • ModbusWrite: List of signals to write from DDS to modbus.

Both the Serial-components have the following additional fields:

  • ModbusSetup: ..
    • Baud: The rate of transmition in bits per second. Possible rates are 1200, 2400, 4800, 9600, 19200.
    • Parity: Parity bit for checking of bit errors. Possible parity: N (None), E (even), O (odd), ...
    • Databit: Number of data bits in each frame.
    • Stopbit: Number of stop bits in each frame.
    • SlaveId: Id of the client-device.

Including the above, the components have the following additional fields:

  • Serial server
    • ModbusSetup: ..
      • UpdateIntervalMs: ..
      • Invalidserver: ..
  • Tcp/ip client
    • ModbusSetup: ..
      • Ip: IP-address of the client
      • SlaveId: Id of the client-device.
      • MaxReadBufferAgeMs: ..
      • ReadRegister: ..
  • Tcp/ip server
    • ModbusSetup: ..
      • MaxNumConnections: Maximal number of connections to the server.
Note
The modbus component is being updated: Not all fields are explained here. Check example files below for more detail.
Todo:
Add documentation for the new modbus component.

An example serial client yaml input file is found here: modbus_sc.yml.

An example serial server yaml input file is found here: modbus_ss.yml.

An example tcp/ip client yaml input file is found here: modbus_tc.yml.

An example tcp/ip server yaml input file is found here: modbus_ts.yml.