## How to reset a counter?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
ray4ever
Long Handed Inserter
Posts: 86
Joined: Sun Jan 12, 2014 9:22 am
Contact:

### How to reset a counter?

Hi,

with 0.13 out it is fairly easy to make an item counter. Just connect your inserter/belt to a arithmetic combinator and wire the result back in (e.g. A + iron plates = A). But how do I reset the counter?

For example i would like to count 2 Iron Plates, wait till a trigger condition is met (so reset the counter), and than count another 2 Iron plates. Any ideas?

Piumosso
Burner Inserter
Posts: 5
Joined: Thu Jun 02, 2016 1:54 am
Contact:

### Re: How to reset a counter?

Only way that I have tried is to wire in an arithmetic combinator gives the negative of the current value, i.e. (A * -1 => A), then wire that back into your (A + iron plates => A) input. But then, you only want that to happen for a single tick, so you really want (A * B => A) where B pulses to -1 for a single tick on your trigger condition.

The Eriksonn
Fast Inserter
Posts: 230
Joined: Wed Jun 08, 2016 6:16 pm
Contact:

### Re: How to reset a counter?

Since the network adds by itself I usually do iron * green = iron and then just dump in the iron on another wire, and then just remove green to reset.

DaveMcW
Smart Inserter
Posts: 3008
Joined: Tue May 13, 2014 11:06 am
Contact:

### Re: How to reset a counter?

I use a decider combinator looped to itself, red=0, return everything. Every pulse gets counted, and it resets with a red signal.

The Eriksonn
Fast Inserter
Posts: 230
Joined: Wed Jun 08, 2016 6:16 pm
Contact:

### Re: How to reset a counter?

I never thought about that, and it would simplify alot of my stuff since the reset is 1 instead of 0. thx

### Who is online

Users browsing this forum: No registered users