Read 4x registers

23 views
Skip to first unread message

William MARTIN

unread,
Sep 16, 2015, 5:57:37 AM9/16/15
to libmodbus
Hi,

I want to use the libmodbus to read register with high address, like 0x40211.
How to do that ?

This is the function 23 (17Hex) Read/Write 4X Registers in the official documentation of modbus.

Best regards,
William

Torello Querci

unread,
Sep 16, 2015, 6:18:03 AM9/16/15
to libm...@googlegroups.com
Are you sure about register address?
In my personal experience high address indicate command 04 (read input register) for register 211.


--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "libmodbus".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse libmodbus+...@googlegroups.com.
Pour obtenir davantage d'options, consultez la page https://groups.google.com/d/optout.

Olivier Barthelemy

unread,
Sep 16, 2015, 7:06:15 AM9/16/15
to libm...@googlegroups.com
On some devices, what's displayed as adresses 40XXX is actually read by normal read function with adress XXX
--
Geovariances

Olivier BARTHELEMY Software development engineer
Geovariances, 49bis avenue Franklin Roosevelt - 77215 AVON CEDEX - FRANCE
| www.geovariances.com
Keep posted about Geovariances                  

Bodo Meissner

unread,
Sep 16, 2015, 7:50:03 AM9/16/15
to libm...@googlegroups.com
Zitat von William MARTIN <wys...@gmail.com>:

> I want to use the libmodbus to read register with high address, like
> 0x40211.
[...]
> This is the function 23 (17Hex) Read/Write 4X Registers in the official
> documentation of modbus.

Hello William,

see
http://libmodbus.org/docs/v3.1.2/modbus_write_and_read_registers.html
"The function uses the Modbus function code 0x17 (write/read registers)."

Bodo


William MARTIN

unread,
Sep 16, 2015, 7:52:21 AM9/16/15
to libm...@googlegroups.com
Many thanks,

I just need to ignore the 40 prefix and it's works fine.

--
Vous recevez ce message car vous êtes abonné à un sujet dans le groupe Google Groupes "libmodbus".
Pour vous désabonner de ce sujet, visitez le site https://groups.google.com/d/topic/libmodbus/jZZF9W2wbik/unsubscribe.
Pour vous désabonner de ce groupe et de tous ses sujets, envoyez un e-mail à l'adresse libmodbus+...@googlegroups.com.
Pour plus d'options, visitez le site https://groups.google.com/d/optout .



--
---------------------------------------------------------
William MARTIN
wysman @NoSpAm@ gmail @DoT@ com
Reply all
Reply to author
Forward
0 new messages