Combinators 101

This board is to show, discuss and archive useful combinator- and logic-creations.
Smart triggering, counters and sensors, useful circuitry, switching as an art :), computers.
Please provide if possible always a blueprint of your creation.
BlaatMekker
Inserter
Inserter
Posts: 29
Joined: Sun Dec 28, 2014 10:01 am
Contact:

Re: Combinators 101

Post by BlaatMekker »

A simpler S-R latch design: two binary (0/1) signals (A and B) being fed into one signal decider combinator which feeds back into itself. Because the signals need to be binary you require additional decider combinators when hooking up chests.
Screen Shot 2015-10-03 at 13.15.14.png
Screen Shot 2015-10-03 at 13.15.14.png (311.09 KiB) Viewed 26340 times
The condition on the light is "A > 0". It holds the S or R signal, which ever was active first. I don't think it can flicker either.

I think that I copied it from one of the FFF, though it might have been this forum itself.
BlaatMekker
Inserter
Inserter
Posts: 29
Joined: Sun Dec 28, 2014 10:01 am
Contact:

Re: Combinators 101

Post by BlaatMekker »

I use the setup from my previous post to control how much cracking is going on at my chemical plant. The output of the S-R latch (C1) is attached to a pump (C2) which controls how much of the cracked product is put into the next storage tank. By controlling the output of the cracking plants instead of the input the system becomes more responsive.
Screen Shot 2015-10-03 at 13.23.08-1.png
Screen Shot 2015-10-03 at 13.23.08-1.png (887.85 KiB) Viewed 26340 times
I have added some extra components to not make it jumpy when the fluid levels keep changing. The lights are used to see if Set, Reset, or Output is active.

Signal A (set) is defined as "Light Oil > Petroleum Gas", outputting A = {0,1}. Before the amount of Light Oil is put into the decider I first subtract 500. This creates a small buffer so that the oil refineries can have some time to catch up.

Signal B (reset) is defined as "Petroleum Gas > 2.4K", outputting B = {0, 1}. The reason that I create this signal using a constant is to ensure that a reset signal can be generated, by not including the ever changing levels of Light Oil.

I could have probably used a couple fewer wires if I hadn't used the storage tank contents as the binary output signals, but had actually used A/B.
Malkasphia
Inserter
Inserter
Posts: 22
Joined: Wed Dec 18, 2013 4:18 am
Contact:

Re: Combinators 101

Post by Malkasphia »

Here is a video demonstrating Combinator clocks, I know it is a couple of months late but it might help the wiki with a video for the clock segment instead of text - https://youtu.be/r1o73wvdZr8
Bizz Keryear
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Thu Oct 22, 2015 5:08 am
Contact:

Re: Combinators 101

Post by Bizz Keryear »

Hi I was reading this and it helped me a lot (since RS latches will never go into my head ... not here not in minecraft ... not in RL), but I stumbled over the
GopherAtl wrote:[...]
a blueprint string[...]
H4sIAAAAAAAA/9WS0WrDMAxFf6X42SmNuz4V7UfKCJ7tDIEjB8cZDSb/PscJo+3WtRuDsUcn0tXV0dVuZZ2SdlVBNBQwoOkgRpKNAaYcdUFSKJRrnpFkcJ7x
1nWpyhHEIxRiveMDFJv1buQ12mD81N3hC0kLMQxtUnlFH3ppGZ9F55/Fho1cuZ4CbDiSNkcox3Hky2RtFGrjrw4u36dq9EblzyLpEc2P5OLASvYE0RudHOXV
hgo17LhCr3oM00OkiS/eGDoryUYOTNxsnwqnLUjjMnTxDbFG34XqfhAz6MQibdxKP20MDBh3fWj77wi1Q5WxVrV3TYWUuoHV0naGnfDtGmltYWXTnnPd5ntm
sJ/B/MjqEucFj+XnL/F4PF3h3nCWf5HN8ifRFLej+fBFNMVFND9p3/67wI4cVTYal0Pwq0dIB5prBL+ekKS49yb0nlbV3pB+A7+5AAsABQAA
How do I use this? Was a whole lot time wondering if I can transfer blueprint data made in one save into another.
ratchetfreak
Filter Inserter
Filter Inserter
Posts: 952
Joined: Sat May 23, 2015 12:10 pm
Contact:

Re: Combinators 101

Post by ratchetfreak »

