Smart Smelter Counting Issue

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
FunMaker
Fast Inserter
Fast Inserter
Posts: 117
Joined: Wed Jun 08, 2016 8:43 pm
Contact:

Smart Smelter Counting Issue

Post by FunMaker »

Hi!

I have a big problem with my smart smelter for iron plates, copper plates and steel. As usual: It is the counting for iron plates that are inserted for steel production that does not work properly. I don't find the bug...

See Screenshot for one smelting block(top) + example of counter for alternating between the products (bottom) - mine is a little bit more complex(vary production priorities on factory demand) but ensures that there is only one signal on the line. See the blueprint string for smelting block.
image
Blueprint
Currently it is not as space efficient as it could be - but that does not matter.

Idea:

Iron ore and copper ore are tried to insert if the production signal is iron ore / copper ore --> no problem.
Iron plates are inserted if
a) production signal = plates
or
b) repeater signal (iron plates) is active
The repeater signal is sperated from the production signal and only connected to the inserter for iron plates.

Repeater Signal works like this:

X = Count of at this time inserted Iron plates (counted by a single arithmethic combinator: iron plates = iron plates * 1)
X / 5 = Y (because factorio truncates the result)
X - (Y * 5) = Z = Count of iron plates missing to form a complete steel bar.

So if (X mod 5 != 0) then we continue to insert iron plates until (X mod 5 == 0)

Works really great. Currently i have 476 smelters in place with that setup.

But my main problem is: Sometimes the counting breaks and the counter outputs something (X mod 5 == 0) but there are still 2-3 iron plates left in the smelter input...
In 30 minutes there are 20-30 smelters (of my 476) that break with iron plates in the input. All smelters that are broken have iron ore or copper ore in the hand of the copper inserter(hand is over the smelter).

I thought about that the iron plates inserter is stopped in mid air - but there are never iron plates in the iron plates inserter in this situation. So imho the counting is broken somehow - but i don't know why and how!

Please help! Thanks!
Post Reply

Return to “Gameplay Help”