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 |
|
Downloads |
Q&A Using Flexsim and building models |
#1
|
|||
|
|||
How to get the speed of an item at the end of a basic conveyor?..
Hi,
I'm playing around with the basic conveyor, and set it so that i have a variable starting speed, variable final speed and variable acceleration, how can i capture the speed of the item at the end of the conveyor?... regards Pablo Concha Erilkin |
#2
|
||||
|
||||
Call bcgetitemkinematics() to get the item's main kinematic. Then call getkinematics() for KINEMATIC_VX.
|
The Following User Says Thank You to Anthony Johnson For This Useful Post: | ||
Pablo Concha (04-05-2010) |
#3
|
|||
|
|||
I tried that but i guess i'm making some mistake when using the commands. What i did is:
treenode nodo_kin= bcgetitemkinematics(current,item,0); pf(getkinematics(nodo_kin,KINEMATIC_VX)); setlabelnum(item,"vel_final",getkinematics(nodo_kin,KINEMATIC_VX)); I keep getting 0.0000 at the console and the label... regards Pablo Concha Erilkin. |
#4
|
||||
|
||||
Yeah, in flexscript, at least for now, you need to pass parameter 3 and 4 explicitly, so this should work:
getkinematics(nodo_kin,KINEMATIC_VX, 0, time()); We'll fix this for version 5. |
The Following User Says Thank You to Anthony Johnson For This Useful Post: | ||
Pablo Concha (04-05-2010) |
#5
|
|||
|
|||
Still getting 0.0000, the code using now is:
treenode nodo_kin = bcgetitemkinematics(current,item,0); pf(getkinematics(nodo_kin,KINEMATIC_VX),0,time()); setlabelnum(item,"vel_final",getkinematics(nodo_kin,KINEMATIC_VX),0,time()); Attaching the model, i'm using the code on the decision point OnClear i also tried bcgetitemkinematics(current,item,1); just in case, it's supposed to be 0 for the main conveying kinematic right?... regards Pablo Concha Erilkin |
#6
|
||||
|
||||
You actually passed the parameters: ,0,time() as parameters to the pf() and setlabelnum() commands, instead of into the getkinematics() command.
Also, make sure you're calling bcgetitemkinematics(current,item,0); not bcgetitemkinematics(current,item,1); That's what the model you sent me has in it. Can't wait for version 5 (version 5 would yell at you for this error)!!! |
The Following User Says Thank You to Anthony Johnson For This Useful Post: | ||
Pablo Concha (04-05-2010) |
#7
|
|||
|
|||
doh!... that happened because i was just leaving office, and tried it in a hurry, gonna check it againg tomorrow, thanks for your help!...
regards Pablo Concha Erilkin. |
Thread | Thread Starter | Forum | Replies | Last Post |
Basic Use of the Experimenter | Gavin Douglas | Q&A | 8 | 09-08-2009 04:17 PM |
What is the difference between a Conveyor and Basic Conveyor | shivrash | Q&A | 2 | 07-21-2009 04:09 AM |
Model Speed | Alistair Smitheman | Q&A | 14 | 04-06-2009 12:45 PM |
Basic Conveyor | tobias.biemueller | Q&A | 16 | 05-23-2008 08:12 AM |
Increasing Run Speed | Alex Christensen | Tips and Tricks | 3 | 05-14-2008 04:11 PM |