Skip to Main Content Skip to Search
Product Documentation

Troubleshooting Imported and Updated Models

If your CAD assembly was not constructed or exported properly, you might encounter problems in your generated SimMechanics model.

Best Practices for Creating and Exporting Assemblies

The SimMechanics Link User's Guide presents instructions and tips on these topics:

Inserting Reference Coordinate Systems into Assemblies Before Export

Translation might not place Body coordinate systems where you need them in the imported model, to attach Joint, Constraint, Driver, Actuator, or Sensor blocks. If so, insert reference coordinate systems into the CAD assembly at the appropriate positions and orientations and re-export the assembly into an XML file for import. These pre-export reference coordinate systems appear on the corresponding Body blocks after import.

For more information, see:

Controlling Mechanical Import to Assist Troubleshooting

Both the Import Physical Modeling XML dialog box and the mech_import function have model generation controls that can assist you in isolating errors in a newly imported model. You can:

Troubleshooting Errors During Model Generation

Errors in the Physical Modeling XML file appear as warnings at the MATLAB command line during model generation.

Identifying and Fixing Joint Translation Errors

Warnings arise from CAD constraint translation errors encountered when the XML file was originally exported. Such errors occur when the translator fails to map one or more CAD constraints, which restrict the degrees of freedom between parts, into their corresponding SimMechanics joints. The exporter warns you at the export step if such errors occur.

The failed Joint appears in your generated model as a Weld. You can fix such an error in two ways:

Troubleshooting Errors During Model Update

Update-importing an existing generated model can produce the same types of errors as importing a new model. The preceding discussion in this section explains these potential errors and how to identify and fix them.

In addition, you might update-import an existing generated model in a way that is technically correct, but not what you intended. To prevent such inadvertent errors, review the preceding sections:

Troubleshooting Model Simulation Errors

Certain problems with CAD-based models appear only when you run the model.

Troubleshooting SimMechanics and Simulink Problems

You might also encounter general Simulink or SimMechanics problems while running your model.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS