Search code examples
matlabsimulinksolidworkssimscape

Whats wrong with this MATLAB example (User-Added Coordinate Systems)?


Well I am working on a very interesting project concerning a gear system that will rotate a shaft and some gear systems. I am following a tutorial from matlab User-Added Coordinate Systems on how to decouple and have two gears rotating.

Well, I need some hold on understanding the following figure, that is the output of the above link.

enter image description here

So what I do next is un-weld the two gears by deleting the conection of F1, and later introducing the common gear constraint by conecting it to the SMLINK port on both gear"_" boxes. I get and unusual message that says:

" * Model not assembled: position violation * Resolve this issue in order to simulate the model."

Can some one explain what is happening?

Also, what is the difference between 1st generation, and multibody Simscape? can I have joint actuators in both cases? and if so how would i be able to implement such in the example given above?

for those who would like to answer, but dont have solid works, the gear block boxes, and figure is the following:

enter image description here enter image description here


Solution

  • It looks like the right thing to do, but how have you parameterised your gear constraint? Have a look at mech_user_added_css.mdl for the correct way to do it (it's one of the SimMechanics example, but it uses the first generation engine and blocks). Make sure the gear circle radii match what's in the first generation example. It will also help to answer you question about first generation vs. second generation.

    SimMechanics was one of the early physical modelling tools produced by MathWorks. A few years later, they produced Simscape and the Simscape engine for modelling multi-domain systems. This was much more powerful than the original SimMechanics, so over the years they migrated SimMechanics functionality over to Simscape, but have kept the original first generation blocks for compatibility issues. Have a look at some of the first generation vs second generation examples and blocks to get an idea.