Pulse mode: a good friend or an insidious enemy?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
XKnight
Filter Inserter
Filter Inserter
Posts: 329
Joined: Thu May 28, 2015 10:40 pm
Contact:

Pulse mode: a good friend or an insidious enemy?

Post by XKnight »

At this moment we have two different kind of entities with pulse mode support: all belts and all inserters.
For arithmetic and decider combinators pulse mode is "native" language so they are out of scope.

At the first sight, pulse mode is quite useful thing, using this mode you can connect belt or inserter directly to self-looped combinator (aka memory cell) and measure belt/inserter throughput or count items. Seems useful... but this is a very big illusion. Together with this illusory usefulness you will receive a huge danger.

To prove this I will start from the very beginning (here and everywhere I will talk only about circuit-connectable entities).
All entities can be divided in two groups:
- energy-independent: burner inserter, rail signal, gates, all belts, all chests (read only), storage tank (read only), accumulator (read only), power switch (write only), offshore pump (write only), train stop (write only)
- energy-dependent: combinators, roboport, all inserters, small pump (write only), lamp (write only, but it is safe)
Energy-independent entities are considered as always full-powered.

Energy-dependent entity updates its internal state and output signals according to input signals only if it has enough energy inside internal buffer. For example, if for some reasons you main electricity grid has satisfaction level 33% (this means each combinator will fill its internal buffer only by 33% each tick), combinator will calculate its output signals once per three ticks. But what will happen if pulse signal (from belt for example) is send while combinator is out of energy? Nothing, this signal will be completely ignored and item which triggered this signal won't be counted.

You may say that you have hundreds of accumulators and you will never run out of energy, but this is truth only partially.
Even if you have enough energy stored accumulators energy consumption still may be temporary larger than max discharging rate (for example: 20 laser turrets requires 124,8 MV of energy or 416 accumulators during firing).

So, each time when you connect energy-independent entity to energy-dependent you add some instability to your system.
This instability may vary from very minor (like connecting a lamp directly to belt) to the major (the entire system may be ruined).
The larger the system - the larger destruction.

Even connecting energy-dependent enities between themselfes also may introduce some instability, simple example: inserter with pulse mode is connected to memory cell. On the low energy combinator may be disabled, but inserter still will be able to catch an item and send a pulse signal because its internal buffer is larger. Result is the same - pulse signal is ignored.

Actually, pulse mode is not the main cause of these problems but this mode significanty strengthens them.

It would be great to summarize this short post with some simple rules that can prevent many mistakes, but I didn't find anything similiar and easy in usage. So, here is my three advice for everyone:
- always ask yourself what will happen if you suddenly lose your energy.
- check advice #1 again before using pulse mode with inserters.
- check advice #1 one more time before using pulse mode with belts (they require the strongest ever guarantee from you, and this is often very expensive).
Last edited by XKnight on Thu Sep 15, 2016 12:33 am, edited 3 times in total.

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

Re: Pulse mode: a good friend or an insidious enemy?

Post by DaveMcW »

- Power your combinator computer with an independent solar/accumlator network.

XKnight
Filter Inserter
Filter Inserter
Posts: 329
Joined: Thu May 28, 2015 10:40 pm
Contact:

Re: Pulse mode: a good friend or an insidious enemy?

Post by XKnight »

DaveMcW wrote:- Power your combinator computer with an independent solar/accumlator network.
Do not forget about all inserters near every assembler :D
Also, all pumps and maybe some critical roboports.
BTW, computer is not very interesting... gathering information from your factory and giving orders - this is the very purpose of combinators.

User avatar
Deadly-Bagel
Smart Inserter
Smart Inserter
Posts: 1498
Joined: Wed Jul 13, 2016 10:12 am
Contact:

Re: Pulse mode: a good friend or an insidious enemy?

Post by Deadly-Bagel »

Only combinators need to be on a separate power grid, if the inserters lose power they'll just stop working. There won't be any dropped signals, same for pumps as without power they block the pipes.
Money might be the root of all evil, but ignorance is the heart.

XKnight
Filter Inserter
Filter Inserter
Posts: 329
Joined: Thu May 28, 2015 10:40 pm
Contact:

