How to read and write some registers of a client machine over ModBus TCP/IP on Simulink.

6 Ansichten (letzte 30 Tage)
Hi, my name is Daniel, and I’m trying to read and write some vales from some MODBUS TCP registers from a converter with simulink blocks.
I have achieved it using Matlab functions and with the "Interpreted Matlab function" block, through the write and read functions. But this works quite slow.
Is there a way where I can read and write to certain registers from simulink using MODBUS?
I have tried several Matlab blocks, but I am not able to read or write the desired registers (i.e. dir. 17000, 16856 ..)
Thank you very much in advance.
All the best.
Daniel

Antworten (1)

Shiva Kalyan Diwakaruni
Shiva Kalyan Diwakaruni am 6 Mai 2021
Hi,
In the Modbus TCP/IP Slave Read block, the slave device reads data from its registers. notify the slave to read data from a specific discrete input register, specify the discrete input register address in this parameter. For example, for the slave to read data from the discrete input register with the address 80, enter 80.
Dependencies
To enable this parameter, set Function to Read Discrete Input.
Check the paramter section in below links to know more
Hope it helps.

Kategorien

Mehr zu Modbus Communication finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by