Simulink - Outputting Signals successively

2 ビュー (過去 30 日間)
Leon Hilpoltsteiner
Leon Hilpoltsteiner 2020 年 6 月 18 日
回答済み: Kshitij Chhabra 2020 年 6 月 19 日
Hello everybody,
I am currently working with the Simulink Support Package for Android Devices. I am currently trying to output 2 signals with the scope block, one giving the user a target value and one using real-time data received from the sensors. I am wondering if it is possible to first display the target value graph starting from t0, then stop and then output the graph using real-time data. Currently both graphs are being plotted at the same time. From my understanding so far Simulink blocks have a constant signal output and there is no way of holding one signal back, they will always be displayed, starting at the current simulation time. I just wanted to ask if it is possible or if I am wasting my time trying to get this to work.
Thank you for your time!

回答 (1 件)

Kshitij Chhabra
Kshitij Chhabra 2020 年 6 月 19 日
Hi Leon,
From what I understand you want to send two signals alternatively to a same output port of your Simulink model. This is very well possible. For this you may use time signal as an input and control the output of the system as a function of the same using if conditions. You may use a pulse generator to generate the signals accordingly and program your system.
Alternatively, if you are using System Objects you may use the following to control various functionalities:
getCurrentTime(obj);
More information on using getCurrentTime() can be found in MATLAB Documentation here.

カテゴリ

Help Center および File ExchangeAndroid Devices についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by