Self reseting memory cell

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
PadreSperanza
Inserter
Inserter
Posts: 32
Joined: Sat Apr 01, 2017 6:00 pm
Contact:

Self reseting memory cell

Post by PadreSperanza » Tue Aug 21, 2018 2:22 pm

Hey guys...

I have some logical problems right here.

I want to count an amount of items using an inserter to bring these items on way A,
after this inserter has grabbed 40 items the 41st item should be grabbed by inserter 2.

After this the clock/memorycell should reset itself and go on again. This is what I know about.

Inserter 1 has "read hand contents" on and "enable condition: item < 41".
Inserter 2 has "read hand contents" on and "enable condition: intem >40".
Read mode is both set to pulse.

I use a memory cell wit arithmetic combinater set to "item + 0 -> item"
to this point everything is working quite well.

Next step would be to set decider to "When Item > 41, output Itemcount" to an arithmetic combinator with "item * -1" which should go back to the memory cell.
In theory while all signals are added the itemcount and the itemcount*-1 should give 0. But in fact I get twice the negative amount as result. I have read that this is the clock, which i understand, but how can I do this precisely? I need a solution to handle the clock (and just adding some combinators saying input + 0 -> output doesnt handle the clock) or to give me the possibility to reach this goal... after 4 hours of experimentations I hope you can give me a little slap to the right direction.
I even have read much about take red signal to everything and so on but I have not understood right now how that should work.

thanks

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

Re: Self reseting memory cell

Post by DaveMcW » Tue Aug 21, 2018 2:35 pm

PadreSperanza wrote:I use a memory cell wit arithmetic combinater set to "item + 0 -> item"
The easiest solution is to upgrade to a decider combinator memory cell.
item < 80 → item (input count)

You get the double negative because each combinator adds a 1 tick delay, so the 2nd decider takes 2 ticks to realize the counter was reset.
Last edited by DaveMcW on Tue Aug 21, 2018 2:38 pm, edited 2 times in total.

Nefrums
Inserter
Inserter
Posts: 38
Joined: Mon Jan 01, 2018 12:57 am
Contact:

Re: Self reseting memory cell

Post by Nefrums » Tue Aug 21, 2018 2:36 pm

I think that the problem you have is that the values do not change untill one tick layer then you think. So the combinator that you think outputs -41 for only one tick actually sends this output for three ticks.

I find it helpful to imagine that the signals travel only one step at a time.

PadreSperanza
Inserter
Inserter
Posts: 32
Joined: Sat Apr 01, 2017 6:00 pm
Contact:

Re: Self reseting memory cell

Post by PadreSperanza » Tue Aug 21, 2018 2:47 pm

The easiest solution is to upgrade to a decider combinator memory cell.
item < 80 → item (input count)
But why? I dont understand. I want every 41st item on another side so why item<80?

And the most easiest way is to use one decider with "item % 41" and give on the condition " result < 1" and the other "result > 0".

But in that case I want to know how I can investigate into the steps they need. I learned a lot about digital technologies at university, where everything got cycles and flags and so on but I do not know how to handle them here. And I know that this tick-delay is causing the problem but how to handle it. And how can I reset the timer the way I want or I nearly want to? And I do not understand the every, any and each logic... it's something deifferent to handle bits and complex signals here :P But every help to explain me all this is welcome here :)

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

Re: Self reseting memory cell

Post by DaveMcW » Tue Aug 21, 2018 3:34 pm

Sorry, I thought you wanted the inserters split 40/40. If you want to split 40/1, then < 41 is correct.


User avatar
disentius
Fast Inserter
Fast Inserter
Posts: 154
Joined: Fri May 12, 2017 3:17 pm
Contact:

Re: Self reseting memory cell

Post by disentius » Tue Aug 21, 2018 6:05 pm

sounds like you are up to kovarex enrichment...
anyway, i made this as a concept.
is it what you are after?
Blueprint
Last edited by disentius on Tue Aug 21, 2018 6:59 pm, edited 1 time in total.

PadreSperanza
Inserter
Inserter
Posts: 32
Joined: Sat Apr 01, 2017 6:00 pm
Contact:

Re: Self reseting memory cell

Post by PadreSperanza » Tue Aug 21, 2018 6:57 pm

