Real Time data into Simulink
11 visualizaciones (últimos 30 días)
Julius Hoffmann el 23 de Abr. de 2019
I want to transfer data from a measuring instrument into Simulink. The problem is that I have no block in Simulink for the device, just a Matlab-Interface. I already made a script in Matlab which interacts with the interface and stores the data in variables or Time Series Objects. But I can't transfer these in real time into Simulink.
I tried to put them into the block 'From Workspace' and checked the data with a scope, but they were just able to perform the data after I finished measuring and the data was stored in a final variable.
Is there a block or an option to get real time data from a running Matlab script into Simulink (and to verify them with a scope or something equal)?
Thank you very much in advance
Ben Cunningham el 23 de Abr. de 2019
Editada: Ben Cunningham el 23 de Abr. de 2019
Have you tried the 'MATLAB Function' block?
You may be able to insert part of your script into the function (double click on the block) and this will execute on every Simulink time step. So if you can make the function capture and return a datasample then you can feed that into your Simulink design.