Re: Pulse mode: a good friend or an insidious enemy?

Post by XKnight »

Deadly-Bagel wrote:Only combinators need to be on a separate power grid, if the inserters lose power they'll just stop working. There won't be any dropped signals, same for pumps as without power they block the pipes.
Unfortunately, inserters have quite big energy buffer and very low drain power (for example: fast inserter has 821W energy buffer, and 500W drain power), so it has plenty time to catch new item (assuming it's full-rotation cycle is 26 ticks).
The same is true for pumps, but as far as I know, no one actually tries to control liquids due to their weirdness, so this issue is not very important.

zebediah49
Fast Inserter
Fast Inserter
Posts: 119
Joined: Fri Jun 17, 2016 8:17 pm
Contact:

Re: Pulse mode: a good friend or an insidious enemy?

Post by zebediah49 »

XKnight wrote:
Deadly-Bagel wrote:Only combinators need to be on a separate power grid, if the inserters lose power they'll just stop working. There won't be any dropped signals, same for pumps as without power they block the pipes.
Unfortunately, inserters have quite big energy buffer and very low drain power (for example: fast inserter has 821W energy buffer, and 500W drain power), so it has plenty time to catch new item (assuming it's full-rotation cycle is 26 ticks).
The same is true for pumps, but as far as I know, no one actually tries to control liquids due to their weirdness, so this issue is not very important.
The point there was that as long as the combinators are battery-backed, it doesn't matter if the inserters are powered or not. If they can move from residual power, great -- the combinators can still track it. If they can't, it's still fine.

-----

This is "gameplay help" rather than "ideas", but what would this thread's opinion of giving combinators a bigger buffer be? If they pull 1kW each, having a 10kJ buffer would be enough to keep them satisfied for 10s without extra power. It wouldn't help with the continual low-power problem (which is honestly kinda "your own fault"), but it would help with huge spike-loads if one is into that sort of thing.

XKnight
Filter Inserter
Filter Inserter
Posts: 329
Joined: Thu May 28, 2015 10:40 pm
Contact:

Re: Pulse mode: a good friend or an insidious enemy?

Post by XKnight »

zebediah49 wrote: The point there was that as long as the combinators are battery-backed, it doesn't matter if the inserters are powered or not. If they can move from residual power, great -- the combinators can still track it. If they can't, it's still fine.
This is true not for all systems. Example: imagine you have a green circuit assembler which is supplied from belt (iron plates) and from inserter (copper wire from the neighbourhood assembler), also some combinator controller with a separate power grid. Naive system may not check has inserter enough energy or not and this can lead to some problems. Controller logic may be: "if assembler is not working and we have iron plates and copper wires, switch on belt and inserter". Result? Belt is completely filled with iron plates.
This problem especially important for circular-belt (closed-loop) factory.
zebediah49 wrote: This is "gameplay help" rather than "ideas", but what would this thread's opinion of giving combinators a bigger buffer be? If they pull 1kW each, having a 10kJ buffer would be enough to keep them satisfied for 10s without extra power. It wouldn't help with the continual low-power problem (which is honestly kinda "your own fault"), but it would help with huge spike-loads if one is into that sort of thing.
The purpose of the initial post is to prevent such kind of mistakes for all players (or at least warn them about this), that's why this is a "gameplay help". 10kJ, 100kJ, 1000kJ this doesn't matter, because moving problems far away won't solve them (and even may introduce several new problems). You can be either ready for them or ready to fix their impacts.

User avatar
Deadly-Bagel
Smart Inserter
Smart Inserter
Posts: 1498
Joined: Wed Jul 13, 2016 10:12 am
Contact:

Re: Pulse mode: a good friend or an insidious enemy?

Post by Deadly-Bagel »

That isn't a problem of lost signals though, it's more like balancing a synchronisation act between your belts and inserters and hope they match up.What if your copper or iron run out? There are loads of things that could go wrong with that. Better to link both inputs to the same system with checks and have some sort of overflow handling if that's still a possibility.
Money might be the root of all evil, but ignorance is the heart.

XKnight
Filter Inserter
Filter Inserter
Posts: 329
Joined: Thu May 28, 2015 10:40 pm
Contact:

Re: Pulse mode: a good friend or an insidious enemy?

Post by XKnight »

Deadly-Bagel wrote:That isn't a problem of lost signals though, it's more like balancing a synchronisation act between your belts and inserters and hope they match up.
As I already mentioned pulse mode is not the main cause of these problems, but it strengthens all of them and make more frequent.
Deadly-Bagel wrote: What if your copper or iron run out? There are loads of things that could go wrong with that. Better to link both inputs to the same system with checks and have some sort of overflow handling if that's still a possibility.
Naive system checks that (...if assembler is not working and we have iron plates and copper wires..).
The true problem in this example is a lack of safe response from executing device back to the controller (don't forget that for simplicitly I selected full-powered controller). The purpose of this example was to show that even full-powered (1000kJ combinator) controller still may be harmed with low energy.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Pulse mode: a good friend or an insidious enemy?

Post by ssilk »

I see this board more as a beginners help-board.
Is this helpful: Yes. But not for beginners. ;)
Maybe... maybe the form is wrong. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

User avatar
Gertibrumm
Fast Inserter
Fast Inserter
Posts: 162
Joined: Fri Jun 03, 2016 6:54 pm
Contact:

Re: Pulse mode: a good friend or an insidious enemy?

Post by Gertibrumm »

So I stumbled upon this problem today when my output was reading 36 instead of 23 which was due to lack of energy in accumulators and unsufficient solar panels.
Only fix is either more stable, even isolated and selfsustained energy supply,
or some way to read accumulator charge and not run the system until suficiently charged

Yoyobuae
Filter Inserter
Filter Inserter
Posts: 499
Joined: Fri Nov 04, 2016 11:04 pm
Contact:

Re: Pulse mode: a good friend or an insidious enemy?

Post by Yoyobuae »

Gertibrumm wrote:So I stumbled upon this problem today when my output was reading 36 instead of 23 which was due to lack of energy in accumulators and unsufficient solar panels.
Only fix is either more stable, even isolated and selfsustained energy supply,
or some way to read accumulator charge and not run the system until suficiently charged
Hmm, I wonder if a circuit contraption could calculate it's own electric energy use down to the Joule level. Would require quite extensive research into energy use of all entities, though.

User avatar
Gertibrumm
Fast Inserter
Fast Inserter
Posts: 162
Joined: Fri Jun 03, 2016 6:54 pm
Contact:

Re: Pulse mode: a good friend or an insidious enemy?

Post by Gertibrumm »

Yoyobuae wrote: Hmm, I wonder if a circuit contraption could calculate it's own electric energy use down to the Joule level. Would require quite extensive research into energy use of all entities, though.
If you only consider 100% electricity supply, then sure! But you would require knowledge of every engaged device + its engagement time down to every tick (powerswitched for everything), every item transfered, every item transformed into a product, all energy drains, etc
Its doable but ill stick to the
Gertibrumm wrote:Only fix is either more stable, even isolated and selfsustained energy supply

Foreros
Fast Inserter
Fast Inserter
Posts: 102
Joined: Mon Jan 09, 2017 11:02 am
Contact:

Re: Pulse mode: a good friend or an insidious enemy?

Post by Foreros »

Self sustained computer energy solar/battery, but not only.
IMHO, add a double check on belt and inserter putting a stop before the inserter place. If there are less thing by inserter, the belt stop, if the belt is sending less materials, then the inserter stop.
Can be done with a few combinators or a single one.
You made the calc, then if the result is greater than 1 it will stop inserter, otherwise stop belt.
If one or both is stopped, by energy or production halt, then the whole system will stop.
Are you making circuits? Then the calc is "if 2*copper plate-3*iron plate/2>1" stop copper plate belt, if <1 stop iron inserter, if =1, let both go.
Want have better "flexibility"? you can change the value on 0,5 and 1,5 for let you play with few errors, but you need to reset the cunter when it go over a certain amount or your count can give you even 1000 plates of floating value. :P

Post Reply

Return to “Gameplay Help”