| Contents | Index |
If your CAD assembly was not constructed or exported properly, you might encounter problems in your generated SimMechanics model.
The SimMechanics Link User's Guide presents instructions and tips on these topics:
Constructing a CAD assembly specifically for SimMechanics
"Fixing" subassembly parts and subassembly roots
Exporting a CAD assembly
Identifying and fixing export errors
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:
Coordinate Systems in Generated Models in the preceding section, Nondefault Features in Generated Models.
Adding More Coordinate Systems in the preceding section, Manually Modifying and Extending Generated Models After Import.
Note Inserting and optionally exporting reference coordinate systems is not supported for all CAD platforms supported by SimMechanics Link software. |
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:
Make the Joint blocks, the Body blocks rigidly connected by Welds, or both, in your model easier to locate by using the model hierarchy simplification options.
Make the Joint and other blocks easier to locate and identify by changing the model layout options.
Errors in the Physical Modeling XML file appear as warnings at the MATLAB command line during model generation.
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:
Return to the original CAD assembly, reconfigure the constraint, and export it again.
In the generated model, manually replace this Weld with a proper moving Joint.
Tip If you need reference coordinate systems on Bodies to facilitate repairing mistranslated Joints after import, see the preceding section, Inserting Reference Coordinate Systems into Assemblies Before Export. |
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:
Certain problems with CAD-based models appear only when you run the model.
You must "fix" at least one part in every CAD subassembly by mating it to the subassembly root. Otherwise, the massless root body is dynamically active and experiences infinite acceleration when forces or torques are applied to it.
If you find constraints are violated while your model is running, try the following:
Examine your original CAD assembly for redundant constraints.
Check and possibly increase the assembly tolerances at the original CAD export step.
Check and possibly increase the translated model's assembly tolerances in the machine's Machine Environment block, in the Parameters tab.
On the Constraints tab in the Machine Environment dialog, select the Use robust singularity handling check box.
Decrease the assembly tolerances at the original CAD export step.
Caution Never decrease assembly tolerances in a CAD-based SimMechanics model. Instead, decrease them in the original assembly, then reexport. |
You might also encounter general Simulink or SimMechanics problems while running your model.
For SimMechanics problems, see Troubleshooting Simulation Errors in the SimMechanics User's Guide.
For general Simulink problems, consult the Simulink documentation.
![]() | Controlling Model Update at the Block Level | Computer-Aided Design Translation | ![]() |

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 |