How do I get signals to repeat to infinity?

11 Ansichten (letzte 30 Tage)
HayMakerMaker
HayMakerMaker am 26 Jul. 2016
Beantwortet: Rodrigo Prat am 20 Jun. 2020
Good morning.
I have the following signals in the Signal Builder block in Simulink. These signals need to be timed as shown, and I need this 30 second sequence to repeat as long as the program is running. How can this be done?
Running Matlab R2012b.
Thanks.

Akzeptierte Antwort

Swarooph
Swarooph am 26 Jul. 2016
I don't think this can be done using the Signal Builder block. It has only 3 options to set after final time. 'Hold final value', 'Set to Zero' or 'Extrapolate'. (File --> Simulation Options). You can instead try to use a 'Repeating Sequence' block.
  • Export data from Signal Builder to Workspace. (File --> Export to Workspace). For this example keep the variable name as channels.
  • Now your time data is specified by variables such as
channels(1).xData
channels(2).xData
.
.
.
channels(n).xData
  • Your signal data is specified by variables such as
channels(1).yData
channels(2).yData
.
.
.
channels(n).yData
  • Use a repeating sequence block and set Time Values and Output Values appropriately. You will have as many blocks as signals.
  • If you are planning on doing something like this quite often, you could create a masked subsystem that takes the entire channels variable and redistribute it to several programmatically created Repeating Sequence blocks underneath.
  3 Kommentare
Michael
Michael am 12 Sep. 2017
Abderrahmane GHIMOUZ
Abderrahmane GHIMOUZ am 4 Jan. 2018
Hi, is it possible to show me the parameters of the delay block you used ? Thank you in advance

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Rodrigo Prat
Rodrigo Prat am 20 Jun. 2020
Michael you are a genious

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by