MATLAB: Am I seeing an error when trying to query a subsystem’s LinkStatus within a callback function of a block in Simulink 6.0 (R14)

callbackcandeleteerrorfunctioninlinkstatusnotqueryingsimulinksubsystemwhile

You will see the following error when I am trying to query a subsystem's LinkStatus within a callback function of a block. Executing this callback leads to an error message.
To reproduce the problem follow the steps below:
Type the following at the MATLAB command prompt:
simple
Then,
1. Right-click on Subsystem and "Restore library link"
2. Select "Update library".
3. Close the library (it doesn't matter if you save it or not).
4. Open up Subsystem
5. Double-click on "simple/Subsystem/Test"
I am getting the following error:
OpenFcn: evalin('base', 'linkStatus = get_param(gcs, ''LinkStatus'')')
==> Can not delete 'simple/Subsystem' while in callback.
The screen shot of the error is attached.

Best Answer

This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
We have verified that querying a subsystem's LinkStatus within a callback function of a block leads to an error message in Simulink 6.0 (R14).
There are currently no known workarounds.