I am looking for help with creating volatile memory.
I had this idea about sending filled light-oil barrels to a mining outpost via transport belts and sending the empty barrels back to the oil processing site in the main base via another transport belt. The transport belts are supposed to be set on "PULSE"-setting, and a combinator network is supposed to store the number of barrels that are in transit to and from the mining site. Like this, I could implement an inserter who only puts filled light-oil barrels onto the conveyer belt, if less than 30 barrels are in transit, for example. So I am trying to store a variable named "Barrels in transit" in combinators, which gets increased by 1 every time the output belt detects something rolling over it and which gets decreased everytime the input belt detects a barrel rolling over it.
-> How could I store this variable in combinators? I don't get it.
To have such a thing as volitale memory or EEPROM in my factory I used to give signals into combinators and shut the combinator down via power switch. Like that I made sure he would give his same output from then on, no matter if the input changed, until I would activate the power switch again. I found this to be a kind of workaround over the real way to store values in combinator networks.
I'm wondering how I could do that. I just don't get it. Can someone explain a possible solution, please?
![Confused :?](./images/smilies/icon_e_confused.gif)