ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
#1
|
||||
|
||||
About founctions of kinematic
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! |
#2
|
||||
|
||||
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"
|
The Following User Says Thank You to Steven Hamoen For This Useful Post: | ||
Scott Mackay (10-08-2009) |
#4
|
||||
|
||||
Please only ENGLISH language on this forum. Otherwise it is for the moderators impossible to control the forum. Thank you!
|
#5
|
||||
|
||||
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! |
#6
|
||||
|
||||
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.
|