Modbus Function (MATLAB 2017a) in Standalone Matlab Version via Matlab Compiler doesn´t work.
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
ChrisCross
am 15 Mai 2017
Beantwortet: Ashwini Venkatappa
am 19 Mai 2017
The new modbus function in Matlab 2017a doesnt work in a standalone version generated via matlab compiler.
I worked on a GUI which displayed me some modbus writing and reading commands to a plc. In the Matlab environment everything works fine with no errors. If i generated a Standalone-Version via the app Application Compiler the modbus communication doesnt work. Is this problem known? Have anybody a bugfix or a workaround for that problem?
######################
Snippets:
m = modbus('tcpip','localhost',502); %generate a modbus communication
write(m,'holdingregs',100,test(1),'single'); %write a number to the holdingregister number 100
clear m %disconnect the communication
######################
Thanks
0 Kommentare
Akzeptierte Antwort
Ashwini Venkatappa
am 19 Mai 2017
There appears to be a bug in Instrument Control Toolbox R2017a in the way that the "modbus" function is implemented in such a way that the MATLAB Compiler dependency analysis will not be able to automatically include the required dependencies for the specific transport you are working with.
There is an externally published solution for this with a specific workaround.
https://www.mathworks.com/support/bugreports/1563922
0 Kommentare
Weitere 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!