Self reseting memory cell
-
- Inserter
- Posts: 33
- Joined: Sat Apr 01, 2017 6:00 pm
- Contact:
Self reseting memory cell
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
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
The easiest solution is to upgrade to a decider combinator memory cell.PadreSperanza wrote:I use a memory cell wit arithmetic combinater set to "item + 0 -> item"
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.
Re: Self reseting memory cell
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.
I find it helpful to imagine that the signals travel only one step at a time.
-
- Inserter
- Posts: 33
- Joined: Sat Apr 01, 2017 6:00 pm
- Contact:
Re: Self reseting memory cell
But why? I dont understand. I want every 41st item on another side so why item<80?The easiest solution is to upgrade to a decider combinator memory cell.
item < 80 → item (input count)
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
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
sounds like you are up to kovarex enrichment...
anyway, i made this as a concept.
is it what you are after?
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.
-
- Inserter
- Posts: 33
- Joined: Sat Apr 01, 2017 6:00 pm
- Contact:
Re: Self reseting memory cell
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 complexitysounds like you are up to kovarex enrichment, correct?
True but not explaining how to handle the added ticks as far as i see hereHere's nice tutorial:
Last edited by PadreSperanza on Tue Aug 21, 2018 7:02 pm, edited 1 time in total.
Re: Self reseting memory cell
just edited my post with a working example.
EDIT:
for some different ideas, look here:
viewtopic.php?f=18&t=60169
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.
-
- Inserter
- Posts: 33
- Joined: Sat Apr 01, 2017 6:00 pm
- Contact:
Re: Self reseting memory cell
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
With kovarex, i use a filter inserter to get the U235 out, and read that signal to reset the counter.
-
- Inserter
- Posts: 33
- Joined: Sat Apr 01, 2017 6:00 pm
- Contact:
Re: Self reseting memory cell
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
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
- Attachments
-
- my first trip to enrichment
- 2018-08-21 21_33_37-Factorio 0.16.51.png (2.92 MiB) Viewed 7473 times
Re: Self reseting memory cell
Tilable and complicated, with reset?
check
check
blueprint
Re: Self reseting memory cell
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.DaveMcW wrote: ↑Tue Aug 21, 2018 2:35 pmThe easiest solution is to upgrade to a decider combinator memory cell.PadreSperanza wrote:I use a memory cell wit arithmetic combinater set to "item + 0 -> item"
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.
Q. How can I get better at circuit network
Please any tips would be great.