Page 1 of 1

Asking Combinator advise

Posted: Tue Aug 18, 2020 12:13 pm
by seasonedsalt
Not a veteran player,I decide to start a new game with new approach solving problem.
There a some concept I would like to do but I don't know where to look at.

I want a circuit network detect the accumulator charge rate and compare it against X second.If a downward trend happen I could switch on more generator.
(was using a steam tank in old map,but it took too much time to detect anything.Counting accumulator charge level is quicker,but sometime it just consumed all charge in second,require a stupid amount of accumulator to smooth it)

Another thing I don't know how it is called.I want to turn on a inserter if the box holding 100 items stay operate until it reach 0.(I think that a SR latch job)
But I would like to add a condition to turn off the inserter if 200 second has passed ,thus if the inserter unable to empty the box,it will turn off and wait for it stack to 100 again.

I have basic understanding of the circuit network cookbook.I might missed the obvious answer :D .

Re: Asking Combinator advise

Posted: Tue Aug 18, 2020 7:05 pm
by Ranger_Aurelien
I'm not a Guru, but have played and read a bit:

Sounds like the first request is for Memory
https://wiki.factorio.com/Tutorial:Comb ... ial#Memory

And if the new value is lower activate a power switch to add more power.

There is a tutorial here for activating more power if an accumulator /capacity/ drops too low:
https://wiki.factorio.com/Tutorial:Circ ... book#Power



There is a tutorial to Clocks which can count down and reset the SR latch:
https://wiki.factorio.com/Tutorial:Comb ... sic_clocks

and here are more SR latches details (similar to Power above): SR latch, or "Set/Reset latching switch"
https://wiki.factorio.com/Tutorial:Comb ... ing_switch

***

Give them a try and if you have questions post a picture of your work (or save) and we can take a look.
You can post images free on https://imgur.com/ without an account and post a link to the image here.

Re: Asking Combinator advise

Posted: Wed Aug 19, 2020 2:24 am
by Yoyobuae
seasonedsalt wrote:
Tue Aug 18, 2020 12:13 pm
I want a circuit network detect the accumulator charge rate and compare it against X second.If a downward trend happen I could switch on more generator.
(was using a steam tank in old map,but it took too much time to detect anything.Counting accumulator charge level is quicker,but sometime it just consumed all charge in second,require a stupid amount of accumulator to smooth it)
Rate of change measurement circuit (input on the left power pole, output on the right):


The circuit has a pulse generator at the input and then a rolling average circuit to smooth out the pulses into a continuous smooth signal. The output signal estimates the kW consumption for a single accumulator. If you change the factor in the last arithmetic combinator to the number of accumulators in the network then the output signal should mirror the kW consumption in the electric network statistics. The circuit does introduce a delay of a few seconds, that's an unavoidable side-effect of the smoothing filter.

Re: Asking Combinator advise

Posted: Sun Aug 23, 2020 12:27 pm
by seasonedsalt
Ranger_Aurelien wrote:
Tue Aug 18, 2020 7:05 pm



There is a tutorial to Clocks which can count down and reset the SR latch:
https://wiki.factorio.com/Tutorial:Comb ... sic_clocks

and here are more SR latches details (similar to Power above): SR latch, or "Set/Reset latching switch"
https://wiki.factorio.com/Tutorial:Comb ... ing_switch

***

Give them a try and if you have questions post a picture of your work (or save) and we can take a look.
You can post images free on https://imgur.com/ without an account and post a link to the image here.
The clock work nicely thank you!

Re: Asking Combinator advise

Posted: Sun Aug 23, 2020 12:31 pm
by seasonedsalt
Yoyobuae wrote:
Wed Aug 19, 2020 2:24 am
seasonedsalt wrote:
Tue Aug 18, 2020 12:13 pm
I want a circuit network detect the accumulator charge rate and compare it against X second.If a downward trend happen I could switch on more generator.
(was using a steam tank in old map,but it took too much time to detect anything.Counting accumulator charge level is quicker,but sometime it just consumed all charge in second,require a stupid amount of accumulator to smooth it)
Rate of change measurement circuit (input on the left power pole, output on the right):


The circuit has a pulse generator at the input and then a rolling average circuit to smooth out the pulses into a continuous smooth signal. The output signal estimates the kW consumption for a single accumulator. If you change the factor in the last arithmetic combinator to the number of accumulators in the network then the output signal should mirror the kW consumption in the electric network statistics. The circuit does introduce a delay of a few seconds, that's an unavoidable side-effect of the smoothing filter.
https://imgur.com/7LsTWFI
Trying to use the rate calculator.
what signal I should do to switch off/on the pump on red line?
btw can you tell me the reason of the accumulator signal *3.0k?
61 is the number of accumulator in network?

Re: Asking Combinator advise

Posted: Sun Aug 23, 2020 2:31 pm
by Yoyobuae
seasonedsalt wrote:
Sun Aug 23, 2020 12:31 pm
https://imgur.com/7LsTWFI
Trying to use the rate calculator.
what signal I should do to switch off/on the pump on red line?
btw can you tell me the reason of the accumulator signal *3.0k?
61 is the number of accumulator in network?
The pump should be connected to signal E at the output. The condition should be something like "E < -100" where the -100 means -100kW discharge rate at the accumulator.

The numbers were set up like that so so that the output signal is in amount of kW.