SIL Verification Mode: Logged signals not available in SIL run

11 次查看(过去 30 天)
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?

回答(1 个)

Jaskirat
Jaskirat 2025-4-21
编辑:Jaskirat 2025-4-21
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 个评论
Yousaf
Yousaf 2025-4-22
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 2025-4-23
编辑:Jaskirat 2025-4-23
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:

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Save Run-Time Data from Simulation 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by