Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Capacity Modbus RTU Server

Capacity Modbus RTU Server 2 weeks 4 days ago #10457

  • SS48
  • SS48's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
  • Karma: 0
How many registers can be created on Modbus RTU Server? And how much can you create Units (slave)??
/Sergey
Last Edit: 2 weeks 3 days ago by SS48.
The administrator has disabled public write access.

Capacity Modbus RTU Server 2 weeks 2 days ago #10458

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 2706
  • Karma: 0
Hi Sergey,

The total size of the input channels are limited to 256 bytes, and also the size of the output channels are limited to 256 bytes. One register allocates 2 bytes and 8 coils/descrete inputs allocates 1 byte. So if you only use registers you can use 128 input registers and 128 output registers.

If I look in the code I can see no limitation of the number of units more than the fact that it's stored in an unsigned char that limits it to 256. I don't think though that we have ever used or tested it with more than one unit.

/Claes
The administrator has disabled public write access.

Capacity Modbus RTU Server 1 week 6 days ago #10465

  • SS48
  • SS48's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
  • Karma: 0
Thanks, Claes!

If Modbus_RTU_Server contains several slaves - Modbus_RTU_ServerModule (eg UnitId=1 and UnitId=2), the sum of all the registers should not exceed 256 bytes (128Reg type int16)? Or can each slave have up to 128 registers??
(I'm not very strong with source code)
It would be nice to organize a server with several units, where each unit could have a Input and Output area of 256 bytes.

In my example, the Modbus_RTU_Server works well, where UnitId=1 contains 40Reg (int16) and UnitId=2 contains 44Reg (43-int16, 1-float32)

But when UnitId=1 contains 64Reg (32-float32, 32-int16) and UnitId=2 contains 40Reg (float32) - this does not work! (oversize buffer)

Thanks again for the help, Claes

/Sergey
The administrator has disabled public write access.

Capacity Modbus RTU Server 1 week 2 days ago #10473

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 2706
  • Karma: 0
Hi Sergey,

As you might have guessed, the limitation of 256 is for all slaves together. There was the same limitation in the Modbus TCP server, but this was changed so it's now unlimited. Modbus RTU though hasn't been chaged yet...

/Claes
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 1.943 seconds