Is it possible to use MATLAB on slave computer/device for communication to host computer via serial MODBUS (RTU)
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Raimundas Steponavicius
am 3 Mär. 2017
Kommentiert: Raimundas Steponavicius
am 11 Feb. 2021
Can I communicate with the host/master via serial port (MODBUS ASCII/RTU) using MATLAB on the slave computer, i.e. I need to wait for a request from the host/master, receive it when it comes and send back the requested data to the host. I found how this can implemented for MODBUS TCP/IP, but I did not find how to implement that for MODBUS ASCII/RTU (RS232, RS485). All MATLAB functions for serial port communication seem to be for the case when the code runs on the host computer. My MATLAB code runs on the slave device (processor/computer which controls the analytical instrument) and I need it to send the data when requested to the host (SCADA).
2 Kommentare
Bambos
am 1 Mär. 2019
Hello Raimundas,
I'm searching all the posts of modbus lately because i work more intense on this subject.
I tend to agree with you. Seems that modbus library is only for modbus Master operations on RTU. For example read registers from other slaves using the RTU style , with no documentation on "Acting" like a modbus slave on RTU and hold a register value.
Also on Modbus TCP, the normal operation is modbus TCP Client, since you can acquire values from modbus TCP Servers, and there is no documentation for holding a register value and "Acting" as a modbus TCP Server.
If i don't find a solution to that, most propably i will go wity Matlab and Python module. Seems that they develop much better libraries for modbus. Good luck.
Antworten (0)
Siehe auch
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!