Network Help

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
benai
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Mar 22, 2019 6:53 pm
Contact:

Network Help

Post by benai »

Greetings,
i need help to understand how it works but i want 2 things so far.

On my Science Production and Belt line:
Science Packs should only be craftet when in the chest + belt are less then 200 sciences packs of each one.

Production of plates and Ores:
The plate crafting of Iron and Copper plates should be stopped when a specific amount of place are within the robo chests (nice to overview your amount of things you have). So that the drills deactivate themself and after no ore is on the belt anymore that then also the Furnaces deactivate themself. And go on when the plate limit is reached.
For example i want 40k plates of both in Stock and when they reach 20k the production should start again.

User avatar
Khagan
Fast Inserter
Fast Inserter
Posts: 233
Joined: Mon Mar 25, 2019 9:40 pm
Contact:

Re: Network Help

Post by Khagan »

As a general rule of thumb, the circuit network interacts with distribution and storage rather than with production. You can't use it directly to control the operation of mines, smelters or assemblers. The usual way of turning these off is simply by allowing their output to back up. Expect to have moderate lengths of backed-up belt all over the place.

You can use circuits to control loading of cache or storage chests, with a single wire from the chest to the inserter that is filling it, reading the contents of the chest and activating the inserter only when there are insufficient items stored. It's possible to have further wires from the chest to the belt leading away from it, counting the items on the belt, but why bother? A full output belt has 4 items per lane per cell, so if you really care about the stuff on the belt, allow for that in your chest limit.

An even easier solution for many cases is just to block out most of the stack capacity in the chest. No circuit network required at all! This requires your limiting number to be a whole number of stacks, but usually that's fine.

Serenity
Smart Inserter
Smart Inserter
Posts: 1000
Joined: Fri Apr 15, 2016 6:16 am
Contact:

Re: Network Help

Post by Serenity »

Counting stuff on belts more complicated (at least without hooking up every single piece of belt). But you can simply hook up wires to chests to see what's inside. And you can connect wire to roboports to see what's in an entire logistics network.

To stop miners you could cut the power with a power switch. To stop assemblers from producing turn off the output inserters

You can also stop belts with logic wire. That would stop the movement of items produced before you switched off things

torne
Filter Inserter
Filter Inserter
Posts: 341
Joined: Sun Jan 01, 2017 11:54 am
Contact:

Re: Network Help

Post by torne »

Yeah, as Khagan says you don't really want to turn machines off at all, you want to either not use the circuit network at all and just let belts back up, or control inserters/belts with the circuit network instead. While you *can* turn machines off with power switches, that has several downsides:
- Flashing no power icons over them when they're off
- Consumes more CPU resources: when short on power, machines constantly check to see if there's more power available, whereas when there's no room for them to output they stop consuming CPU time entirely until they get notified that there is room now.
- Irritating to make sure the different parts of your power network actually stay disconnected from each other: it's easy to accidentally place a power pole somewhere that joins two things together, and now the power switch won't work any more :)

Miners in particular have zero power drain when they aren't working, so having them sitting there unable to output because the belts are full of ore doesn't cost any power at all. The one case where cutting the power off often *is* worth it is when you are using late game setups that use a lot of beacons, because beacons consume power at a constant rate even if the machines they affect aren't running at all.

So, yeah, for one example: it sounds like your plates are being put into logistics chests for the roboport network: if you want to limit how many plates will be made in total across the entire network, the simplest way to control that (somewhat imprecisely) is to connect a roboport to one of the segments of belts that is feeding ore into the furnaces, before any of the furnaces, using a circuit wire. The roboport will default to outputting how many of every item you have in the network, so in the settings for the belt, just set it to enable when plates are below whatever number you want. If you have more than one lane of belts feeding the furnaces, you'll have to connect one belt segment on each one. This will simply block any more ore from reaching the furnaces: they will keep running for a while as they'll already have some ore in them/on the belt in front of them, but they'll stop once the short buffer of ore on the belt runs out. The miners will also stop once the belt on the *other* side of the segment you are controlling fills up.

The advantage of doing it this way is that it's very simple to set up (only need to connect to a couple of places, instead of to every single inserter) and it's very efficient for the game: once the buffers run out, all the belts, inserters, and furnaces will be completely idle and will not consume any CPU time any more, and the only thing that will take any time is checking the circuit condition on the segments of belt you are controlling, which there's only a few of.

If you want to control just a single machine the best way is to connect a wire to its output inserter as that gives you more precise control (it will stop as soon as there's just a few completed products backed up inside the machine), but for controlling a whole bunch of identical machines it's usually easier and more efficient to turn the input belt off instead and just let the amount "overshoot" your target a bit.

Post Reply

Return to “Gameplay Help”