|
Size: 1270
Comment:
|
Size: 1428
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 3: | Line 3: |
| 1. In the new empty model file, build your model from "approved" CDS parts (CDS_PARTS) or other CDS user library parts. 1. Once you have a model, select the entire model and "create subsystem". The library part should be a single subsystem enclosing your entire model. |
1. 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. 1. Once you have a model, select the entire model and "create subsystem". The library part should be a single subsystem enclosing your entire model. 1. 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 in to a library part. 1. Copy or cut the subsystem block out of the model, and paste it into the new empty library model. |
| Line 6: | Line 12: |
| 1. Give the inputs and outputs sensible names. | |
| Line 10: | Line 15: |
| == Building a library part from an existing model subsystem == 1. Open the model that contains the subsystem that you wish to make in to a library part. 1. |
|
| Line 16: | Line 16: |
| Line 18: | Line 17: |
| * Library parts should not | * Library parts should not |
Building a library part from scratch
From within Simulink, select File:New:Library.
- If you are:
- building a library part from scratch:
- In the new empty model file, build your model from "approved" CDS parts (CDS_PARTS) or other CDS user library parts.
- Once you have a model, select the entire model and "create subsystem". The library part should be a single subsystem enclosing your entire model.
- Give the inputs and outputs sensible names.
- building a library part from an existing model subsystem:
- Open the model that contains the subsystem that you wish to make in to a library part.
- Copy or cut the subsystem block out of the model, and paste it into the new empty library model.
- building a library part from scratch:
- Give the subsystem block a sensible unique name in the library. The name can be changed when the part is included/linked/dragged into another file, but the part name in the library file is how the parser finds the part, so it can't be changed after the fact without modifying all models that link to this part.
Save the library file with a sensible name, in the appropriate cds_user_apps/<subsystem>/common directory.
Notes about library parts
- 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.
- Library parts should not
