Unable to run SIL Simulation

조회 수: 2 (최근 30일)
Shruti
Shruti 2024년 7월 19일
답변: Vandit 2024년 7월 19일
I am using MATLAB R2021b and attempting to perform SIL using the Process Advisor and the built-in task RunTestPerTestCases.m. However, when I modify the SimulationMode property of the built-in task from "" to "simulation-in-the-Loop (SIL)", the RunTestPerTestCases.m file still executes the test cases in normal mode.
Any help will be appreciated.

채택된 답변

Vandit
Vandit 2024년 7월 19일
Hi Shruti,
I understand that you are working with process advisor and attempting to use the built-in task "RunTestperTestCases.m" for Software-in-the-Loop (SIL) testing. However, despite changing the 'SimulationMode' property, the "RunTestperTestCases.m" file continues to execute the test cases in normal mode rather than in SIL mode as intended.
Upon reviewing the "RunTestperTestCases.m" file, it is observed that there is a conditional check implemented to determine whether the MATLAB release in use is R2023a or later. This check is essential for permitting the override of the simulation mode. The relevant section of code is as follows:
% Detect whether SimulationMode is set and we are in a
% release that supports it.
runWithSimOverride = false;
if obj.SimulationMode ~= ""
if padv.internal.is23aOrLater
runWithSimOverride = true;
else
warning(message('padv_spkg:tasks:SimulationModePropertyNotSupported', class(obj)))
end
end
If you are using MATLAB R2021b, the condition "padv.internal.is23aOrLater" will evaluate to "false", and the simulation mode override will not be applied.
To resolve this issue, you would need to upgrade to MATLAB R2023a or later, as the code seems to be designed with features or capabilities that are specific to that release or newer.
Hope this helps.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Run Tasks with Process Advisor에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by