Need help with setting a contidition for an inserter and a train

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Guimdefreitas
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Apr 29, 2020 12:17 am
Contact:

Need help with setting a contidition for an inserter and a train

Post by Guimdefreitas »

Hello and thank for reading this. I've been setting up my base and so on for some time and the initial ore patches are running out, therefore I made a train line, properly set up and defended to a large ore patch a little ways from the main body of my base. However, this new mining outpost is relatively close to a few biter nests and I don't want to go bug hunting, so I set up some turrets and got on the process of giving them a constant supply of ammo, which I thought of using the same train that is carrying the ore to the main base.
Having explained that, here come my problem. I'm not to knowledgeable regarding logic systems but thought it would be easier than timing the correct time for only the amount of ammo I desire to be loaded into the cargo wagon. I connected a green cable from the fast inserter, that was feeding the ammo and had the condition set properly, to the station said train was going to be stopped at, ticking the box so that the station read the contents of the train and sent of the signal. Yet, the fast inserter seems to ignore this and keep trying to fully load the wagon and not only the amount I requested it put inside de wagon. Any thoughts on how to solve this ? Is it a bug or just a rookie mistake ? Thank you kindly.
Serenity
Smart Inserter
Smart Inserter
Posts: 1017
Joined: Fri Apr 15, 2016 6:16 am
Contact:

Re: Need help with setting a contidition for an inserter and a train

Post by Serenity »

The easiest way is to not use the logic system, but to filter the cargo wagon for specific items

Otherwise, reading train contents doesn't work in manual mode

In general I'd recommend a dedicated defense supply train though. Because you will have other outposts later. Also sections of wall. And you also need to supply things like repair packs, walls and turrets. You just need a 1-1 or 1-1-1 train.
Guimdefreitas
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Apr 29, 2020 12:17 am
Contact:

Re: Need help with setting a contidition for an inserter and a train

Post by Guimdefreitas »

It is still relatively early game so nothing too fancy yet. I don't have a problem regarding what goes in or out of the wagon, just the quantity in which it goes into the wagon, if that's what you are thinking;.
Serenity
Smart Inserter
Smart Inserter
Posts: 1017
Joined: Fri Apr 15, 2016 6:16 am
Contact:

Re: Need help with setting a contidition for an inserter and a train

Post by Serenity »

Guimdefreitas wrote: Thu Jul 09, 2020 1:00 pm It is still relatively early game so nothing too fancy yet
It's easy to set up a dedicated train even then. Roboports and logistics chests can be added later. It also means you don't need filter inserters to unload the ore (although that can be useful to prevent the wrong stuff from being unloaded in general).
I don't have a problem regarding what goes in or out of the wagon
There isn't really a difference. Filtering the slots means you can determine the amount by the number of stacks. So you load 1 or 2 stacks of ammo for example
Guimdefreitas
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Apr 29, 2020 12:17 am
Contact:

Re: Need help with setting a contidition for an inserter and a train

Post by Guimdefreitas »

I set it to have two slots dedicated to the ammo. The problem is the inserter keeps inserting after the two slots are fully packed.
Amarula
Filter Inserter
Filter Inserter
Posts: 542
Joined: Fri Apr 27, 2018 1:29 pm
Contact:

Re: Need help with setting a condition for an inserter and a train

Post by Amarula »

Guimdefreitas wrote: Thu Jul 09, 2020 2:04 pm I set it to have two slots dedicated to the ammo. The problem is the inserter keeps inserting after the two slots are fully packed.
Any slots that are not filtered are considered open and able to take anything, including more ammo. The rest of the wagon needs to be filtered so it only takes ore or plates whichever you sending back from the outpost, then the inserter will not be able to load any more. The easiest way is to fill up the wagon and then middle click, that automatically sets the filter to the current contents.
My own personal Factorio super-power - running out of power.
hale42
Inserter
Inserter
Posts: 32
Joined: Tue Apr 03, 2018 6:26 am
Contact:

Re: Need help with setting a contidition for an inserter and a train

Post by hale42 »

from the station (with read contents checked) have a arithmetic combinator set to "each *-1" and output "each" then hook that up with the inserter and set it to enable if less than desired amount. still filter at least one slot for ammo.

another way (better i think)

from station to arithmetic combinator each times -1 output each then constant combi set to a positive amount hooked to the insterter then set the inserter to enable when <0 ammo

so the end result,

ammo in train is 150
desired amount is 200
constant combinator is set to 200

before the train gets to station the inserter is off (this is important so it doesn't auto load before the conditions are met/checked)
the train contents show 150 then it hits the arithmetic combinator and the signal changes to -150 and is sent to the inserter/constant
the signals combine at the inserter to get -50 the inserters condition is met and is enabled (override stack size to 1 if you want to really be accurate)
Last edited by hale42 on Mon Jul 13, 2020 12:15 pm, edited 1 time in total.
MassiveDynamic
Filter Inserter
Filter Inserter
Posts: 261
Joined: Sun Sep 16, 2018 10:44 pm
Contact:

Re: Need help with setting a contidition for an inserter and a train

Post by MassiveDynamic »

What they said is your answer. Also, you might need a second inserter to load/unload the other items in/out of that wagon.
Post Reply

Return to “Gameplay Help”