Skip to content

RTU over TCP error: response data size '5' does not match count '4' #52

@branimirborisov

Description

@branimirborisov

I'm trying to read a RTU device routed over TCP using both the library (via InfluxDB Telegraf) and the modbus-cli tool. In both cases trying to read the device results in the following error:

modbus: response data size '5' does not match count '4'

Cli command is:

./modbus-cli.amd64 -address tcp://{HOST}:{PORT} -register 40807 -quantity 2 -slaveID 1

When switching to RTUoverTCP I get the following timeout error:

read tcp 172.24.0.3:52840->{HOST}:{PORT}: i/o timeout

Device is SIEMENS SICAM P with Modbus RTU translated over TCP.

Note: When using another tool, for example modpoll register value is parsed correctly, e.g.:

modpoll -p ${MODBUS_PORT} -a 1 -f -t 4:float -r 40807 ${MODBUS_HOST} 

results in:

[40807]: 213209248.000000
...

Is there some additional parameter I'm missing that needs to be specified to parse correctly the value or is it some issue with the library implementation and the device compatibility?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions