How do I get signals to repeat to infinity?

5 visualizaciones (últimos 30 días)
HayMakerMaker
HayMakerMaker el 26 de Jul. de 2016
Respondida: Rodrigo Prat el 20 de Jun. de 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.

Respuesta aceptada

Swarooph
Swarooph el 26 de Jul. de 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 comentarios
Michael
Michael el 12 de Sept. de 2017
Abderrahmane GHIMOUZ
Abderrahmane GHIMOUZ el 4 de En. de 2018
Hi, is it possible to show me the parameters of the delay block you used ? Thank you in advance

Iniciar sesión para comentar.

Más respuestas (1)

Rodrigo Prat
Rodrigo Prat el 20 de Jun. de 2020
Michael you are a genious

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by