Page 1 of 1

Inserter to deliver a specific amount

Posted: Mon Apr 25, 2016 7:25 pm
by JanusViborg
Hey there.
I want to send e.g. precise 10 parts from one chest to another. In between chests are belt. I found the solution for the receiving smart inserter to stop when the amount is reached. How do I make the transmitting smart inserter stop after transmitting the precise 10 units?
This is just for trying, to see if it could work, so I want to avoid logistic robots which I know can solve my challenge. Any ideas?
By the way I have no mods installed.
Thank You in advantage.

Re: Inserter to deliver a specific amount

Posted: Mon Apr 25, 2016 8:43 pm
by Koub
You can use combinators to count the items the sender ... sends.

Re: Inserter to deliver a specific amount

Posted: Mon Apr 25, 2016 9:40 pm
by mooklepticon
Koub wrote:You can use combinators to count the items the sender ... sends.
41245531[1].jpg
41245531[1].jpg (82.83 KiB) Viewed 4482 times

Re: Inserter to deliver a specific amount

Posted: Tue Apr 26, 2016 5:35 pm
by JanusViborg
@Koub.
Thank You for Your answer. How do i do that? The smart inserter doesn't send informations to be counted as far as I know. I've tried to control the inserter with a timer and then count the bits set to allow the inserter to move. Here I never found out to reset both the timer and the counter.
Can You please give me a little hint here?
Thank You in advance

Re: Inserter to deliver a specific amount

Posted: Thu Apr 28, 2016 5:15 am
by bo6
I'm not koub but I think I have a setup that does what you're looking for.
factoriopic1.png
factoriopic1.png (293.39 KiB) Viewed 4304 times
In this setup a counter keeps track of how many times an item is removed from a chest. The smart inserter only takes items out when the number of items removed is less than 9.

It uses a pulse generator to detect when an item is put into or removed from the smart chest. Since it's only interested in items being removed there's a filter to ignore the signal when things are added to the chest.

There's an arithmetic combinator in the filter to invert the negative signal, but its redundant if you're moving things onto belts like here; it's only useful if you're moving things from chest to chest.

Here's a screenshot of it taking 10 items out of the chest:
factoriopic3.png
factoriopic3.png (255.64 KiB) Viewed 4304 times

Re: Inserter to deliver a specific amount

Posted: Thu Apr 28, 2016 11:51 am
by Commander Keen
Hi bo6. That's great!
How do I have to setup the Combinators?

Re: Inserter to deliver a specific amount

Posted: Thu Apr 28, 2016 6:33 pm
by JanusViborg
Hi Guys.
This is so cool :)
As soon as I have the time, I will try to build this and see if I can make it work. I will report back with the result.
Thank you to everybody.
Janus

Re: Inserter to deliver a specific amount

Posted: Sat Apr 30, 2016 5:36 am
by bo6
Sorry for the delay, I got caught up on a few things. Here's a diagram of what each of those combinators does
counterfilterlogic.png
counterfilterlogic.png (43.8 KiB) Viewed 4151 times

Re: Inserter to deliver a specific amount

Posted: Sat Apr 30, 2016 8:45 pm
by JanusViborg
Hi again Bo6.
I'm sorry if I sound stupid, but it doesn't work in my game.
If I make the configuration from Your drawing the output from the pulse generator in total will allways be 0. Since the input in the decider combinator in the filter has to be less than 0 nothing will ever be send out from the decider combinator in the filter.
Factorio_setup_01.jpg
Factorio_setup_01.jpg (111.92 KiB) Viewed 4097 times
Can I again persuade You to explain?

Thank You in advance

Janus

Re: Inserter to deliver a specific amount

Posted: Sun May 01, 2016 6:09 pm
by bo6
No problem! I've had my own issues when I tried to pick up combinators.

That's actually GopherAtl's pulse generator design that they posted here: viewtopic.php?f=18&t=14556. But it's buried down pretty far in their post.

In this design the top decider is basically a follower component since chest inventories will never be negative (I guess it can be replaced with an arithmetic combinator for a more general use). It sends its output to the arithmetic combinator which cancels its input signal. There's a delay for the signal to be go through the arithmetic combinator, so the setup generates a nonzero output for a tick.

So if we were adding something to the chest the combinator outputs would look like:
Decider1.png
Decider1.png (19.93 KiB) Viewed 4056 times
And for removing something from a chest:
Decider2.png
Decider2.png (19.61 KiB) Viewed 4056 times
The generator you made looks like it should be fine, did you double check the filter to make sure it's working properly?

Re: Inserter to deliver a specific amount

Posted: Sun May 01, 2016 7:32 pm
by JanusViborg
Hi Bo6.
Now my setup works!
If there isn't anything which You can't explain or refer to. Your explaination makes completely sence. :)
The problem in my setup was the configuration between the counter and the inserter. When the counter was set to x<9 and the inserter was set to x<9 the inserter contunied for ever.
When I changed the configuration of the inserter to be x<8 it worked and took out 9 as defined in the counter.
So in your setup and explaination you counted in 10 pieces. In my i counted in 9... My mistake. :)
Now i will really start constructing a factory. :)

Thank You very much for Your help.
I hope it's okay if I contact you if I have questions from which I can't find an answer to in here own my own.

Regards
Janus

Re: Inserter to deliver a specific amount

Posted: Sun May 01, 2016 8:38 pm
by bo6
Nice, I'm glad it works now. I think I forgot to mention originally that the counter needs to have a maximum higher than the inserter count, oops. No problem, and of course; I'll try by best though since I'm still learning in Factorio too.