Page 1 of 1

Inserter to insert items only if conditions are correct.

Posted: Mon Mar 20, 2017 10:11 pm
by EvolutionMR
Hello, I am new to the form and have spent a little time looking for my answer through youtube and the form here as well.

That being said I was unable to find a source that had what I was looking for.

Basis-

I have a 3 chest [Requester Chests] each asking for 3 different items from the logistic system. {Not relevant to the situation but want to provide as much detail as possible}

I have inserters [Basic] pulling from these 3 chests separately.

What I am looking to do is have the inserters pull 100(ish) items from the chests then stop until the chests are refilled to at least 100 again.

So, in theory..

Inserters activate, chest 1 has 100 items inside, chest 2 has 100 items inside, chest 3 has 200 items inside.
I would like to set the insterters up somehow that they will only transfer 100 items then stop until the chests are back up to at least 100 items again.

Is this possible?

Re: Inserter to insert items only if conditions are correct.

Posted: Mon Mar 20, 2017 10:14 pm
by EvolutionMR
SC-1.gif
SC-1.gif (1.56 MiB) Viewed 4757 times
Screenshot didn't post for some reason.

Re: Inserter to insert items only if conditions are correct.

Posted: Mon Mar 20, 2017 10:19 pm
by DaveMcW
It's not easy to do. You need so use some kind of Latch to switch between the wait and fill states.

For this specific problem, it's easier to just middle-click the cargo wagon inventory and reserve slots for each item.

Re: Inserter to insert items only if conditions are correct.

Posted: Mon Mar 20, 2017 10:51 pm
by EvolutionMR
DaveMcW wrote:It's not easy to do. You need so use some kind of Latch to switch between the wait and fill states.

For this specific problem, it's easier to just middle-click the cargo wagon inventory and reserve slots for each item.
But can it be done? I don't mind a little work to get it just right. I am just mainly trying to get the circuit network understood. What makes what toggle, what makes this do this and so on. Even if it is a scribble on a napkin that could explain it would be awesome just so I could understand how to make it work.

But thank you DaveMcW for the response! I do appreciate feedback of any kind.

Re: Inserter to insert items only if conditions are correct.

Posted: Mon Mar 20, 2017 11:06 pm
by DaveMcW
It's not a "little work". The circuit network does not support it. You need to use electrical engineering to build your own computer to make it happen.

Re: Inserter to insert items only if conditions are correct.

Posted: Tue Mar 21, 2017 6:53 am
by Graveeater
If you want *exactly* 100 items transferred this will be quite tricky as inserters (with upgrades) will pick more than one item. If your inserters for example pick 3 items every time you will get 102 items.
If you only need around 100 items this should be possible.
Using belts it would be possible to get close to the required 100 items but the construction will probably be even more complicated.

Since you want to understand how this works I will give you some ideas (I don't have a solution right now).

You can count items transferred with belts ore inserters using the circuit network. Make sure to set them to pulse mode. You will need some memory device. What you need is a combinater where you can use the output again as an input for the next tick. This can be done using the circuit network only.

You also need to remember the state you are in, i.e, loading or waiting. Thats the latch mentioned before.

Next you will need to find a way to reset the counter and switch the state once all items have reached 100 or more.
Similarly you will want to switch the state once your requsters are full again.

I hope this helps you.

Re: Inserter to insert items only if conditions are correct.

Posted: Tue Mar 21, 2017 4:20 pm
by Yoyobuae
Easy enough to do using the train itselt as a latch:
https://gfycat.com/RareSpottedDogwoodclubgall

The rail signal before the station is blocked until all the steel chest have 100 of the respective items. Once the train moves into the station the inserters feeding into steel chests are blocked from refilling. Once train leaves the refill inserters are enabled again.