Page 2 of 2

Re: Belt counter

Posted: Thu Sep 03, 2015 1:25 am
by -root
great to see the implementation of this. How would you envision taking the concept and using it to *control* a part of the factory?

Re: Belt counter

Posted: Fri Sep 04, 2015 8:15 pm
by obj
Here's something similar I cooked up. It counts increases in whatever signal you give it. You can use this to measure the incoming (or outgoing, see below) rate to a set of buffer chests, just wire them all together.
You can use it with tank signals too, or anything else that generates a changing signal value.
It will count each signal type separately.
combinator-counter.png
combinator-counter.png (405.19 KiB) Viewed 6438 times
Signals flow right to left:

* red input line with whatever is to be counted
* arithmetic, (each) * -1
* arithmetic, (each) + 0
* decider, (each) > 0, output (each) input count
* decider, (red square) = 0, output (everything) input count
* red output line with the running counts

The * and + combinators work as a differentiator, they output the change in input values on each update.
The > decider selects only increasing values. Use < if you want to see decreases e.g. the outgoing rate from a chest.
The = decider is an integrator; send it a red square signal to reset.

The constant combinator can be omitted, here it's just used to manually generate a reset signal.

Re: Belt counter

Posted: Sun Sep 06, 2015 10:48 pm
by obj
Putting a counter at each end of a (long) belt lets you limit the number of items waiting, rather than filling the whole belt:
belt-limiter.png
belt-limiter.png (653.83 KiB) Viewed 6413 times
Left combinator group is a differentiator+filter that counts items removed from the left smart chest.
Right combinator group is a differentiator+filter that counts items added to the right smart chest.

Bottom combinator group integrates the differentiator outputs to track the number of items currently on the belt. Then add the right chest's contents to get the total number of items waiting.

The smart inserter inserts when waiting items < 3.
The constant combinator is a manual reset.

Re: Belt counter

Posted: Thu Sep 10, 2015 11:26 am
by DOSorDIE
obj wrote:Putting a counter at each end of a (long) belt lets you limit the number of items waiting, rather than filling the whole belt:
belt-limiter.png
Left combinator group is a differentiator+filter that counts items removed from the left smart chest.
Right combinator group is a differentiator+filter that counts items added to the right smart chest.

Bottom combinator group integrates the differentiator outputs to track the number of items currently on the belt. Then add the right chest's contents to get the total number of items waiting.

The smart inserter inserts when waiting items < 3.
The constant combinator is a manual reset.
Great but how are you make it ... please more Infomation.

Re: Belt counter

Posted: Thu Sep 10, 2015 2:12 pm
by obj
It's just two of the counters from my first post combined:

left group outputs negative changes to the left chest's count:
each * -1 => each
each + 0 => each
each < 0 => each input count

right group outputs positive changes to the right chest's count:
each * -1 => each
each + 0 => each
each > 0 => each input count

bottom group integrates the left/right outputs, flips the sign to get the number of items currently on the belt, adds the righthand chest count:
redsquare = 0 => everything
each * -1 => each
each + 0 => each
belt-limiter.png
belt-limiter.png (15.76 KiB) Viewed 6368 times
(edit: reset line should probably be on the green wire, looking at that again now..)