探索全新的 mydSPACE 服务: 许可证管理、全新的 dSPACE 帮助以及用于用户文档的 dSPACE 聊天机器人。请访问我们的专用支持页面,获取更多信息和支持。 链接了解更多并获取支持

FAQ 021: Data Capture at Simulation Start

Question

When I download a model, the simulation starts straight away, so that it is impossible to capture the behaviour of the model at the simulation start via ControlDesk. Is there a way of to start and stop the real-time processor manually so that data capture begins at time 0.0?

Solution

Working with ControlDesk

The simState variable in each model controls the simulation state, i.e., it determines whether the simulation is stopped, paused, or running. By default, simState is initialized to RUN, so that the simulation is started immediately after download.

To initialize simState to STOP

  1. Modify the simulation parameters as follows:
  • For RTI models, select STOP or PAUSE as the Initial simulation state. You can find the Initial simulation state on the RTI simulation options page under the Code Generation page in the Model Configuration Parameters dialog.
  • For RTI-MP models, select Stop as the Initial Simulation State. You can find it on the Main page of the Multiprocessor Setup dialog
  1. Build and download the model as usual.
  2. Start ControlDesk and prepare your experiment.
  3. Connect a virtual instrument, such as the Radio Button instrument, to the simState variable. Use the following values:

simState

Value

STOP

0

PAUSE1

1

RUN

2

1 is not supported by the DS1007 Processor Board

  1. Connect the variables you want to capture to a suitable data acquisition instrument, e.g., a plotter.
  2. Select the Edit Capture Settings context menu command of the data acquisition instrument to open the Capture Settings window and clear the Auto Repeat checkbox. This ensures that the captured data is not overwritten after the plot is complete.
  3. Start Measuring in ControlDesk.
  4. Set simState to RUN. The data is captured from the first sampling step.

If your model is already built, downloaded, and running, you can also use ControlDesk to switch simState to STOP (see steps 4 - 8). Then restart the data capture services via the Start/Stop button in the Capture Settings window and set simState back to RUN.

Working with ControlDesk Next Generation

The approach described above also applies to ControlDesk Next Generation Version 5.0 and later, provided that the real time application was built with dSPACE Release 2013A or later.

With ControlDesk Next Generation versions prior to 5.0, it is not possible to start a measurement with simState set to STOP. You can, however, load the application with simState set to STOP, change it to RUN, and directly start the measurement. However, you will not receive the results for the first simulation steps this way.
 

Related dSPACE HelpDesk documents

Related Topics

  • FAQ 154
    FAQ 154

    How do I measure data from the first sample step of an application created in ConfigurationDesk?

  • FAQ 253
    FAQ 253

    How can I stop and restart an application from ControlDesk or ControlDesk Next Generation? What happens when the simState variable is changed? When do the termination values specified in RTI blocks become effective?

Tags

Date 2026-10-01
软件类型 实现软件, 实验和的可视化软件, 总线和网络软件, ECU 接口软件
产品 ControlDesk, RTI (Real-Time Interface)
资料信息 常见问答
信息类别 常规使用
dSPACE 版本发布 2013-A之前版本
Keywords Data capture, Model behavior, Simulation start, Time 0.0, SimState, RUN, STOP

通过 dSPACE时事通讯服务了解最新信息。

通过 dSPACE 时事通讯服务,我们将随时向您通报当前的使用案例、新解决方案和产品以及培训和活动。在此注册,免费订阅。

Enable form call

At this point, an input form from Click Dimensions is integrated. This enables us to process your newsletter subscription. The form is currently hidden due to your privacy settings for our website.

External input form

By activating the input form, you consent to personal data being transmitted to Click Dimensions within the EU, in the USA, Canada or Australia. More on this in our privacy policy.