Start Simulation via Joystick in Simulink

1 回表示 (過去 30 日間)
Thomas
Thomas 2013 年 8 月 6 日
Hello,
I want to start the Simulation in Simulink via a Button on my Joystick/Wheelchair, but i can't find any predefined Blocks for this task.
Does anyone have an idea, how i can do that, or where i can find a block which can start the simulation?
Many Thanks!
Thomas

回答 (1 件)

Kaustubha Govind
Kaustubha Govind 2013 年 8 月 6 日
If you need to start simulation using an external command, that command needs to exist outside of the model, so it cannot be a block (blocks will only start executing once the model starts running). You might want to explore whether your joystick has a MATLAB interface, or provides an interface via any of the standard forms that MATLAB supports. Once you establish MATLAB commands to react to the joystick, you can the command set_param('modelname', 'SimulationCommand', 'start') to start simulation.

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by