If more than one command exists in a CATIA Kinematics mechanism, the commands are not linked to each other. When the mechanism is simulated with commands, each command is manipulated manually, linearly, and independently of the other commands, which creates difficulties in making a simulation in which commands must be manipulated simultaneously.
To overcome this limitation, CATIA Formula and Law features can be used to link all commands in the mechanism to a single parameter – time. (The time parameter is created automatically for every mechanism, and the parameter is entitled KINTime in CATIA.) This way, the mechanism’s motion is simulated by manipulating the time parameter alone. Also, this enables calculation of time-dependent quantities in the mechanism, such as velocities and accelerations.
There are two types of Laws in CATIA – sketched-based and equation-based. In this post, I’ll demonstrate how to create and use sketch-based laws to control motion in a mechanism.
The sample model is shown below. The model consists of the base part and two blocks. The base part is fixed, while the blocks are linked to the base with prismatic joints, each joint enabling linear vertical motion of the corresponding block with a Length-type command. The goal is to control motion of both blocks simultaneously and in a certain, user-defined, fashion.
First, we need to create two sketches, each representing the law of motion for a block. The sketches should be contained in a CATPart document inserted in the CATProduct of the mechanism. Therefore, create and activate a new CATPart within the CATProduct. You can name the part anyhow you wish, in my example I’ll name it MotionLaws.
The exact location of the sketch within the model doesn’t matter, hence, for visual clarity, it’s best to create the sketch away from the Product, by creating a Point, then a Positioned Sketch with the origin at that point. You can use any plane as the sketch plane.
In my example, I want the brown block 1st to move up by 50mm, then stay stationary for some time, then move down by 30mm. The sketch representing such motion is shown below.
The sketch needs some explanation. The horizontal H-coordinate is going to be interpreted by CATIA as a percentage of the total simulation time. If total simulation time is, for instance, 10 seconds, then in the above example, H=100mm (the end of the sketch) corresponds to t=10s, H=75mm corresponds to t=7.5s, and H=25mm corresponds to t=2.5s. The vertical V-coordinate represents the amount of motion and is interpreted by CATIA in millimeters if command is length-driven, or in degrees if command is angle-driven. (The amount of motion can be scaled up or down later, if necessary.)
Therefore, with this sketch and with total simulation time 10s, the brown block will move up by 50mm in the first 2.5s, then stay stationary for the next 5s, then move down by 30mm in the last 2.5s.
Create the 2nd sketch, which will control motion of the blue block. (For convenience, I recommend placing the 2nd sketch on the same plane and the same origin point as the 1st sketch.)
This sketch (with total simulation time 10s) will make the blue block stay stationary for the first 5s, then move it up by 80mm in the next 5s.
Now we need to link the commands in the mechanism to the sketches. Double-click the command that controls the motion of the brown block and select button Link.
Select the 1st sketch in the model or in the tree, and assign the Maximum time value. (In this example, I will use 10s as the maximum time.)
Close the dialog boxes. Note that the Law feature has been automatically created in the MotionLaws part. Double-click it in the tree to view. Note that X=0 corresponds to the start point of the sketch, and X=1 corresponds to the end point of the sketch. Drag the green arrows to check the Y values along the sketch. Also note the Scaling factor – this could be used to scale up or down the amount of motion, if necessary. Click Cancel to close the preview.
Repeat the above process, now linking the command for the blue block to the 2nd sketch. Now the model has two Law features, controlling commands for both blocks with the KINTime parameter. The model should look approximately as shown below.
And that’s it! Now select the (Simulation with Laws) tool and enjoy!