question

Arun Kr avatar image
0 Likes"
Arun Kr asked Jason Lightfoot answered

How To Get Kinematics Parameters Using Code While Using Kinematics PF Library

Hi,

I'm trying to access the kinematic parameters of an object( like speed, acceleration, etc) which uses process flow activities for kinematics. The kinematics label on the token is not returning the kinematics parameters accurately when using the getkinematics () command(always returning zero).

double currentrotvelocity = getkinematics(token.kinematics,KINEMATIC_RVELOCITY,1,Model.time);

return currentrotvelocity;

If we are not using process flow for kinematics, the parameters can be easily accessed using the getkinematics() on the label treenode.

Is this the right approach?

Regards,

Arun KRGetKinematics.fsm


FlexSim 23.1.1
kinematics with process flow
getkinematics.fsm (36.0 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

·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered
getkinematics(token.labels["kinematics"],KINEMATIC_RVELOCITY)


It needs the node, not what the value of the node is.

5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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