Borrar filtros
Borrar filtros

How to use real time input from workspace in Simulink

2 visualizaciones (últimos 30 días)
Jorrit
Jorrit el 15 de Jun. de 2014
Comentada: tq yu el 15 de Mayo de 2019
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 comentario
tq yu
tq yu el 15 de Mayo de 2019
If you have solved it , please help me out . Thank you a lot

Iniciar sesión para comentar.

Respuestas (1)

tq yu
tq yu el 15 de Mayo de 2019
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

Categorías

Más información sobre Simulation en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by