Signal / Circuit network troubles (Solved)

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
Anthlon
Burner Inserter
Burner Inserter
Posts: 14
Joined: Tue Jan 31, 2017 2:28 pm
Contact:

Signal / Circuit network troubles (Solved)

Post by Anthlon »

Hallo, i would like to ask somebody for different point of view, i have this easy goal to reach, but i struggle with putting it to work and i can't figrue it. First i do assume that i do not understand something right, here it is.
factorio_setup.png
factorio_setup.png (933.57 KiB) Viewed 1773 times
both sides are feeding same item from bottom to the two main chests, nothing else, still same item.

Here are things that happens:
factorio trable_size.jpg
factorio trable_size.jpg (478.29 KiB) Viewed 1773 times
Here is my question:
How to setup those two inserters to work only if one of chests contains more than the other one. No logistic conditions are involved.
Please do not suggest different solution, i know that there will be plenty, but my goal is to understand why it is not working even it should.
And i know that if that would work probably it ends by rotating some small count of items in that loop, but that is as i mean it.

For assuming whole situation - lets take its as nothing else is incoming at the moment, and (because of fully filled output belt) there is nothing going out, so we do have stable sum of items in both chests.

I did several homeworks and here is why I am asking.
  • I tried to conect both inserters with red wire from left & green wire from right and added condition "to work" only if Red>Green and on the other side opposite Green>Red signal, but that didnt work (on the chest is no other option than read contents so there should be no mistake made)
  • I tried both chest run to comparator, and if condition R>G / G>R then comparator sends signal to one particular inserter "to work" (= two comparators with opposite conditions each leading to one inserter with its output)
Last edited by Anthlon on Sun Apr 19, 2020 3:22 pm, edited 1 time in total.

Loewchen
Global Moderator
Global Moderator
Posts: 8319
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Circuit network troubles

Post by Loewchen »

Wire colors have nothing to do with color signals.

Pi-C
Smart Inserter
Smart Inserter
Posts: 1653
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Circuit network troubles

Post by Pi-C »

Anthlon wrote:
Sun Apr 19, 2020 12:28 pm
  • I tried to conect both inserters with red wire from left & green wire from right and added condition "to work" only if Red>Green and on the other side opposite Green>Red signal, but that didnt work (on the chest is no other option than read contents so there should be no mistake made)
  • I tried both chest run to comparator, and if condition R>G / G>R then comparator sends signal to one particular inserter "to work" (= two comparators with opposite conditions each leading to one inserter with its output)
Where do you get R and G from? Just because you read something via the red or green wire doesn't mean that the signals R/G exist! Instead, if both chests contain, for example, iron plates, you will have the iron plates signal on the red channel and on the green channel. If the red and the green wire go into a combinator, what the combinator will see is one signal only: the sum of iron plates from the red and the green wire.

You need to convert the "iron plates" signal from the left and the right chest to two distinct signals, then you have something you can compare. So, hook up one arithmetic combinator to the left chest, multiply "Each" with 1, and output the result as signal "A". Connect another arithmetic combinator to the right chest, also multiply "Each" with 1, and output the result as signal "B". Feed the output from the combinators to the inserters and set "A>B" or "B>A" as condition on which the inserter is enabled.
(Not quite sure if that will really work, as I'm currently not on a computer that has Factorio installed. That doesn't change the gist of this post: you'll need to generate two distinct signals that can be compared.)
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

astroshak
Filter Inserter
Filter Inserter
Posts: 597
Joined: Thu May 10, 2018 9:59 am
Contact:

Re: Circuit network troubles

Post by astroshak »

You would actually need several combinators to get this to work.

As stated above, you would need to put the two chests on separate channels. You would then need to feed the signal to several decider combinators, each one checking for one of the three conditions (L > R, R > L, R = L). Each combinator would then output a different signal (set to 1). Have the proper inserters set to operate only when its signal = 1.

Combinator logic can be troublesome to wrap one’s head around. Its troublesome for me, anyway - I have a hard time getting AAI Stuff to work. Single step stuff like this, though, the hardest part would be in splitting the left Iron Plate signal from the right Iron Plate signal (or w/e item you’re using).

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Circuit network troubles

Post by DaveMcW »

You need to use an arithmetic combinator to convert the identical item signals into 2 different signals. In my blueprint, I also added a constant combinator with 10 imaginary items, to discourage infinite loops.



2-chest-balancer.jpg
2-chest-balancer.jpg (129.33 KiB) Viewed 1751 times

Anthlon
Burner Inserter
Burner Inserter
Posts: 14
Joined: Tue Jan 31, 2017 2:28 pm
Contact:

Re: Circuit network troubles

Post by Anthlon »

Thank you very much for replies, i will dig through,i was wrong mostly about signals
"If you connect it by wire does not mean signal exist"
is an important lesson! Thank you!!

Anthlon
Burner Inserter
Burner Inserter
Posts: 14
Joined: Tue Jan 31, 2017 2:28 pm
Contact:

Re: Circuit network troubles

Post by Anthlon »

Pi-C wrote:
Sun Apr 19, 2020 1:10 pm
Anthlon wrote:
Sun Apr 19, 2020 12:28 pm
  • I tried to conect both inserters with red wire from left & green wire from right and added condition "to work" only if Red>Green and on the other side opposite Green>Red signal, but that didnt work (on the chest is no other option than read contents so there should be no mistake made)
  • I tried both chest run to comparator, and if condition R>G / G>R then comparator sends signal to one particular inserter "to work" (= two comparators with opposite conditions each leading to one inserter with its output)
Where do you get R and G from?
Red was going from one chest, G from other, and what i assumed was wrong as you explained, that was helpful, and as expected, i was understanding wrongly how it behaves.
Pi-C wrote:
Sun Apr 19, 2020 1:10 pm
You need to convert the "iron plates" signal from the left and the right chest to two distinct signals, then you have something you can compare. So, hook up one arithmetic combinator to the left chest, multiply "Each" with 1, and output the result as signal "A". Connect another arithmetic combinator to the right chest, also multiply "Each" with 1, and output the result as signal "B". Feed the output from the combinators to the inserters and set "A>B" or "B>A" as condition on which the inserter is enabled.
(Not quite sure if that will really work, as I'm currently not on a computer that has Factorio installed. That doesn't change the gist of this post: you'll need to generate two distinct signals that can be compared.)
Thats it probably :-D

Anthlon
Burner Inserter
Burner Inserter
Posts: 14
Joined: Tue Jan 31, 2017 2:28 pm
Contact:

Re: Circuit network troubles

Post by Anthlon »

DaveMcW wrote:
Sun Apr 19, 2020 1:26 pm
You need to use an arithmetic combinator to convert the identical item signals into 2 different signals. In my blueprint, I also added a constant combinator with 10 imaginary items, to discourage infinite loops.




2-chest-balancer.jpg
Learnt a lot from that! Thank you, and it works, basicaly for me now - If i get it(?), value set/produced on constant combinators define maximal tolerated difference between those two chests, and each created excess of that value executes one balance half-cycle of stack dose by one inserter on particular side.

solved, thank you :-D

Post Reply

Return to “Gameplay Help”