Simulink not respecting the sampling time

11 visualizzazioni (ultimi 30 giorni)
Oussama Djedidi
Oussama Djedidi il 5 Giu 2018
Risposto: Mark McBroom il 8 Giu 2018
I have a Simulink model that have to acquire data from a device every 20 ms and then run this data through a neural network. I used a function call generator to call the acquisition every 20 ms but Simulink seem to not respect that timing.
What to do ?
  2 Commenti
Birdman
Birdman il 6 Giu 2018
How do you know that Simulink does not respect the sampling time? What do you observe?
Oussama Djedidi
Oussama Djedidi il 6 Giu 2018
The sampling time is around 0.5 second most of the time. It is like a simulation and a real-time execution.

Accedi per commentare.

Risposte (1)

Mark McBroom
Mark McBroom il 8 Giu 2018
Do you have Simulink connected directly to the device? Simulink is not a real-time program. It will run the simulation as fast as it can. If your model runs faster than real-time, you can slow it down to pseudo-real time by using the Simulation -> Pacing Options.

Categorie

Scopri di più su Simulink Coder in Help Center e File Exchange

Prodotti


Release

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by