question

Alex Gf avatar image
0 Likes"
Alex Gf asked Sam Stubbs commented

How i can make my conveyor stop if a queue its empty? Stopping Line concept

I want to stop my main line if i dont have items to transport to the conveyor in a queue of a sub line, I used send message in OnReset at the Queue but it doesn´t works, it just stopped once en then the line didnt stop.

Hope somebody help me!!

Choose One
conveyorassembly linestop line
unnamed-1.png (183.9 KiB)
· 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.

Sebastian Hemmann avatar image Sebastian Hemmann commented ·
@Alex Gf

the Reset Trigger is only fired once you press the reset button. If you want to send your Messages more often, you will have to add some Code in another trigger.

Could you please share your model or create a small example model?

0 Likes 0 ·
Alex Gf avatar image Alex Gf Sebastian Hemmann commented ·

Thanks sebastian, here is the model.

stopping-line-model.fsm

0 Likes 0 ·
Sam Stubbs avatar image Sam Stubbs ♦ commented ·

As sebastian pointed out, it's hard to know without the context of a model. But if you want a conveyor to stop, when it's empty you'll want to use a different trigger than OnReset. Again, as Sebastian pointed out, OnReset only fires when you reset the model. If you want the conveyor to stop when a certain queue is empty. You could use the OnExit trigger in the queue, and make sure your logic checks the condition if the content of "current" (the queue) is 0.

0 Likes 0 ·
Alex Gf avatar image Alex Gf Sam Stubbs ♦ commented ·

Hi Samm here is the model, Im a little bit confused by the logic i have to use... but the main idea it´s if the queue1 its empty, the conveyor 1 has to stop until the queue 1 get items.

btw, could you help me? I recently add the second task executer with the option by different case, because of that I also made the source release a batch of items with different itemtype... is there other way to do that?

Thanks!!

stopping-line-model.fsm

0 Likes 0 ·

1 Answer

·
Sam Stubbs avatar image
0 Likes"
Sam Stubbs answered Sam Stubbs commented

Using some custom triggers on the Queue, and a motor object (that can be stopped with the stopobject command) I think I was able to achieve something along the lines of what you're looking for.

First I created a motor object and connected it to the conveyor. Then I set up a trigger so that whenever an item leaves Queue 1, the queue sends a 0 delay message to itself. When the message arrives it checks to see if the content of the queue is 0, if so, it stops the conveyor motor. Once something enters the queue again, the motor is resumed.

Here's the model:

6021-stopping-line-model-1.fsm


· 2
5 |100000

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

Jeff Nordgren avatar image Jeff Nordgren commented ·
@Alex Gf

@Sam Stubbs

Sam, your description says that you check Queue1 in the OnMessage trigger to see if it is empty. But looking at your model, you don't do that check. Attached is your model with that check included. I hope this is what you intended.

stopping-line-model-1-jn1.fsm

0 Likes 0 ·
Sam Stubbs avatar image Sam Stubbs ♦ Jeff Nordgren commented ·

Thanks @Jeff Nordgren. Accidentally posted the wrong one. Good catch!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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