Skip to content

[BUG] ModbusTCP 16bit register write - bad function code #1175

@AllmarkPL

Description

@AllmarkPL

Hello,
I'd run into an issue where I can't write values into single 16bit register of modbus device. I have created a single tag with INT16 datatype and proper device addressing, but when I tried to write data into it nothing happended. Quick look into modbus logs has shown that function 16 (multiple registers) is used instead of 06 (single registers) and communication is interrupted due to "bad lenght 8 (expected more than 8)". When I switched Fuxa tag datatype to INT32 all started working, but I can't leave it that way, because device I'm using have 6 consecutive 16bit registers which I got to use... Is there a way to properly send single 16bit register by modbus TCP in Fuxa? I don't think it's issue with the device itself, because I can write data into it using simulator or HMI.

To Reproduce

  1. Create a modbus TCP IP device with single INT16 tag
  2. Try to write any value either due to script action or by input.

Expected behavior
I think it may be a bug in modbus tcp plugin.

Environment

  • FUXA Version 1.1.19-1524
  • latest docker container
  • Platform/OS: Server: Ubuntu; Client: WIN11
  • Browser: Chrome 123.0.6312.86

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions