Skip to content

Error while reading multiple holding registers on modbus input plugin #7227

@gianniforesi

Description

@gianniforesi

Relevant telegraf.conf:

holding_registers = [
	{ name = "MW0", byte_order = "AB", data_type = "UINT16", scale=1.0,  address = [0]},
	{ name = "MW1", byte_order = "AB", data_type = "UINT16", scale=1.0,  address = [1]},
	{ name = "MW2", byte_order = "AB", data_type = "UINT16", scale=1.0,  address = [2]},
	{ name = "MW3", byte_order = "AB", data_type = "UINT16", scale=1.0,  address = [3]},
... all registers up to the last one ...
	{ name = "MW345", byte_order = "AB", data_type = "UINT16", scale=1.0,  address = [345]},
	{ name = "MW346", byte_order = "AB", data_type = "UINT16", scale=1.0,  address = [346]},
 ]

Expected behavior:

I expect to read all register listed in the configuration file.

Actual behavior:

Error on telegraf log appears:
"quantity 346 must be between 1 and 125".

Additional info:

If I delete register 100, 200 and 300 from register list, plugin work correct and i can read the olding registers (except fo the ones deleted).

Metadata

Metadata

Assignees

Labels

area/modbusbugunexpected problem or unintended behavior

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions