Why am I unable to access the values of the outport in my model under SystemTest 2.2 (R2008a)?
3 views (last 30 days)
Show older comments
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'.
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
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 Comments
More Answers (0)
See Also
Categories
Find more on Test Model Components in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!