How to use real time input from workspace in Simulink
3 ビュー (過去 30 日間)
古いコメントを表示
I want to use Simmechanics to visualize the motion of a complex mechanical system with various joints. I want to use external input to drive some of the joints and be able to view the motion that the system will have in real-time. The input for my model is made by a separate system and written in a specific file format which I cannot change.
I need to import the data in my workspace and then stream it to the simmechanics model.
As a test case, I made a simple model. To start, I want to be able to just type in a number in the workspace; in this case an angle of one of the joints; and view the motion in the simmechanics model. So when I type simin = 45, a bar will move to an angle of 45 degrees. I'm not using any timesteps or time vectors or similar. It just needs to update to the latest value. To simulation needs to run infinitely an when the data in the workspace is updated, use that data.
Which function do I need to use to get real-time data from the workspace into Simulink? Simin only seems to take a time based vector, with pre-determined inputs.
1 件のコメント
回答 (1 件)
tq yu
2019 年 5 月 15 日
hi ,there ,have you solved the problem?I just encounter the similar issue .Below is the similar QS by onther ,wish to help you.
https://stackoverflow.com/questions/37180724/run-a-continuous-simulink-model-with-real-time-input
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!