Simulink - Outputting Signals successively

2 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Modeling 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by