Problem with understanding circuit conditions and using them

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
XeroWinGer
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Apr 03, 2018 3:56 am
Contact:

Problem with understanding circuit conditions and using them

Post by XeroWinGer »

Hello,

i'd like to ask if someone can help me with a certain circuit installment i'm trying to achieve at my factory.
before that i point out that my english is not that good because im a german pupil. :)

my goal is to produce a controlled amount of certain materials (like concrete) via circuit conditions and the logistics network. the logistics network lists the total amount of units produced from several assembly machines with their logistic chests and are connected with wires to the circuit conditions controls. based on these informations the machines shall produce materials and if yes then let the circuit controls restrict the throughput of raw materials.

i am playing with several mods, including these (which are in my opinion relevant to the problem):
  • big bags (longer reach + bigger bags + extended stack size per material)
  • deadlock's compact loaders (substitudes inserters on occasions because of the faster throughput)
  • factorissimo2 (realizing the task in these factories)
  • inventory sensor (combinator that reads the content from the assembly machine; marked in the screenshot!)
https://imgur.com/a/qIOad (see the attachment for the screenshot)

now my problem:

i want to craft concrete for mk3 factories from factorissimo2 mod but the assembly machine gets filled up to the brim and instead of getting 1 or 2 iron ore it gets the maximum of 1k (which is the result of the bigger bags mod, though the high stack size is intended). on the other side the loaders from deadlock dont have restrictions when it comes to inserting items like inserters do so they give out the 1k iron ore instead of 1 or 2 iron ore.

my intention was to restrict the needed materials with a belt inbetween the loaders and let the belt (or the belts, if more than 1 ingredient is needed) read the content from their very own assembly machine and thus regulate the wild throughput from the loaders. now this works by connecting the belt(s) directly via the combinator and this becomes the first circuit. but the problem is now the second circuit, which consists of all assembly machines that produce concrete. i want to signal that if the declared maximum amount is not produced, the belts should regulate the throughput for production until the desired maximum amount has been reached and then block the belt(s) totally. even though the belts from a single assembly machine read that it runs low on material it should be blocked and give no supply to the assembly machine.

unfortunately i't wont work for me because i can only define one signal for one belt and i clearly don't understand the tutorials on youtube and the factorio wiki, though i believe a SR latch could be the solution.



feel free to correct me and/or my english skills and i hope you can help me with this problem :)
Attachments
factorio bild für hilfe im forum.png
factorio bild für hilfe im forum.png (1.78 MiB) Viewed 1790 times

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

Re: Problem with understanding circuit conditions and using them

Post by DaveMcW »

So your conditions to turn off the belt are:
Iron ore > 2 OR Concrete > 100

As you said, a belt can only respond to 1 signal. So we need to convert the different signals into 1 signal. This is what a decider combinator does.
combinator.png
combinator.png (373.83 KiB) Viewed 1777 times
You need to use different color wires for the iron-ore-deciders and the concrete-deciders, to stop iron ore signals from leaking.

The above solution requires many decider combinators (one per assembling machine plus one to calculate the total). In this specific case there is a way to do it with only one decider:
combinator2.png
combinator2.png (367.83 KiB) Viewed 1774 times
We convert the concrete signal into a big iron ore signal. You still need different color wires for the natural iron ore signals and the (concrete)-iron-ore signal.

CageStooge
Burner Inserter
Burner Inserter
Posts: 9
Joined: Fri Apr 27, 2018 6:35 pm
Contact:

Re: Problem with understanding circuit conditions and using them

Post by CageStooge »

See, this is one of the examples that baffle me.

If you are outputting a constant iron = 3 signal than in what possible way could the final (if iron <= 2) EVER be true? You are constantly broadcasting a value of 3. In my mind I see it terms of code as this

$Iron = 3
If ($iron <= 2) {
# this will literally never happen, but I just wanted to have an if statement here
}

The only way it would be possible is to have something that adds a negative value to iron, but how would you have negative iron in that scenario?

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

Re: Problem with understanding circuit conditions and using them

Post by DaveMcW »

Just use the first solution if you don't understand.

(The answer is the constant combinator is used as the input count for the decider combinator, not connected to the belt directly.)

Hedning1390
Fast Inserter
Fast Inserter
Posts: 231
Joined: Fri Jan 05, 2018 8:47 pm
Contact:

Re: Problem with understanding circuit conditions and using them

Post by Hedning1390 »

I realize this is an old topic, but if you want to stop a belt on either of two different conditions you can just connect two different belt pieces in series and not use any combinators.

Post Reply

Return to “Gameplay Help”