The requirement is to have the angle controlled by an expression in the Motion sim file. It is therefore necessary to first create this expression in the Motion sim file. Following this, an interpart expression will be created in the assembly file. Begin from the Motion sim
On your keyboard, click “Ctrl” + “E” to open the expressions menu. In the Expressions menu, create a new expression to control the angle of the gear.
In the desired Motion file, click on the “Application” tab in the ribbon, then click “Modeling”. This will open the modeling application.
In the Assembly Navigator, right click on an assembly which owns the gear which will be rotated and select “Make Work Part”.
On the keyboard, hit “CTRL” + “E” to bring up the Expressions menu. On the left hand side of the Expressions Dialog Box, select “Create/Edit Interpart Expression”.
In the Create Interpart Expression dialog box, select the .sim file that is being used. Then, select the expression that will control the angle of the part. Then click OK.
Objective: Use an assembly constraint in the Modeling Application to change the angle of a gear relative to ground.
First, to control the angle of the gear, there must be something to reference to for an angle. This is best accomplished by defining a CSYS on the object that will be rotated, in the case of the gear, usually at the center. To do this, either right click on the part that will be rotated and select “Make Work Part” or “Open in Window”. It does not matter which method is used, as either way the created Datum CSYS will be owned by the part.
Once open or selected as a work part, in the “Home” tab, under “Construction”, click “Datum CSYS”. Leave the Reference CSYS as “WCS”. In the Datum CSYS dialog box, under Manipulator, click on the Point Dialog button. Select a point that is at the desired center of rotation for the object. For the gear, it should be in the middle of the center hole. Then click OK.
If the gear was edited in a new window, return to the full assembly. Right click on the topmost assembly and click “Make Work Part”.
For this tutorial it could be useful to create a second Datum CSYS that is on the same center of rotation but slightly offset above or below the other Datum CSYS. This will allow the use of the Orient feature in the Assembly Constraint dialog box. However, the second Datum CSYS cannot be owned by the part that will be rotated, so it is best to have the Datum CSYS owned by the topmost assembly.
For the first gear that will be referenced for the assembly constraint, right click on it, then click “Replace Reference Set > Entire Part”. This will bring any Datum CSYS that is a child of the part up to be visible so that it can be used with the assembly constraint. If the part is not the parent of a Datum CSYS, one must be created.
Before Reference Set Replacement After Reference Set Replacement
In the Assembly Navigator, change the work part to be any assembly which owns both gears of interest.
In the top ribbon, click on “Assemblies”, then click on “Assembly Constraints”.
In the Assembly Constraints window, click on the “Angle” constraint under “Type”. Under “Geometry to Constrain”, for “Subtype”, click “Orient Angle”.
Follow the instructions in the bottom left corner of the Simcenter 3D window for how to select objects. For gears, a good series of selections is often: 1.) Select the center of rotation of the gear (Red Box). 2.) Select an axis on a Datum CSYS orthogonal to the axis of rotation (Green Box). 3). Select another axis that is in the same direction as 2 (however it will need to be on a separate CSYS) (Purple Box)
After the three selections for objects have been made, in the Assembly Constraints dialog box, under “Angle”, from the drop down menu select “Formula”. This will bring up the Expressions dialog box.
In the expressions dialog box, a new expression will appear. Double click on the interpart expression, or type in the expression name, to have the formula value match the expression. Once the expression is entered, click OK, then click OK on the Assembly Constraints dialog box.
The motion model can be returned to by clicking “Application” then “Motion” on the top ribbon