How to set the sample time of a subsystem?
35 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Istvan
am 11 Feb. 2014
Bearbeitet: Stefanie Schwarz
am 14 Okt. 2023
I have a model for xPC in which I have different masked subsystems. As they do different tasks, they need to run with different timesteps (some do fast acquisition, others need longer time to run and do communication or other slow tasks). Subsystems trigger each other (start each other - obviously the faster one is in control).
How can I define the sampling time of a subsystem (and all components inside)?
I'm using fixed step solver. What timestep do I need to set for it? - the shortest one that I use in any subsystem?
Thank you for any suggestion.
-any single core solution out there?
0 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 11 Feb. 2014
Bearbeitet: Stefanie Schwarz
am 14 Okt. 2023
Try a zoh block just before your subsystem and set sample time of your subsystem blocks to inherited
Add
If your subsystem doesn't contain a continuous block, right click on your subsystem, click on block parameter(subsystem) then check treat as atomic unit, and set your sample time
4 Kommentare
Azzi Abdelmalek
am 11 Feb. 2014
The zoh is used before a continuous blocks. Its input is maintained the same until the next sample. The zoh doesn't delay anything.
If your subsystem doesn't contain a continuous block, right click on your subsystem, click on block parameter(subsystem) then check treat as atomic unit, and set your sample time
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Multicore Processor Targets finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!