Page 1 of 1
Self reseting memory cell
Posted: Tue Aug 21, 2018 2:22 pm
by PadreSperanza
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
Re: Self reseting memory cell
Posted: Tue Aug 21, 2018 2:35 pm
by DaveMcW
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.
Re: Self reseting memory cell
Posted: Tue Aug 21, 2018 2:36 pm
by Nefrums
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.
Re: Self reseting memory cell
Posted: Tue Aug 21, 2018 2:47 pm
by PadreSperanza
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

But every help to explain me all this is welcome here

Re: Self reseting memory cell
Posted: Tue Aug 21, 2018 3:34 pm
by DaveMcW
Sorry, I thought you wanted the inserters split 40/40. If you want to split 40/1, then < 41 is correct.
Re: Self reseting memory cell
Posted: Tue Aug 21, 2018 5:30 pm
by darkfrei
Re: Self reseting memory cell
Posted: Tue Aug 21, 2018 6:05 pm
by disentius
sounds like you are up to kovarex enrichment...
anyway, i made this as a concept.
is it what you are after?
Re: Self reseting memory cell
Posted: Tue Aug 21, 2018 6:57 pm
by PadreSperanza
sounds like you are up to kovarex enrichment, correct?
Could be possible

. 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
Re: Self reseting memory cell
Posted: Tue Aug 21, 2018 7:00 pm
by disentius
just edited my post with a working example.

EDIT:
for some different ideas, look here:
viewtopic.php?f=18&t=60169
Re: Self reseting memory cell
Posted: Tue Aug 21, 2018 7:07 pm
by PadreSperanza
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
Re: Self reseting memory cell
Posted: Tue Aug 21, 2018 7:13 pm
by disentius
With kovarex, i use a filter inserter to get the U235 out, and read that signal to reset the counter.
Re: Self reseting memory cell
Posted: Tue Aug 21, 2018 7:49 pm
by PadreSperanza
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

Re: Self reseting memory cell
Posted: Tue Aug 21, 2018 8:27 pm
by disentius
Tilable and complicated, with reset?
check

- kovarex.PNG (270.5 KiB) Viewed 8542 times
Re: Self reseting memory cell
Posted: Mon Jan 14, 2019 3:39 am
by ElexNeer
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

. You solved my problem of reseting memory cell

. 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.