ATTENTION

This 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

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 08-12-2011
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default 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  
Old 08-15-2011
Chris Smith Chris Smith is offline
Flexsim User
 
Join Date: May 2011
Posts: 4
Downloads: 9
Uploads: 0
Thanks: 1
Thanked 12 Times in 3 Posts
Rep Power: 0
Chris Smith will become famous soon enoughChris Smith will become famous soon enough
Default 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  
Old 08-16-2011
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default

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


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.