跳到主要内容

Debugging

When you execute a simulation scenario, you might face different problems. However, there are several steps that you can follow to find where the issues come from.

The Debug HMI

In a simulation scenario, flows can be sent and received by Virtual Bench. If your scenario is not working, a good habit is to check if your flows are correctly sent and received. The Debug HMI will help you for this task.

To launch it, click on View -> Debug HMI, then run the scenario to check your flows.

Several features are available:

  • Flow trace recorder Execution Trace Recorder
  • Flows generation Flow Generation
  • Element information Element Information
  • Sequence activities tracker Sequence Activities Tracker

Execution Trace Recorder

This tab allows you to see the flows exchanged between Virtual Bench and the models. You can filter the WebSockets issuing the flows by selecting/deselecting them. The parameters column will allow you to look into the transiting variables with details.

  • In green, you will find the flows sent from Virtual Bench (e.g. user request for a button activation).
  • In white, you will find the flows received in Virtual Bench (e.g. a notification that the light has been switched on).
Execution Trace Recorder with the bulb example

Let's see some observations you can do:

  • Nothing is displayed, or a whole row of flow is missing in the debugger. It may indicate that the flow which triggers a sequence is not sent. It can be caused by a mapping responsible for sending a flow from Virtual Bench (simu-to-model mapping) that is not existing, or incorrectly defined.
  • Only green flows are displayed, or a lot of white flows are missing in the debugger. It is probably due to an issue that comes from the model you are using in your simulation. If any parameter is transiting, check in the parameter column that the values the flow carries are the ones expected by your model. If not, check your mappings. If there are no parameters, or all parameters are already correct, you may refer to this page for further investigation into Designer.
  • No flows are missing, but it still does not work. It may indicate a missing mapping when receiving a flow (model-to-simu mapping). If the mapping exists, it can be because it is not correctly set. If any parameter is transiting, check in the parameter column that the values the flow carries are the ones expected from your model to Virtual Bench. If it is NOT the case, the issue may come form your model, go to this page for further investigation into Designer.

Flow Generation

This tab allows you to simulate the sending of flows coming from a model. If a flow is not received from the model for some reasons (e.g. because you did not correct a bug in your model yet), you can select the flow you want to emit to check if the mappings are correct.

Flow generation from model with the bulb example

Element Information

This tab allows you to observe parameter values of one scenario element during the execution of a simulation scenario.

备注

Only simple type parameters (integer, decimal and string) and enumerations can be visible.

It can be useful in order to see if a mapping will have the intended effect.

Element information with the bulb example

Sequence Activities Tracker

This tab allows you to see the status of a sequence activity during the execution of a simulation scenario.

Designer

If the issue does not seem to come from the simulation, go to this page for further investigation into Designer.