Azzera filtri
Azzera filtri

How to collect a specified sample size of data from the input signal in the 'triggered and enabled subsystem'?

1 visualizzazione (ultimi 30 giorni)
Hello, I am working in simulink with'enabled and triggered subsystem'.I want to collect the data from the input of 'enabled and triggered subsystem' with specified sample size when the subsystem is activated each time. Let say I have 2 signals;signal A(pulse signal) and signal B. I connect the signal A (pulse signal) to the 'trigger' and signal B to the 'enable' and 'input 1' of the subsystem. However, each time only 1 data is obtained from the input 1 for each activation. For example, the susystem has been activated for 10 times and only 10 data I obtained from the input 1. I want to collect 20 data each time the subsystem is activated. I have been trying with different ways to do it but I am still stuggling with it. Any help will be appreciated. Thank you.

Risposte (1)

Fangjun Jiang
Fangjun Jiang il 12 Dic 2011
The subsystem is executed only when it's enabled and it's triggered. Assume your 'enable' signal is all true, if your subsystem has been activated for 10 times, of course, there will be only 10 data collected.
Assume you want to collect some other meaningful data other than the 'enable' signal, which should be all true in your case, you need to do something else outside of the 'enabled and triggered' subsystem.
Use the same trigger to trig a counter, the counter increases 1 at a time. While the counter is less or equal to 20, collect the signal.

Categorie

Scopri di più su Schedule Model Components in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by