question

Enrique Elizaga avatar image
0 Likes"
Enrique Elizaga asked Jeanette F commented

On a decision point stop item and delay until message received?

I want to stop an item in a conveyor at a decision point. I used the stop and delay option, but it is time-based. I want to resume until the decision point receives a message. What is the right code? Anybody?

FlexSim 17.1.1
decision pointstop and resumestop itemresume item
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Mischa Spelt avatar image
2 Likes"
Mischa Spelt answered Jeanette F commented

Instead of using "Stop and Delay" you can just use the "Stop Item" from the same pick list. You can then use the Resume Item option to send the item on its way again. Note that you need a reference to the item for this, so you should pass it in via a message parameter or store it on a label in the trigger where you stop the item.

· 4
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Enrique Elizaga avatar image Enrique Elizaga commented ·

thank you @Mischa Spelt. This is most useful, what code line do you use to store the item reference in the label trigger. Upon receiving the message, i'll use the information in this label.

0 Likes 0 ·
Jeff Nordgren avatar image Jeff Nordgren Enrique Elizaga commented ·
@Enrique Elizaga

I believe what @Mischa Spelt is referring to, is that in the same trigger that you are stopping the item, you could create a label on that object (queue, processor or whatever) so that when you go to release this item, its reference will be in that label on that object. The code would be something like this:

current.ItemRef = item;

Where "ItemRef" is the "Pointer Label" that "item" is stored in.

0 Likes 0 ·
Sicong Ouyang avatar image Sicong Ouyang commented ·
Hi Mischa,


Sorry for reply to this very ancient answer. But since this answer triggered my further question, so please bear with me:


I understand how to stop the item based on a label. For example what I did is to add a Photo Eye to check if the front conveyor is blocked. If it is blocked, then I set a label for that PE. When it is free, I set the same label to another value. The decision point will base on this label value to stop item (on arrival). However, I am struggling with that once the item is stopped. Because stopping the item was triggered by item's arrival, I can't just use "on arrival" to trigger the DP to read the label once again at the PE. Could you please point out a solution for me?


Kind regards,

Sicong

0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ Sicong Ouyang commented ·
Hello @Sicong Ouyang,

It would be best to start a new question and reference this post in the new post. You can tag users like Mischa when referencing this post. I also reccomend you post a model and Please check out our best practices.

0 Likes 0 ·