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
|
|||
|
|||
how get item position in Conveyor
i use "getkinematics(getvarnode(current,"convkinematic") ,KINEMATIC_X,1,time())-getkinematics(getvarnode(current,"convkinematic"), KINEMATIC_X,1,getentrytime(item))" to got item position in Conveyor, but if the conveyor blocked,this code can not got exactly position; I know because the kinmatics of Conveyor do not stop. so i want to know,which item in conveyor blocked.how to get the reference of the blocked item. thank you.
|
#2
|
|||
|
|||
Getting a reference to the item blocking a conveyor
I am not sure this is exactly what you want, but if I understand you correctly you are trying to get a reference to the item that is blocking the conveyor. The following for loop goes through the contents of the conveyor looking for the flow item that has a state value of 2. When it finds the item it sets a treenode variable "box" to be the reference for that item. The following is the code I used:
for (int i=1; i<=content(current); i++) { int state = getnodenum(node(">itemtype/state",rank(current,i))); if (state==2) { treenode box = rank(current,i); } } |
#3
|
|||
|
|||
thanks
int state = getnodenum(node(">itemtype/state",rank(current,i))); if (state==2) means: FRSTATE_READY: The flowitem has been release, but has not found a downstream object that is ready to receive it. you just get the item because "has not found a downstream object that is ready to receive it". not all blocked item, blocked not just because "has not found a downstream object that is ready to receive it". |
Thread | Thread Starter | Forum | Replies | Last Post |
item speed about conveyor | LINWEIXU | Q&A | 2 | 08-12-2011 10:04 AM |
how to change the rotation of item on conveyor? | oliver xie | Q&A | 1 | 05-18-2011 04:47 AM |
How to get the speed of an item at the end of a basic conveyor?.. | Pablo Concha | Q&A | 7 | 04-06-2010 07:37 AM |
question about item position of BasicConveyor kinematics | LINWEIXU | Q&A | 3 | 03-25-2010 10:17 AM |
What is the difference between a Conveyor and Basic Conveyor | shivrash | Q&A | 2 | 07-21-2009 04:09 AM |