• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 

How to get 400 value one time request with modbus

Started by truongbhh@gmail.com, December 27, 2018, 02:44:52 pm

Previous topic - Next topic

truongbhh@gmail.com

I test app connect with our device, use modbus and comport LIB
The request cmd: nrModbus1.ReadRegisters(100, 100, 1, true ); and use with nrModbus1ModbusReply, I received 100 value but when i use nrModbus1.ReadRegisters(100, 400, 1, true ); i received only 10 value
How to get 400 value per one time request?

Thank you a lots

Roman Novgorodov

Hello

At first view the problem in reply format of modbus protocol.
Reply has variable length and contains special field "Byte count".
It is 8-bit value (one byte field) and can contain unsigned integer in range 0..255.
The every returned register value is 16-bit and takes 2-bytes.
It seems like you can request 128 registers only in single read command.

Also please note that trial version of nrComm Lib has build-in limitation for size of receiving data.

Roman Novgorodov
DeepSoftware llc
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

truongbhh@gmail.com

Yes, thanks Mr Roman Novgorodov
I am trying with Pro verion downloaded from your site, file name nrcomm_pro951trial.exe
So, if i buy the profession version, i can read big  received data (more than 400 value),  Are you sure?

Thank

Roman Novgorodov

Hello

No.
You can request 127 registers only.
It is limitation of modbus reply.

Roman Novgorodov
DeepSoftware llc
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.