Update modbus readme

This commit is contained in:
Daniel Nelson 2020-04-21 11:27:35 -07:00
parent c7797cc3c4
commit d1f109b316
No known key found for this signature in database
GPG Key ID: CAAD59C9444F6155
2 changed files with 144 additions and 141 deletions

View File

@ -1,10 +1,12 @@
# Telegraf Input Plugin: Modbus
# Modbus Input Plugin
The Modbus plugin collects Discrete Inputs, Coils, Input Registers and Holding Registers via Modbus TCP or Modbus RTU/ASCII
The Modbus plugin collects Discrete Inputs, Coils, Input Registers and Holding
Registers via Modbus TCP or Modbus RTU/ASCII.
### Configuration:
### Configuration
```toml
[[inputs.modbus]]
## Connection Configuration
##
## The module supports connections to PLCs via MODBUS/TCP or
@ -22,22 +24,19 @@ The Modbus plugin collects Discrete Inputs, Coils, Input Registers and Holding R
## Maximum number of retries and the time to wait between retries
## when a slave-device is busy.
## NOTE: Please make sure that the overall retry time (#retries * wait time)
## is always smaller than the query interval as otherwise you will get
## an "did not complete within its interval" warning.
#busy_retries = 0
#busy_retries_wait = "100ms"
# busy_retries = 0
# busy_retries_wait = "100ms"
# TCP - connect via Modbus/TCP
controller = "tcp://localhost:502"
# Serial (RS485; RS232)
#controller = "file:///dev/ttyUSB0"
#baud_rate = 9600
#data_bits = 8
#parity = "N"
#stop_bits = 1
#transmission_mode = "RTU"
## Serial (RS485; RS232)
# controller = "file:///dev/ttyUSB0"
# baud_rate = 9600
# data_bits = 8
# parity = "N"
# stop_bits = 1
# transmission_mode = "RTU"
## Measurements
@ -85,7 +84,14 @@ The Modbus plugin collects Discrete Inputs, Coils, Input Registers and Holding R
{ name = "Pump1-Speed", byte_order = "ABCD", data_type = "INT32", scale=1.0, address = [3,4]},
]
```
### Example Output:
### Metrics
Metric are custom and configured using the `discrete_inputs`, `coils`,
`holding_register` and `input_registers` options.
### Example Output
```
$ ./telegraf -config telegraf.conf -input-filter modbus -test

View File

@ -89,22 +89,19 @@ const sampleConfig = `
## Maximum number of retries and the time to wait between retries
## when a slave-device is busy.
## NOTE: Please make sure that the overall retry time (#retries * wait time)
## is always smaller than the query interval as otherwise you will get
## an "did not complete within its interval" warning.
#busy_retries = 0
#busy_retries_wait = "100ms"
# busy_retries = 0
# busy_retries_wait = "100ms"
# TCP - connect via Modbus/TCP
controller = "tcp://localhost:502"
# Serial (RS485; RS232)
#controller = "file:///dev/ttyUSB0"
#baud_rate = 9600
#data_bits = 8
#parity = "N"
#stop_bits = 1
#transmission_mode = "RTU"
## Serial (RS485; RS232)
# controller = "file:///dev/ttyUSB0"
# baud_rate = 9600
# data_bits = 8
# parity = "N"
# stop_bits = 1
# transmission_mode = "RTU"
## Measurements