Bizz Keryear wrote:Hi I was reading this and it helped me a lot (since RS latches will never go into my head ... not here not in minecraft ... not in RL), but I stumbled over the
GopherAtl wrote:[...]
a blueprint string[...]
H4sIAAAAAAAA/9WS0WrDMAxFf6X42SmNuz4V7UfKCJ7tDIEjB8cZDSb/PscJo+3WtRuDsUcn0tXV0dVuZZ2SdlVBNBQwoOkgRpKNAaYcdUFSKJRrnpFkcJ7x
1nWpyhHEIxRiveMDFJv1buQ12mD81N3hC0kLMQxtUnlFH3ppGZ9F55/Fho1cuZ4CbDiSNkcox3Hky2RtFGrjrw4u36dq9EblzyLpEc2P5OLASvYE0RudHOXV
hgo17LhCr3oM00OkiS/eGDoryUYOTNxsnwqnLUjjMnTxDbFG34XqfhAz6MQibdxKP20MDBh3fWj77wi1Q5WxVrV3TYWUuoHV0naGnfDtGmltYWXTnnPd5ntm
sJ/B/MjqEucFj+XnL/F4PF3h3nCWf5HN8ifRFLej+fBFNMVFND9p3/67wI4cVTYal0Pwq0dIB5prBL+ekKS49yb0nlbV3pB+A7+5AAsABQAA
How do I use this? Was a whole lot time wondering if I can transfer blueprint data made in one save into another.
blueprint string mod:

https://forums.factorio.com/forum/vie ... 92&t=13651
goku90504
Inserter
Inserter
Posts: 24
Joined: Mon Nov 16, 2015 9:16 am
Contact:

Re: Combinators 101

Post by goku90504 »

I only recently bought the game (had it about a week or two now) and I've gotten a free play map to all research complete but I can't find combinators in my production list ?
Bisa
Filter Inserter
Filter Inserter
Posts: 450
Joined: Fri Jul 17, 2015 3:22 pm
Contact:

Re: Combinators 101

Post by Bisa »

goku90504 wrote:I only recently bought the game (had it about a week or two now) and I've gotten a free play map to all research complete but I can't find combinators in my production list ?
What version of the game are you playing? If you are on the "stable" branch you will not have access to them, try this link to download the experimental (but currently pretty stable) builds https://www.factorio.com/download/experimental

and welcome to the world of Factorio :geek:
Hosting a factorio server? Take a look at this || init script ||.
Brambor
Fast Inserter
Fast Inserter
Posts: 189
Joined: Thu May 07, 2015 1:52 pm
Contact:

Re: Combinators 101

Post by Brambor »

If you have 1 copper and 10 iron, the "everything>10" test will fail, but if you take away that 1 copper, the test will pass.
You have a mistake there. The test will not pass cause 10=10, you ment 11

EDIT: Oh sorry, it is in the 5th spoiler, right under Everything
PadaV4
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue Mar 08, 2016 11:29 pm
Contact:

Re: Combinators 101

Post by PadaV4 »

Big thanks to the OP for making this guide, very useful, i just made my first network(an alarm system to warn when coal runs low in the boilers). A few hours ago i thought i would never understand what those combinators do :lol:
Commander Keen
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri Apr 01, 2016 8:28 pm
Contact:

Re: Combinators 101

Post by Commander Keen »

The guide is great! Thank you!
How about we do some sketches like the attached one. I think that makes it easier to understand.
How you think?
I used this Programm (free) for it: https://www.yworks.com/products/yed
Attachments
Factorio.jpg
Factorio.jpg (31.06 KiB) Viewed 23986 times
zerohourrct
Inserter
Inserter
Posts: 28
Joined: Sun Apr 10, 2016 2:57 pm
Contact:

Re: Combinators 101

Post by zerohourrct »

I tried to textually describe some of the basic logic gates over on the wiki here https://wiki.factorio.com/index.php?tit ... r_Tutorial. It should probably be moved into a new page with a different title, so that it will show up well in wiki search results. Or maybe merge the entire 4 pages on combinators into a single page wikipedia style. I plan on adding to it over the next couple days, please ask questions if anything confuses you, or anything appears wrong.

I'm shooting for a layman's description of the gritty functionality of the combinators. I feel like a lot of the major users of combinators already have in-depth understanding of logic gates and higher complicated digital circuits and that makes it hard for those of us that don't already have that knowledge. Not that the concepts are impossible to understand, it just seems like a lot of the explanations are from a higher conceptual understanding down towards that of how combinators work. I'm trying to create a description that teaches in the other direction; starting with the simple mechanics of combinators and going upwards from there.
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3717
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Combinators 101

Post by DaveMcW »

Logic gates are a step backwards. You could build a computer using a NAND gate on 0's and 1's, but that's only useful for theoreticians. Delete the whole logic gate section from the article.

There should be 2 articles, one on practical ways to integrate combinators into a factory, and one on advanced combinator programming.

For the programming article, give them more useful building blocks. For loop. Delay loop. Array lookup. Modulo operator.

Every paragraph should have a picture of a sample build.
User avatar
brunzenstein
Smart Inserter
Smart Inserter
Posts: 1117
Joined: Tue Mar 01, 2016 2:27 pm
Contact:

Re: Combinators 101

Post by brunzenstein »

