Skip to main content
Version: 2.3.x

Data Ingestion: Modbus Connections

Go to Modbus > Modbus Master to view all the Modbus TCP and RTU/ASCII devices. In addition to setting up Modbus TCP and Modbus RTU devices, you can also enable/disable Device Fail Event and Command Fail Event of the Modbus Master services here.

To add a Modbus TCP device, do the following:

  1. In the Modbus TCP section, select the TCP option.

  2. Click ADD DEVICE. a. Specify the Device Name. b. Enter the Slave IP address. c. Specify the Slave Port and Slave ID. d. Click NEXT. img

  3. Click + ADD COMMAND.

  4. Select or specify the function and the corresponding settings.

  5. Select the Tag Type.

  6. Click DONE.

  7. Click NEXT.

  8. Click DONE to save the settings. img

    img

    img

To configure a Modbus TCP interface, select the TCP option and then click img You can also specify Initial Delay, Maximum Retry, and Response Timeout (ms) values for the interface.

img

To add a Modbus RTU device, do the following:

  1. In the Modbus RTU/ASCII section, click on the COM (RTU) button.

  2. Click ADD DEVICE. a. Specify the Device Name and Slave ID. b. Click NEXT. img

  3. Click + ADD COMMAND.

  4. Select or specify the function and the corresponding settings.

  5. Click NEXT.

  6. Click DONE to save the settings. img

    img

    img

To configure Modbus RTU settings, select the RTU option and click img. You can also specify Initial Delay (ms), Maximum Retry, and Response Timeout (ms) values for the interface. To manually set the inter-frame delay and inter-character timeout, you can uncheck the items and specify a time (ms).

img

Note: The inter-frame delay and inter-character timeout settings are only available for Modbus RTU.

Modbus Log Level Setting

To set a level for Modbus logs, following the below commandline to set it.

$modbuscli log-level {command}

{command}:

  • show: get modbus current log level

  • set {level}: set modbus log level

The log level includs:

LevelSeverityDescription
[0]ALLincludes all level information
[1]TRACEfiner-grained informational events than the DEBUG, typically capturing the flow through the application
[2]DEBUGfin-grained informational events for debug
[3]INFOinformational events for the progress of the application
[4]WARNpotentially harmful situation (Default Level)
[5]ERRORerrors in the application, possibly recoverable
[6]FATALfatal errors to stop the application running
[7]OFFnot display anymore

Note that changing the log severity requests restart Modbus Master.

Modbus Status Check

To check the Modbus status, following the commands below.

$modbuscli status {connection}

{connection}:

  • serial: display the status of the Modbus master serial

  • tcp: display the status of the Modbus master tcp

Modbus Traffic Log

To see the Modbus traffic log, following the command below. You can specify a period of time for traffic monitoring.

$modbuscli traffic {time_seconds}

Last updated on 2022-10-13 by jamescw.kao