Skip to content

[Bug]: The results returned by Modbus RTU read operations are always byte arrays #2120

Open
@Joooooooooooooooooooooooooooooooooooker

Description

What happened?

I am currently using the latest 0.13.0-snapshot for Modbus protocol testing. When using Modbus TCP, everything works as expected: the data type written matches the data type returned by the read operation. However, when using Modbus RTU, the write operation works normally, but the read operation always returns a byte array. For example:

Write: builder.addTagAddress("tag5", "400005:SINT", new PlcSINT(5))
Read: builder.addTagAddress("tag5", "400005:SINT")
Result: Value[tag5]: [0, 5]

Write: builder.addTagAddress("tag41", "400053:LINT", new PlcLINT(38))
Read: builder.addTagAddress("tag41", "400053:LINT")
Result: Value[tag41]: [0,0,0,0,0,0,0,38]

Version

0.13.0-SNAPSHOT

Programming Languages

  • plc4c
  • plc4go
  • plc4j
  • plc4net
  • plc4py

Protocols

  • AB-Ethernet
  • ADS /AMS
  • BACnet/IP
  • C-Bus
  • CANopen
  • EtherNet/IP
  • Firmata
  • IEC-69870
  • KNXnet/IP
  • Modbus
  • OPC-UA
  • Profinet
  • S7
  • S7-light

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions