question

Ankur A3 avatar image
1 Like"
Ankur A3 asked Julie Weller commented

Facing issue while resuming item on conveyor?

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!

FlexSim 23.0.0
conveyoritemresume
1686138001759.png (154.4 KiB)
· 1
5 |100000

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

Julie Weller avatar image Julie Weller commented ·

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 0 ·

1 Answer

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered

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(); }
5 |100000

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