Single use switch in Simulink Real-Time

4 ビュー (過去 30 日間)
Marco Aulla Villacres
Marco Aulla Villacres 2021 年 8 月 17 日
回答済み: Jonas 2021 年 8 月 17 日
Hi,
I am using etherCAT for motor control in a real-time application. Simulink runs the entire simulation all at once, but I want to send position commands only once the drive and motor are actually ready for movement (i.e., drive enabled). I thought about two potential solutions:
  1. Delaying the initial position command for the amount of time it takes the equipment to get ready (around 5 sec), but I am sure there must be a more elegant solution to this issue.
  2. Using relay and enable blocks together. The issue with this solution is that the relay block runs every cycle, even after the drive enabled signal was received, which I am assuming adds to the computational requirements for every cycle.
Is there any block that runs every cycle up until a certain signal is received, and once that signal is received, triggers a subsystem to run from there on until the end of the simulation, all this while the block stops running in the future.
Thank you

回答 (1 件)

Jonas
Jonas 2021 年 8 月 17 日

カテゴリ

Help Center および File ExchangeSchedule Model Components についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by