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 to get the last item in separator?
i made a model to split a box into several objects by using separator object. i want to get back the last one to output, but i donot know how to get the index. because the output rank of the items in separator is disorder.can anyone help me?
|
#2
|
||||
|
||||
Hi,
have you noticed that the name of the splitted item changes. Maybe that gives you a hint how you can get the last item. the last item should be the one, that hasn't got a new name. Jörg |
#3
|
|||
|
|||
hi Jörg Vogel
thanks for your reply. i have tried to check the model with your hint and i found the first item in separator didnot get a new name. it is not the item the last one left separator. i want to find how to get the index of the last item to output from separtor. i want to upload my model to show what i want to do. i just want to spilit one item that just enter the separator into 76 copies. In flow trigger i want to make the forward 75 copies to go into the second outputobject, and the last one to go into the first outputobject. lastone.fsm |
#4
|
||||
|
||||
On the onexit trigger you can query the content of the separator. When it hits one you know that it is the last item leaving. So in that case you can put a label on it and then you know what product is the last one that left the separator or store a pointer to this item and do with it what you want.
|
#5
|
|||
|
|||
i want to decide which outobject the item should go into when it fire the flow trigger. i know how to get the last item index when it fire the exit trigger. but i cannot change the flow direction of the last item, which had been decided in the flow trigger before.
|
#6
|
||||
|
||||
The problem with your model is that for all the items the sendtoport is evaluated and if the downstream object has capacity it will go there. So in this case whatever object you determin to be send on to the queue it will always overtake all the other objects that you send to the conveyor because it can go directly to the queue while the other object have to wait on their turn on the conveyor.
A simple solution would be to put an object with capacity 1 in between the separator and the conveyor and use its sendtoport trigger to achieve what you want. |
The Following User Says Thank You to Steven Hamoen For This Useful Post: | ||
oliver xie (10-28-2011) |
#7
|
|||
|
|||
Hi,
In the attached model I have 3 different solutions for your problem. The first, I use a queue after the separator to control the flow. The second example I have moved the decision to the OnMessage trigger and told the separator to not release the items. Last example use sendmessage and send to port. Hope the model will give you some help. Lars-Olof Last edited by Lars-Olof Leven; 10-28-2011 at 08:29 AM. Reason: Added one more example |
The Following 2 Users Say Thank You to Lars-Olof Leven For This Useful Post: | ||
oliver xie (10-28-2011) |
Thread | Thread Starter | Forum | Replies | Last Post |
each item has it's given location,and item's code correspond to storage location | Robert Liu | Q&A | 3 | 03-28-2011 08:46 PM |
Simple Separator Question | Anthony Timmiss | Q&A | 1 | 01-25-2010 08:22 AM |
o(Separator, current).v_unpack | Dane Lee | Q&A | 2 | 08-05-2009 02:29 PM |
Problem about Separator | wutian | Q&A | 8 | 06-18-2008 11:58 PM |
[Suggestion] multi tasking combiner/ separator | KelvinHo | Gripes and Goodies | 0 | 05-20-2008 06:48 PM |