Why can I not access the data in Data Store blocks from an S-Function in Simulink 5.0 (R13)?

2 views (last 30 days)

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
The ability to read the data in the Data Store blocks from an S-Function is not available in Simulink 5.1 (R13). This feature has been added in Simulink 6.0 (R14) and later.
To read from the Data Store Write block in Simulink 6.0 and later, you can do something similar to the following in the S-Function:
rtObjDSW = get_param('mget_dsm/Data Store Write','RunTimeObject');
out = rtObjDSW.InputPort(1);
sys = out.data;
The above lines first obtain the interface for the Data Store Write block, and then extract the data from the input port. The S-Function can then output these values to the scope.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!