Building a smart, automated ammo factory. Help needed on Combinators and RS-Latch.

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
joemcguiregaming
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sun Mar 01, 2020 12:14 am
Contact:

Building a smart, automated ammo factory. Help needed on Combinators and RS-Latch.

Post by joemcguiregaming »

Hello all,

So I've been stuck on this problem for days and finally decided to swallow my pride and ask for help. I'll start with some backstory on my research so that suggestions can hopefully point to things my google-fu has missed. I'd also like to state that this is for the pre-logistic stage of the game, and that personally I'd probably want to use it in the late game as I'm not a huge fan of robots.

I was originally inspired by this youtube video https://www.youtube.com/watch?v=Oa9_dSNrRyY with the idea of creating an ammo factory that would power on and produce ammo when a defence station was in need. I had not used the circuit network before so I figured now was the time to dive in. Originally I had just placed ammo factories in key locations, fed them resources and then filled out the ammo belts. Which of course is incredibly wasteful.

So I built this: https://imgur.com/a/zCJeGMe (I've broken down the constituent parts in the album and included it all in a blueprint)

It works pretty well, there's minimal overflow as the ammo placed on the belt is counted as part of the overall A signal and it can organically add new defence stations to the network. Issues are that the Ammo buffer is manual input, at both the Defence station inserter condition and the factory total demand calculation. I tried to allow for organic input but the signals were getting crossed on the network, so any suggestions on that would be great. I'm also sure it can probably be improved and simplified but I moved focus to the overall point of this post...

But now the goal post of resource waste has shifted from the ammo belt to the factory resource belt. Considering some of these ammo-facs are quite far from the central factory that can be a lot of idle resources going to waste.

So I went hunting around and came across this concept: https://www.youtube.com/watch?v=XP_0YoJQXLs. This to me seems like the perfect answer. However, I can't for the life of me figure out how to get it to work. I've read the wiki on SR-latches. I've watched countless YT tutorials on SR-latches but something is just not making its way into my head and I'm struggling. It's purely the circuit logic for the resource input and the assembly input I can't figure out.

I think it's because every SR-latch tutorial seems to focus on power for steam backup and so when I try to follow the inspirational YT video (which honestly is really not that helpful) I can't seem to map over the idea to just be about inserters and resource numbers.

I appreciate anyone who had read the whole post and those that can help me to understand this zero-waste, resource request circuit based smart factory setup that I've hit a brick wall on trying to understand.

Thank you.


MassiveDynamic
Filter Inserter
Filter Inserter
Posts: 261
Joined: Sun Sep 16, 2018 10:44 pm
Contact:

Re: Building a smart, automated ammo factory. Help needed on Combinators and RS-Latch.

Post by MassiveDynamic »

Are you online now? Can you set up a password protected game where I can take a look?


MassiveDynamic
Filter Inserter
Filter Inserter
Posts: 261
Joined: Sun Sep 16, 2018 10:44 pm
Contact:

Re: Building a smart, automated ammo factory. Help needed on Combinators and RS-Latch.

Post by MassiveDynamic »

I replied to your pm but it seems to be hung up in my outbox.

What game version are you on?

MassiveDynamic
Filter Inserter
Filter Inserter
Posts: 261
Joined: Sun Sep 16, 2018 10:44 pm
Contact:

Re: Building a smart, automated ammo factory. Help needed on Combinators and RS-Latch.

Post by MassiveDynamic »

Is this SR latch what you need?


MassiveDynamic
Filter Inserter
Filter Inserter
Posts: 261
Joined: Sun Sep 16, 2018 10:44 pm
Contact:

Re: Building a smart, automated ammo factory. Help needed on Combinators and RS-Latch.

Post by MassiveDynamic »

Also, here is a slightly simpler, if less capable, version of your ammo supply with limited excess on the belts.


joemcguiregaming
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sun Mar 01, 2020 12:14 am
Contact:

Re: Building a smart, automated ammo factory. Help needed on Combinators and RS-Latch.

Post by joemcguiregaming »

Thanks again for your help, I really appreciate it despite the fact I'm still struggling to figure this out.

Here is my v2 of the Smart Ammo Factory:



Currently it is able to take a single, manual request (the difference 'R' between buffer stock 'T' and current stock 'A', which I'm simulating with constant coms for the moment), convert that into the needed resources (as a negative red signal), whereby the belts will activate and let through the precise amount of resources needed (as a positive green signal) and then produce the correct ammo requested with zero waste.

I had to reduce the number of AP assemblers to two because the 1-3 belt balancers were not balancing the resources, leading to unfinished products. Chests act as a buffer as resources come in quicker than are consumed, which could lead to instances of backing up of the belts and preventing the splitters from working.

The problem is that it works one time. After that the memory cell for the green signal has to be manually reset.

I've spent hours trying to work out a way for automatic resetting, which I thought was what the purpose of RS-latch is for but either I'm extremely stupid, or I just can't get it to work.

I'm aware that I can hook up the input inserters to an arithmatic that outputs a negative value and then feed that into the memory cell. However, doing this will result in a sushi setup whereby the resources will pour in till red + green = 0, and then as each assembler produces a product resources will then trickle in so that the factory is constantly producing, completely ignoring the point of the exercise.

I'm just getting really frustrated. Especially as NegativeRoot in his YT video I linked managed to mostly solve the problem, but did he explain it? No and I haven't been able to reverse-engineer despite hours working on the problem.

Post Reply

Return to “Gameplay Help”