Pulse mode: a good friend or an insidious enemy?
Pulse mode: a good friend or an insidious enemy?
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).
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.
Re: Pulse mode: a good friend or an insidious enemy?
- Power your combinator computer with an independent solar/accumlator network.
Re: Pulse mode: a good friend or an insidious enemy?
Do not forget about all inserters near every assemblerDaveMcW wrote:- Power your combinator computer with an independent solar/accumlator network.
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.
- Deadly-Bagel
- Smart Inserter
- Posts: 1498
- Joined: Wed Jul 13, 2016 10:12 am
- Contact:
Re: Pulse mode: a good friend or an insidious enemy?
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.
Re: Pulse mode: a good friend or an insidious enemy?
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).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.
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.
-
- Fast Inserter
- Posts: 122
- Joined: Fri Jun 17, 2016 8:17 pm
- Contact:
Re: Pulse mode: a good friend or an insidious enemy?
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.XKnight wrote: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).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.
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.
-----
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.
Re: Pulse mode: a good friend or an insidious enemy?
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.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 problem especially important for circular-belt (closed-loop) factory.
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.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.
- Deadly-Bagel
- Smart Inserter
- Posts: 1498
- Joined: Wed Jul 13, 2016 10:12 am
- Contact:
Re: Pulse mode: a good friend or an insidious enemy?
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.
Re: Pulse mode: a good friend or an insidious enemy?
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: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.
Naive system checks that (...if assembler is not working and we have iron plates and copper wires..).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.
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.
Re: Pulse mode: a good friend or an insidious enemy?
I see this board more as a beginners help-board.
Is this helpful: Yes. But not for beginners.
Maybe... maybe the form is wrong.
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...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
- Gertibrumm
- Fast Inserter
- Posts: 162
- Joined: Fri Jun 03, 2016 6:54 pm
- Contact:
Re: Pulse mode: a good friend or an insidious enemy?
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
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
Re: Pulse mode: a good friend or an insidious enemy?
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.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
- Gertibrumm
- Fast Inserter
- Posts: 162
- Joined: Fri Jun 03, 2016 6:54 pm
- Contact:
Re: Pulse mode: a good friend or an insidious enemy?
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, etcYoyobuae 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.
Its doable but ill stick to the
Gertibrumm wrote:Only fix is either more stable, even isolated and selfsustained energy supply
Re: Pulse mode: a good friend or an insidious enemy?
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.
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.