question

Kishan Jayakumar avatar image
0 Likes"
Kishan Jayakumar asked Sam Stubbs answered

how to rotate the shape object in the sample model using kinematics?

I want to make the shape object to rotate and move up & down using kinematics commands.

kinematics.fsm

FlexSim 19.0.2
kinematics
kinematics.fsm (18.1 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Sam Stubbs avatar image
0 Likes"
Sam Stubbs answered

To use the kinematic commands you are going to add them to a trigger on the Processor. Once you've determined which trigger you want the kinematic to start on, I would use the Kinematic command reference in the manual to animate the object in the manner you want.

You can find all of the command reference documentation on Kinematic commands here:
(User Manual > Reference > Developer & Advanced User > Kinematic) Essentially the commands are going to need data such as x, y, z offset locations, start time, duration, what type of kinematic etc etc etc.

These are the main commands you will use with the kinematics:

  • initkinematics- This initializes data for the kinematics, saving things like the start location and rotation of the object you want to apply motion to.
  • addkinematic- This gives travel/rotate operations to the object. For example, you can tell the object, starting in 5 seconds and travel 10 units in the x direction, with a given acceleration, deceleration, and max speed. Then you can tell the object, starting in 7 seconds, travel 10 units in the y direction, with a different acceleration, deceleration, and max speed. The effect of these two operations is that the object will start traveling in the x, then will start simultaneously accelerating in the y, following a parabolic curved path to the destination. Each call to addkinematic will add another operation to the object.
  • updatekinematics- This command should be called when the object is being redrawn. This calculates the current position and rotation of the kinematics based on the current time, and sets the object's location to that position.
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.