MATLAB: Is it possible to perform data logging on global data store memory objects in Simulink 7.5 (R2010a)

simulink

When using a Data Store Memory block, the 'log signal data' option can be selected, resulting in a workspace variable being generated during the simulation.
I would like to know if this same function can be accomplished when the Data Store Memory block is not used, but rather, a mpt.Signal object is created in the workspace, i.e. a global data store is used. It does not appear that the mpt.Signal or Simulink.Signal object allows a 'log signal data' option to be selected.

Best Answer

The ability to log global data store memory objects has been incorporated in Simulink 7.5 (R2010a). Data logging for these objects can be enabled by :
S= mpt.Signal
S.LoggingInfo.DataLogging =1;
There is a demo model in place which shows how the logged data can be viewed after a simulation. The model is called sldemo_mdlref_dsm.mdl and the tutorial for this demo can be accessed in the documentation by executing the following at MATLAB command prompt:
web(fullfile([matlabroot '\toolbox\simulink\simdemos\simfeatures\html\sldemo_mdlref_dsm.html']), '-helpbrowser')