MATLAB: How to transition Simscape Libraries

librarySimscapetransition

I made some changes to my Simscape library (including changes to the file names and to the block names). When I run 'ssc_build', my models using this library have broken links. How can I transition my library?

Best Answer

Forwarding tables are the best solution to transition your libraries while keeping a backward compatibility:
In their basic form, you need to provide the old block path and the new block path. However, if you have made some changes to the block name while keeping the same block path, you will need to:
  1. Specify a version number in the forwarding table
  2. Create a transformation function to describe this change
You can find an example describing this attached to this post. The two important files are:
  • 'makeMyLibrary' which defines the forwarding table programmatically
  • 'myTransformationFunction' which defines the change in the block path