フィルターのクリア

Using workspace variables in Logical/Temporal Assessments (Test Manager)

13 ビュー (過去 30 日間)
Brian Wong
Brian Wong 2020 年 11 月 24 日
編集済み: Alex Howard 2021 年 9 月 23 日
What I want to do:
I would like to build logical/temporal assessments in Test Manager that are assessed against a variable in my workspace.
For example: I want a test for my controls such that -
  • SysRdy shall become TRUE when the SysTemp > "MinAllowableTemp"
I would like to define "MinAllowableTemp" as a symbol which gets its value from a variable in my workspace. However, I get the following error when I run the Test
Error evaluating expression for symbol 'MinAllowableTemp' (Unrecognized function or variable 'x'.)
What I have tried:
  1. Define "MinAllowableTemp" as a symbol in Test Manager
  2. Run the script that defines 'x' in my workspace prior to running any tests.
  3. Run the script that defines 'x' in the Callbacks-Preload section of the test case.
  4. Run the script that defines 'x' in the Callbacks-Setup section of the test file.
Any help is appreciated - thanks!

採用された回答

Alex Howard
Alex Howard 2020 年 11 月 24 日
Hi Brian, can I ask what version of MATLAB you are using?
In R2020b, the Assessment Callback was added to the Logical and Temporal Assessments section of the Test Manager. In this callback, you can define your variable x using test data. Then, in the Symbols pane you can create the symbol MinAllowableTemp. You can right-click the symbol and select Map to expression. In the Expression field, enter the variable that you defined in the Assessment Callback, x. Here is some more documentation on this subject:
Let me know if you have more questions!
Thanks,
Alex
  4 件のコメント
Brian Wong
Brian Wong 2020 年 11 月 27 日
Unfortunately, our dev cycle is on 2020a right now so I am stuck. I have temporarily hard-coded these test values but it's good to know this has been addressed in the latest release.
Alex Howard
Alex Howard 2021 年 9 月 23 日
編集済み: Alex Howard 2021 年 9 月 23 日
Hi Brian,
I wanted to follow up on this since there is a new feature that was released in R2021b that allows you to run tests that contain logical and temporal assessments in multiple releases. You can author a test that contains a logical or temporal assessment in R2021b and use a model from a previous release as the system under test. For more information, see Assess Temporal Logic in Multiple Releases.
You can download R2021b at https://www.mathworks.com/downloads.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInputs についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by