SIL Verification Mode: Logged signals not available in SIL run

11 visualizaciones (últimos 30 días)
Yousaf
Yousaf el 18 de Abr. de 2025
Editada: Jaskirat el 23 de Abr. de 2025
I am running SIL Verification on my model. However, after running in both Simulation (MIL) and SIL, many of the logged signals are only available from the Simulation run, and those signals cannot be compared with the SIL run.
Looking into which signals are logged, it appears only the inputs to the model are logged in both MIL and SIL, but outputs are only logged in MIL.
Is there a setting I am missing?

Respuestas (1)

Jaskirat
Jaskirat el 21 de Abr. de 2025
Editada: Jaskirat el 21 de Abr. de 2025
Hello @Yousaf
I understand that you are unable to see all the signals in your model during SIL simulation.
This is because SIL/PIL blocks do not support internal signal logging. To do so, you can refer to the following steps:
  • Log the signals using “Logging Badge” icon above the signal or using Signal Logging Selector (Simulation > Data Inspector > Signal Logging Selector).
  • Go to Model Configuration Parameters:
Code Generation > Interface:
Set MAT-file logging to on.
For Embedded Coder: Code Generation > Verification > Test Point Signals: Enable "Log test point signals".
  • Mark signals as "Test Points":
Right-click the signal, select Properties, and check "Test Point".
Only test point signals can be logged in SIL.
You can refer to the following documentation for more details:
You might encounter some limitations with “Virtual Signals” corresponding to signals being optimized during code generation. The workaround for such signals is provided in the following link:
Hope this helps!
  2 comentarios
Yousaf
Yousaf el 22 de Abr. de 2025
The signals are already selected for logging.
The Mat-file logging option is not available, possibly due to the choice of TLC (Autosar).
When making the signals Test Points, I get the following error:
Output argument "preprocessor Flags" (and maybe others) not assigned during call to "coder.internal.getToolchain Custom Defines"
Jaskirat
Jaskirat el 23 de Abr. de 2025
Editada: Jaskirat el 23 de Abr. de 2025
Hi,
Since MAT-File logging is unavailable for Autosar TLC, you can try the following workaround using "External Mode" with XCP communication.
  • In your model, navigate to Model Configuration Parameters > Code Generation > Interface.
  • Enable External mode and select XCP on TCP/IP as the transport layer.
  • Ensure that the necessary signals are marked for logging.
  • Build and deploy the model.
  • Use the Simulation Data Inspector to monitor and log signals during execution.
You can refer to the following links for more details:

Iniciar sesión para comentar.

Categorías

Más información sobre Save Run-Time Data from Simulation en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by