필터 지우기
필터 지우기

Real Time data into Simulink

조회 수: 8 (최근 30일)
Julius Hoffmann
Julius Hoffmann 2019년 4월 23일
댓글: Julius Hoffmann 2019년 5월 28일
Hi,
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
Ben Cunningham 2019년 4월 23일
편집: Ben Cunningham 2019년 4월 23일
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.
  댓글 수: 1
Julius Hoffmann
Julius Hoffmann 2019년 5월 28일
It worked with a Matlab Level-2-Function by repeating the interface.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by