Facing issue while resuming item on conveyor?

Facing issue while resuming item on conveyor?

rajankur6494
Advocate Advocate
27 Views
2 Replies
Message 1 of 3

Facing issue while resuming item on conveyor?

rajankur6494
Advocate
Advocate

[ FlexSim 23.0.0 ]

Hi Team,

I am trying to resume the item on conveyor using on message trigger. But it seems my code is wrong. I tried to follow some of the previous post regarding same issues but found that little difficult to digest.

1686138001759.png

I would like to know the easiest solution to fix it.

Thank you!

Accepted solutions (1)
28 Views
2 Replies
Replies (2)
Message 2 of 3

moehlmann_fe
Observer
Observer
Accepted solution

resumeobject() is meant to resume a fixed resource that was stopped by a time table, MTTR or other.

To resume an item on a conveyor you have to use one of the two commands below.

conveyorresumeitem(item);
or item.up.as(Conveyor).itemData[item].resume();

Note that to resume an item a reference to that item is of course needed, which is missing in your code. With a decision point (or photo eye), you can get an item that was stopped by the decision point as seen below. It makes sense to check if there currently is an item waiting before trying to resume it. That way the code will not throw errors if a message is received while no item is waiting.

Object item = current.as(Conveyor.DecisionPoint).activeItem;
if(objectexists(item)) {     item.up.as(Conveyor).itemData[item].resume(); }
Message 3 of 3

julie_weller
Not applicable

Hi @Ankur A3, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes