SIL Verification Mode: Logged signals not available in SIL run

조회 수: 9 (최근 30일)
Yousaf
Yousaf 2025년 4월 18일
편집: Jaskirat 2025년 4월 23일
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