Skip to content

Is it possible to set the high bit in front or the low bit #143

@TorchZhu

Description

@TorchZhu
        var unitIdentifier = 0x01; // 0x00 and 0xFF are the defaults for TCP/IP-only Modbus devices.
        var startingAddress = 8000;
        var count = 20;     
        var client = new ModbusTcpClient();
        client.Connect(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 502));
        var shortData00 = client.ReadHoldingRegisters<ushort>(unitIdentifier, startingAddress, count);

The readings do not match the true readings.
Read 30 as 7680 / "00 1E" as "1E 00"

Is it possible to set the high bit in front or the low bit?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions