Effacer les filtres
Effacer les filtres

Get continuously updated data from matlab workspace into simulink.

4 vues (au cours des 30 derniers jours)
Omkar Tulankar
Omkar Tulankar le 18 Sep 2021
Réponse apportée : Jonas le 29 Sep 2021
Hi ,
MATLAB Version: 9.9.0.1524771 (R2020b) Update 2
MATLAB License Number: 40761481
Operating System: Microsoft Windows 10 Pro Version 10.0 (Build 19041)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
I am using OPC UA server communication for extracting data from allenbradley PLC and develop a model in simulink based on the extracted data.
For that I have written down code in matlab script for reading data .
I want to get this continously changing data from matlab script into simulink.
I tried using interpreted matlab function, callbck function , from workspace block , signal from workspace block , but all this things are not working or guess I am missing out somewhere.
To conclude with , I want is when I run my simulink model matlab script should run and continously updated data should be available for me in simulink.
Please suggest some solution for this.
Thanks
  2 commentaires
Omkar Tulankar
Omkar Tulankar le 28 Sep 2021
Any updates on this ?
Sree Venkedesh
Sree Venkedesh le 29 Sep 2021
Hi Omkar ,
To receive the data , on the data change event , then you may need to turn on the subscription property . For more information see this MATLAB documentation :Data Change Events and Subscription - MATLAB & Simulink (mathworks.com).
To run MATLAB script in Simulink , you can use MATLAB function block.

Connectez-vous pour commenter.

Réponses (1)

Jonas
Jonas le 29 Sep 2021

Community Treasure Hunt

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

Start Hunting!

Translated by