How to control Simmechanics motion from GUI?
조회 수: 3 (최근 30일)
이전 댓글 표시
Hello.. I'm a Simmechanics user. I have a GUI and Simmechanics model. I want my Simmechanics model have a motions depends on data from GUI. My question, how to transfer a data from GUI to simulink (Simmechanics) I have made so that my Simmechanics can move? Which blocks should I use?
Thank you..
댓글 수: 0
답변 (1개)
Kaustubha Govind
2012년 10월 10일
I am assuming that you mean to feed input signals/data into Simulink from your GUI, and not just tune parameters, correct?
It is fairly straightforward to access Simulink data during simulation (for example, if you want to update a plot in your GUI according to the current simulation output), but takes a little more thought to use your GUI as a source to your Simulink model. Note that the model expects the source to produce a value at every time-step during execution, so it is best to create a MATLAB S-function block to act as a source. The S-function can read the appropriate data from your GUI at every time-step and provide that as an input to the rest of the model.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!