Why am I unable to access the values of the outport in my model under SystemTest 2.2 (R2008a)?
1 次查看(过去 30 天)
显示 更早的评论
I am using SystemTest on a simple Simulink model. When I try to reference the outport signal with variable name ST_OUTPORT(say) within the MATLAB element, I receive the following error:
'Attempt to reference field of non-structure array'.
采纳的回答
MathWorks Support Team
2009-6-27
The above error happens when, under the 'Main Test' element of SystemTest, the MATLAB element is defined before Simulink element.
This error occurs because when the Main Test element is run by SystemTest, it runs the MATLAB element before the Simulink element. When the MATLAB element is run ahead of the Simulink element, the referenced signal (ST_OUTPORT) is a double Test Variable which has not yet been assigned to the Simulink outport.
If the Simulink element is moved above the MATLAB element under the Main Test section of the Test Browser interface, this error disappears.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Test Model Components 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!