Update modbus readme
This commit is contained in:
parent
c7797cc3c4
commit
d1f109b316
|
@ -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
|
```toml
|
||||||
|
[[inputs.modbus]]
|
||||||
## Connection Configuration
|
## Connection Configuration
|
||||||
##
|
##
|
||||||
## The module supports connections to PLCs via MODBUS/TCP or
|
## 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
|
## Maximum number of retries and the time to wait between retries
|
||||||
## when a slave-device is busy.
|
## when a slave-device is busy.
|
||||||
## NOTE: Please make sure that the overall retry time (#retries * wait time)
|
# busy_retries = 0
|
||||||
## is always smaller than the query interval as otherwise you will get
|
# busy_retries_wait = "100ms"
|
||||||
## an "did not complete within its interval" warning.
|
|
||||||
#busy_retries = 0
|
|
||||||
#busy_retries_wait = "100ms"
|
|
||||||
|
|
||||||
# TCP - connect via Modbus/TCP
|
# TCP - connect via Modbus/TCP
|
||||||
controller = "tcp://localhost:502"
|
controller = "tcp://localhost:502"
|
||||||
|
|
||||||
# Serial (RS485; RS232)
|
## Serial (RS485; RS232)
|
||||||
#controller = "file:///dev/ttyUSB0"
|
# controller = "file:///dev/ttyUSB0"
|
||||||
#baud_rate = 9600
|
# baud_rate = 9600
|
||||||
#data_bits = 8
|
# data_bits = 8
|
||||||
#parity = "N"
|
# parity = "N"
|
||||||
#stop_bits = 1
|
# stop_bits = 1
|
||||||
#transmission_mode = "RTU"
|
# transmission_mode = "RTU"
|
||||||
|
|
||||||
|
|
||||||
## Measurements
|
## 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]},
|
{ 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
|
$ ./telegraf -config telegraf.conf -input-filter modbus -test
|
||||||
|
|
|
@ -89,22 +89,19 @@ const sampleConfig = `
|
||||||
|
|
||||||
## Maximum number of retries and the time to wait between retries
|
## Maximum number of retries and the time to wait between retries
|
||||||
## when a slave-device is busy.
|
## when a slave-device is busy.
|
||||||
## NOTE: Please make sure that the overall retry time (#retries * wait time)
|
# busy_retries = 0
|
||||||
## is always smaller than the query interval as otherwise you will get
|
# busy_retries_wait = "100ms"
|
||||||
## an "did not complete within its interval" warning.
|
|
||||||
#busy_retries = 0
|
|
||||||
#busy_retries_wait = "100ms"
|
|
||||||
|
|
||||||
# TCP - connect via Modbus/TCP
|
# TCP - connect via Modbus/TCP
|
||||||
controller = "tcp://localhost:502"
|
controller = "tcp://localhost:502"
|
||||||
|
|
||||||
# Serial (RS485; RS232)
|
## Serial (RS485; RS232)
|
||||||
#controller = "file:///dev/ttyUSB0"
|
# controller = "file:///dev/ttyUSB0"
|
||||||
#baud_rate = 9600
|
# baud_rate = 9600
|
||||||
#data_bits = 8
|
# data_bits = 8
|
||||||
#parity = "N"
|
# parity = "N"
|
||||||
#stop_bits = 1
|
# stop_bits = 1
|
||||||
#transmission_mode = "RTU"
|
# transmission_mode = "RTU"
|
||||||
|
|
||||||
|
|
||||||
## Measurements
|
## Measurements
|
||||||
|
|
Loading…
Reference in New Issue