Borrar filtros
Borrar filtros

Is it possible log an undefined amount of data with an xPC Target File Scope?

1 visualización (últimos 30 días)
In Simulink, a Scope or a To File block will log a data point at every time step (or at the specified sample time) from starting a simulation to stopping it (or until MatLab runs out of memory but I've never know that happen even with large simulations).
However, with xPC Target File Scopes you have to specify the number of data points you would like to log. I would like to log a data point at every time step (or a sample time as specified by myself) from starting a simulation to stopping it.
Is this possible or, for every simulation I perform, do I need to calculate how many data points I need to log?
Considering my step time is 1ms, the default 250 samples would not get me very far!

Respuesta aceptada

Rajiv Ghosh-Roy
Rajiv Ghosh-Roy el 1 de Jul. de 2014
You do not need to know how many points you will need to log. The number of samples (default 250, as you note) is most relevant for triggering: 250 contiguous samples will be logged after each trigger. If you are not using triggering, you can leave it at 250 or increase to some value such as 1000 (this helps act as a buffer in case the file writing falls behind momentarily).
  3 comentarios
Rajiv Ghosh-Roy
Rajiv Ghosh-Roy el 2 de Jul. de 2014
You would need to turn scope.AutoRestart='on' and that should do the trick.
Kev Heaton
Kev Heaton el 3 de Jul. de 2014
Perfect! Worked a treat.
Thank you very much.

Iniciar sesión para comentar.

Más respuestas (0)

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by