Differences between revisions 7 and 8
Revision 7 as of 2011-06-02 22:08:32
Size: 1689
Editor: JamieRollins
Comment:
Revision 8 as of 2012-01-03 23:02:40
Size: 1689
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

Building a library part from scratch

  1. From within Simulink, select File:New:Library.

  2. If you are:
    • building a library part from scratch:
      1. In the new empty model file, build your model from "approved" CDS parts (CDS_PARTS) or other CDS user library parts.
      2. Once you have a model, select the entire model and "create subsystem". The library part should be a single subsystem enclosing your entire model.
      3. Give the inputs and outputs sensible names.
    • building a library part from an existing model subsystem:
      1. Open the model that contains the subsystem that you wish to make into a library part.
      2. Copy or cut the subsystem block out of the model, and paste it into the new empty library model.
  3. Give the subsystem block a sensible unique name in the library (see notes below).
  4. Save the library file with a sensible name, in the appropriate cds_user_apps/<subsystem>/common directory.

  5. To add the new library part to a model, open the library part file and drag the part into the model. DO NOT cut/copy paste (this will break the link to the library part).

Notes about library parts

  • The library file path and part name (path/part) is how the parser finds the part. Library file names or part names can not be changed after the fact without modifying all models that link to this part. Choose names wisely.
  • The name of a library part can be changed after the part is included/linked/dragged into a model file.

  • At the moment (2011/06/02) there is a bug such that library parts and the files that they are saved in can not have identical names. This is a bug that will hopefully be fixed soon.

CDS/How_to_make_model_library_part (last edited 2012-01-03 23:02:40 by localhost)