필터 지우기
필터 지우기

Run sections of Simulink diagram separately

조회 수: 8 (최근 30일)
Dalton Dune
Dalton Dune 2019년 6월 18일
답변: Raj 2019년 6월 19일
So just as MATLAB code can section parts of the code and run them individually, I would like to do the same with Simulink. Some background: I have a robotic arm inverse kinematics as one section, the second section is a PID control on a DC motor. I want the end effector of the robotic arm to get in place first (the inverse kinematics section to run first) before the DC motor runs. The DC motor is separate from the robotic arm but the time and speed that it runs will depend on the robotic arm.
Is there a way to run them separately with some block, or have the program pause? Maybe I should keep the sections in separate files, save data from the first section to Workspace, then use that workspace data in the second section. Not sure, any advice?

채택된 답변

Raj
Raj 2019년 6월 19일
1)"keep the sections in separate files, save data from the first section to Workspace, then use that workspace data in the second section" Yes that's one way but quite cumbersome i think.
2) Convert your DC motor section of model into an 'Enabled Subsystem'. Once your robotic arm model completes its run, set a control flag/signal which can be used as a trigger for the DC motor subsystem. See details here.
3) Convert your DC motor section to a 'If action subsystem' and use the time vector from a clock to start the DC motor section after sometime(this time should be sufficient for the robotic arm model to complete its run). See details here.

추가 답변 (0개)

카테고리

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

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by