Simulink - Outputting Signals successively
2 views (last 30 days)
Show older comments
Leon Hilpoltsteiner on 18 Jun 2020
Answered: Kshitij Chhabra on 19 Jun 2020
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!
Kshitij Chhabra on 19 Jun 2020
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:
More information on using getCurrentTime() can be found in MATLAB Documentation here.
Find more on Modeling in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!