How can I programmatically change the names of input variables in a Simulink Test Assessment Block?
2 次查看(过去 30 天)
显示 更早的评论
I'm standardizing the names of signals in my Simulink environment and have made a script to change names of inports & outports of my models using get_param() & set_param().
For the Simulink test harnesses, it seems a lot more tricky.
For a Test Assessment block, the names of input signals used in test assessments are not accessable via
>>get_param(gcb,'InputSignalNames')
I've seen that there is a long list of "slstest" methods listed at https://www.mathworks.com/help/sltest/automation.html?s_tid=CRUX_lftnav
although I can't see how to edit the names of the assessment block's input variables and parameter variables programmatically.
0 个评论
回答(1 个)
Akshat Dalal
2025-3-17
Hi Adam,
Not sure if this is possible in older releases but you could use 'sltest.testmanager.AssessmentSymbol' in newer releases(introduced in R2022a) which provides utility to maintain the input and output variables of a test assesment block. It should be helpful in modifying the test assesment signals(symbols). Please refer the following documentation for more information: https://www.mathworks.com/help/sltest/ref/sltest.testmanager.assessmentsymbol-class.html
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Inputs 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!