MATLAB: ‘PID Controller’ in library ‘simulink_​need_slupd​ate’, error while trying to run old Simulink Code

bad linkolddocspid controllersimulinksimulink_need_slupdate

Hi,
I'm trying to run an old Simulink code and I'm getting the error:
Failed to find 'PID Controller' in library 'simulink_need_slupdate' referenced by '…/PID Controller1'.
I checked the library 'simulink_need_slupdate' on several different versions of MATLAB and could not find the PID controller in there.
My idea is to replace all of these blocks with a PID controller, and see if the code runs, the only problem is that I don't know the gains which were used in the old blocks, and I'm not sure if this will actually fix the code and there are several (~50) PID controllers to be replaced.
In the Simulink code itself the blocks show up as bad links, because the 'Source Link' shows up as 'simulink_need_slupdate/PID Controller'.
Any advice? Should I just replace all the PID's and try to recalculate the gains, or is there another easier path? Thanks for any help!
JR

Best Answer

It looks like your model has been made in an old release (before ~R2009), then open and saved in a recent release. But now you are trying to reopen it in an old release.
The PID block is in the "simulink_need_slupdate" library since R2010a or R2010b. The reason is that this old PID block has been replaced by a new PID block (<http://www.mathworks.com/help/toolbox/simulink/slref/pidcontroller.html>)
Before, it was inside the Simulink Extras library (I think the exact name is simulink_extras.mdl, please verify)
What you can do is write a script to find the problematic blocks using FIND_SYSTEM, then use SET_PARAM on these blocks to modify the "ReferenceBlock" property and point to the right place. (see http://www.mathworks.com/help/toolbox/simulink/slref/f23-7517.html for all the block parameters)
Please cnmtact technical support if you need help with that, your are not the first to encounter this situation.
Related Question