FlexSim Community Forum

FlexSim Community Forum (https://archive.flexsim.com/index.php)
-   Q&A (https://archive.flexsim.com/forumdisplay.php?f=66)
-   -   About founctions of kinematic (https://archive.flexsim.com/showthread.php?t=1051)

Dane Lee 08-17-2009 03:01 AM

About founctions of kinematic
 
1 Attachment(s)
In the first model, use setloc(),Visualtool go down 1m, then it can back to original position; but use addkinematic(),Visualtool9 can't back to original position in the second model.
In the second model,the code in OnEntry:
double endtime=addkinematic(label(stamp,"kinematics"),0,0 ,-1,1,0,0,0,0,time(),KINEMATIC_TRAVEL);
addkinematic(label(stamp,"kinematics"),0,0,1,1,0,0 ,0,0,time()+endtime,KINEMATIC_TRAVEL);
I think that the distance of it travel down double it travel up.
Please,Tell me how the result of second model can be the same as first model,using addkinematic();
Help your reply,thanks!

Steven Hamoen 08-17-2009 03:10 AM

Quote:

Originally Posted by Dane Lee (Post 4743)
double endtime=addkinematic(label(stamp,"kinematics"),0,0 ,-1,1,0,0,0,0,time(),KINEMATIC_TRAVEL);
addkinematic(label(stamp,"kinematics"),0,0,1,1,0,0 ,0,0,time()+endtime,KINEMATIC_TRAVEL);

The endtime doesn't return the time it takes to perform the kinematics but it returns the actual moment in time that this kinematic is finished. So use "endtime - time()" instead of "time() + endtime"

LINWEIXU 08-17-2009 03:11 AM

addkinematic(label(stamp,"kinematics"),0,0,.9,1,0, 0,0,0,endtime-time(),KINEMATIC_TRAVEL);

Steven Hamoen 08-17-2009 03:46 AM

Please only ENGLISH language on this forum. Otherwise it is for the moderators impossible to control the forum. Thank you!

Dane Lee 08-17-2009 03:48 AM

First thank you very much!
As your said, shoud use "endtime " instead of "time() + endtime"

treenode stamp=centerobject(current,1);
double endtime=addkinematic(label(stamp,"kinematics"),0,0 ,-.9,1.5,5,5,0,0,time(),KINEMATIC_TRAVEL);
addkinematic(label(stamp,"kinematics"),0,0,.9,1.5, 5,5,0,0,endtime,KINEMATIC_TRAVEL);
Do you think!

Steven Hamoen 08-17-2009 04:05 AM

Yes that might be the solution. I haven't taken a look at your model so please try it yourself first and if it doesn't work ask again.


All times are GMT -6. The time now is 02:16 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.