The attached model contains Mux and Demux blocks that I would like to access during runtime. If I set the simulation stop time to 'inf', run the model, and select the Mux or Demux block to be the current block, I will get an empty handle when I run the following command:
>> rto = get_param(gcb,'RuntimeObject')rto = handle: 0-by-1
However, the documentation accesible in MATLAB 7.0.4 (R14SP2) by running the following command:
web([docroot,'/toolbox/simulink/ug/working_with_blocks27.html'])
states the following:
Every block has a RuntimeObject parameter whose value, while a simulation is running, is a handle for the blocks' runtime object. This allows you to use get_param to obtain a block's runtime object.
Best Answer