フィルターのクリア

SystemTest's Limit Check throws an error as the variable being tested on is empty. How do I get this LimitCheck working?

3 ビュー (過去 30 日間)
I have a SystemTest of a Simulink model, where the outport signals are mapped to Test Variables.
When I try and perform a limitcheck, I get the Error Message: "[variableName] is empty."
I've not managed to figure out a workaround. When I attach a scope onto the outport signal, I find it is producing a signal right from the start of model simulation.

採用された回答

James
James 2011 年 9 月 14 日
Within SystemTest the order of execution corresponds to the order of elements within each of Pre/Main/Post test. So a LimitCheck or MatLab code that is run before the Simulink Model (i.e. listed above the Simulink Model, within Main Test) will not have access to the variables corresponding to the output of the model. This gives the variable is empty error.
To sort, click on the LimitCheck/MatLab script test elements and drag them down within SystemTest to below the Simulink test element.

その他の回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2011 年 8 月 26 日
I think the problem might be that the signal is not logged. Do you have a signal label for that signal line? Does the "variableName" exist in the base workspace after the simulation? Right click the signal line, choose "signal properties", you will see a dialog to specify the signal name, log name, etc. Make it match the variable name.
  9 件のコメント
Bart Addis
Bart Addis 2011 年 8 月 31 日
If you are comparing doubles, it is likely that the values you are comparing against are not exact double precision matches for the outputs of the model. This could be a combination of conversion to binary and limited number of significant digits. You probably want to use the Tolerance Check tab of the Limit Check Element. This will give you control over how much precision you expect from the test.

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

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by