zerohourrct wrote:I tried to textually describe some of the basic logic gates over on the wiki here https://wiki.factorio.com/index.php?tit ... r_Tutorial. It should probably be moved into a new page with a different title, so that it will show up well in wiki search results. Or maybe merge the entire 4 pages on combinators into a single page wikipedia style. I plan on adding to it over the next couple days, please ask questions if anything confuses you, or anything appears wrong.

I'm shooting for a layman's description of the gritty functionality of the combinators. I feel like a lot of the major users of combinators already have in-depth understanding of logic gates and higher complicated digital circuits and that makes it hard for those of us that don't already have that knowledge. Not that the concepts are impossible to understand, it just seems like a lot of the explanations are from a higher conceptual understanding down towards that of how combinators work. I'm trying to create a description that teaches in the other direction; starting with the simple mechanics of combinators and going upwards from there.
thank you indeed for your dedication focusing on the 90% of folks here not born programmers but eager to learn- without easy understandable basics (and that's badly lacking) this whole game will end up in an ivory tower for a few..
zerohourrct
Inserter
Inserter
Posts: 28
Joined: Sun Apr 10, 2016 2:57 pm
Contact:

Re: Combinators 101

Post by zerohourrct »

DaveMcW wrote:There should be 2 articles, one on practical ways to integrate combinators into a factory, and one on advanced combinator programming.

For the programming article, give them more useful building blocks. For loop. Delay loop. Array lookup. Modulo operator.
Every paragraph should have a picture of a sample build.
Yeah, the article was pre-existing with no text written for anything. I just want to focus on the simpler practical applications, and get progressively more complicated. I try my hardest to not delete stuff for the sake of deleting it; it should generally be moved into a different page or different section within that page. It's wiki principle that you don't delete information unless its superfluous. Like I said it probably would have been better to just start a new page, but someone had already made that one :D
User avatar
brunzenstein
Smart Inserter
Smart Inserter
Posts: 1117
Joined: Tue Mar 01, 2016 2:27 pm
Contact:

Re: Combinators 101

Post by brunzenstein »

This page is incredible valuable indeed! More pictures would be highly appreciated as not everyone is a programmer but many laymen eager to learn
rufflezau
Inserter
Inserter
Posts: 23
Joined: Fri Apr 15, 2016 12:43 am
Contact:

Re: Combinators 101

Post by rufflezau »

Yea way to complex for me requester chests and logistic robots with limits seems to do just as well XD
garlicbug
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Apr 15, 2016 4:27 am
Contact:

Re: Combinators 101

Post by garlicbug »

Thanks for the write-ups, especially to zerohourrct. I signed up to the forums to ask how to make what is basically the Set-Reset switch. Of course, a few minutes ago I realised the problem I was trying to solve would be much better solved by building a better assembly line rather than creating a circuit network, but learning new things is fun :D
User avatar
brunzenstein
Smart Inserter
Smart Inserter
Posts: 1117
Joined: Tue Mar 01, 2016 2:27 pm
Contact:

Re: Combinators 101

Post by brunzenstein »

zerohourrct wrote:
DaveMcW wrote:There should be 2 articles, one on practical ways to integrate combinators into a factory, and one on advanced combinator programming.
Exactly!
I kindly ask you ( I stand for many laymen here who are not born programmer but look for extending their understanding how stuff works) to extend the documentation with real world examples with easy to follow pictures like:

- "I have enough robots so lube production may be reduced"
- "switch chemical production to another product before the whole thing shuts up bcs all tanks are soon becoming full"
- "Power gets low, so switch the auxiliary steam engines on, put a warning light up until the problem is solved, and then shut the helper steam engines down"

Something like that

Thanks in advance.
A lot...
Serenity
Smart Inserter
Smart Inserter
Posts: 1017
Joined: Fri Apr 15, 2016 6:16 am
Contact:

Re: Combinators 101

Post by Serenity »

Even if you've studied computer science and electronics, the way this is implemented in the game is overly complicated once you get beyond the absolute basics. There is a whole layer of abstraction and changes between theory and practice. Some of the signals and conditions have weird names like "anything" instead of "or", "each" instead of "and". Other things aren't straightforward and have to be worked around and implemented with other stuff. It's just confusing.

Also, given how important latches are for advanced circuits, they should just make that its own component. But instead of the RS-FF maybe the JK-FF. That doesn't have the undecided state and can also be used to toggle.
EnderTheXenocide
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sat Apr 02, 2016 6:23 pm
Contact:

Re: Combinators 101

Post by EnderTheXenocide »

I'm trying to figure out a way to use this to make a splitter that uses a different ratio than 1:1

For example, for every 7 plates that come down a belt, I want 6 to move onto one belt, and the 7th to go onto a second belt.

I'm very new to this but did manage to make a setup in which I could fill chests to the desired ratio using arithmetic on the chest quantity. However the system completely falls apart if I want to be able to keep filling the chests to that ratio while also using the stored material. It seems to me that what I really need is a way to respond to inserter events.

Is there a way to do this that isn't really complicated?
Post Reply

Return to “Combinator Creations”