Effacer les filtres
Effacer les filtres

Problem reading Modbus/TCP with Instrument Control Toolbox

11 vues (au cours des 30 derniers jours)
Jose
Jose le 15 Juin 2018
Modifié(e) : Jose le 15 Juin 2018
I am trying to read a Victron Energy photovoltaic system from Modbus/TCP (see the mapping example here) by means of the Instrument Control Toolbox. First, I created the object by means of this command:
>>m = modbus('tcpip', '192.168.XXX.50', 502)
and it seems to respond correctly because the answer is:
m =
Modbus TCPIP with properties:
DeviceAddress: '192.168.XXX.50'
Port: 502
Status: 'open'
NumRetries: 1
Timeout: 10 (seconds)
ByteOrder: 'big-endian'
WordOrder: 'big-endian'
Then, I try to read a register through the command read(m,target,address,count, serverId):
>> read(m,'holdingregs',3,1,246)
And I found the following error:
The Modbus server returned an invalid address error. Address + count is out of range.
How can I solve this problem?

Réponses (0)

Catégories

En savoir plus sur Modbus Communication dans Help Center et File Exchange

Produits


Version

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by