0
Отвечен

Размерность данных Modbus

Сергей Глушков 4 года назад в Редактор каналов обновлен СИМП Лайт (тех поддержка) 4 года назад 3

Имеется устройство с 32х разрядной адресацией регистров. При обращении к регистрам с адресами в пределах 16 разрядов данные нормально читаются. При обращении к данным в регистрах с адресами от 38500 до 56000 чтение не происходит или получаю данные не соответствующие запрашиваемым. Как организовать доступ к данным с 32х разрядными адресами.  

На рассмотрении

День добрый.

Уточните с каким устройством работаете? Если обратится к описанию протокола Modbus, то увидим что - доступ к элементам в каждой таблице осуществляется с помощью 16-битного адреса.

Контроллер DSE-7320 привожу выписку из его инструкции по Modbus

To use GENCOMM you will need to be familiar with the following principles, in addition to these items being supported by your modbus master system :

Modbus protocol

Half duplex, two wire twisted pair transmission lines

Hexadecimal and decimal conversion

Binary conversion and bit analysis

Signed and unsigned numbering

16 bit and 32 bit numbering

• ADDRESSING THE MODULE
DSE controllers support the full modbus address range (0-65535 decimal, 0000-FFFF
hexadecimal) therefore to address every register in the DSE module, the Modbus Master system
must also support this address range.
All DSE modbus registers are classified as Holding Registers. They can only be read using
modbus function code 3 (Read Multiple Registers).

• 40000 suffix
Some modbus masters use a suffix to the address as a way of specifying the function code to use
for the query.
For example 41,029 is used to instruct the master to query address 1029 using function code 3.
Some modbus masters also require you to add ‘1’ as previously described.
This means that in many cases the master can read only up to DSE register 9999 (49999 is last
register that will be read using function code 3).
These modbus masters are therefore limited and cannot read the full list of registers from the DSE
module.

Отвечен

День добрый.

16 bit and 32 bit numbering 

я полагаю это относится к типам данных (т.е. к примеру Int16 или Int32). 

• ADDRESSING THE MODULE
DSE controllers support the full modbus address range (0-65535 decimal, 0000-FFFF
hexadecimal) therefore to address every register in the DSE module, the Modbus Master system
must also support this address range.

0000-FFFF - адресация 16 битная. 

При обращении к данным в регистрах с адресами от 38500 до 56000 чтение не происходит или получаю данные не соответствующие запрашиваемым

Перепроверьте настройки драйвера, тип переменной, адрес и т.д. Попробуйте для теста настроить связь с данным контроллером используя любой сторонний модбас тестер, к примеру Modbus poll. 

Сервис поддержки клиентов работает на платформе UserEcho