question

Fabio G10 avatar image
0 Likes"
Fabio G10 asked Fabio G10 commented

Get Actual Crane Speed with Kinematics

Hi, I need to read actual crane speed in a kinematics flow moving a crane, but I can't get it to work.

I read this Post but is not working for me. I've tested two options but always get zero.


  1. treenode kinematics = token.kinematics;
  2. print ("Speed Kinematics: " + getkinematics(kinematics,KINEMATIC_VX));
  3.  
  4. treenode cranekinematics = Model.find("Crane1>variables/cranekinematics");
  5. print ("Speed Crane Kinematics: " + getkinematics(cranekinematics,KINEMATIC_VX));


What I am doing wrong ?

Attached file on File Uploads: TestKinematicsCranev6.fsm. TestKinematicsCranev6.fsm.zip


Regards

Fabio


FlexSim 22.2.0
cranekinematics
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 Fabio G10 commented

You need the node reference not the value of it:

  1. treenode kinematics = token.labels["kinematics"];

You're not setting the cranekinematics so can ignore that.

· 1
5 |100000

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