sounds like you are up to kovarex enrichment, correct?
Could be possible :P. I want to make my own "good" design to have it complex and usefull. I like the creations shown here by others but I really love to create my own stuff and think how to make it more complex, compact and lovly with my touch. And I really like it to handle this without robots. So wild complex spghetti slad is joining the complexity :)
Here's nice tutorial:
True but not explaining how to handle the added ticks as far as i see here
Last edited by PadreSperanza on Tue Aug 21, 2018 7:02 pm, edited 1 time in total.

User avatar
disentius
Fast Inserter
Fast Inserter
Posts: 154
Joined: Fri May 12, 2017 3:17 pm
Contact:

Re: Self reseting memory cell

Post by disentius » Tue Aug 21, 2018 7:00 pm

just edited my post with a working example.
:)
EDIT:
for some different ideas, look here:
viewtopic.php?f=18&t=60169
Last edited by disentius on Tue Aug 21, 2018 7:08 pm, edited 1 time in total.

PadreSperanza
Inserter
Inserter
Posts: 32
Joined: Sat Apr 01, 2017 6:00 pm
Contact:

Re: Self reseting memory cell

Post by PadreSperanza » Tue Aug 21, 2018 7:07 pm

yeah that was the solution I made after my hours of work. Well I did it with modulo operator but it's like the same. But indeed I am looking for a solution to the tick-reset-problem in general

User avatar
disentius
Fast Inserter
Fast Inserter
Posts: 154
Joined: Fri May 12, 2017 3:17 pm
Contact:

Re: Self reseting memory cell

Post by disentius » Tue Aug 21, 2018 7:13 pm

With kovarex, i use a filter inserter to get the U235 out, and read that signal to reset the counter.

PadreSperanza
Inserter
Inserter
Posts: 32
Joined: Sat Apr 01, 2017 6:00 pm
Contact:

Re: Self reseting memory cell

Post by PadreSperanza » Tue Aug 21, 2018 7:49 pm

Well I sort this that way: on top the U38 is arriving bottom lane U35. The yellow Splitters are for sorting out 40 U35 for production and the next U35 for ongoing way (this setup is tileable). So the red bordered splitter is active for 40 items, then the yellow bordered is active for exactly 1. To make it much easier the blue one is going to be active when enough U35 is stacked to let everything else pass by(blue bordered). While the stack inserter (blue) is backing up the U35 to get enough for production first.

This setup is working fine. And I know there is much more complexity and it's much smarter to do but I like this :) But in fact the counter-reset is a faszinationg and even frustrating question I want to get solved :D
Attachments
2018-08-21 21_33_37-Factorio 0.16.51.png
my first trip to enrichment
2018-08-21 21_33_37-Factorio 0.16.51.png (2.92 MiB) Viewed 605 times

User avatar
disentius
Fast Inserter
Fast Inserter
Posts: 154
Joined: Fri May 12, 2017 3:17 pm
Contact:

Re: Self reseting memory cell

Post by disentius » Tue Aug 21, 2018 8:27 pm

Tilable and complicated, with reset?
check :mrgreen:
kovarex.PNG
kovarex.PNG (270.5 KiB) Viewed 600 times
blueprint

User avatar
ElexNeer
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Jan 14, 2019 1:45 am
Contact:

Re: Self reseting memory cell

Post by ElexNeer » Mon Jan 14, 2019 3:39 am

DaveMcW wrote:
Tue Aug 21, 2018 2:35 pm
PadreSperanza wrote:I use a memory cell wit arithmetic combinater set to "item + 0 -> item"
The easiest solution is to upgrade to a decider combinator memory cell.
item < 80 → item (input count)

You get the double negative because each combinator adds a 1 tick delay, so the 2nd decider takes 2 ticks to realize the counter was reset.
You Lord are a genius DaveMcW :shock: . You solved my problem of reseting memory cell 8-) . The simplicity in every one of your builds shows the Genius that you are, be it enrichment or science sushi belt or display screens, etc. THANK YOU for everything Sir.
Q. How can I get better at circuit network :) :?:
Please any tips would be great.

Post Reply

Return to “Gameplay Help”

Who is online

Users browsing this forum: No registered users and 4 guests