Count items on the belt?
Count items on the belt?
New Player here, yeah!!
I come from the wiki and the FAQ and I'm unsure about this one thing right now: Belts and the wire Network, there seems to be no direct way to know how many items are on a belt? The Network only knows about chests? Is that correct?
What confuses me is the tooltip shown here in the Picture that says "items on the belt". So I expect the number at the moment to be 10 (or '4' in the second pic). But the connected inserter above continues to place items on the belt although it should only be enabled if "iron plates < 1" - (belt empty)
Whats up with counting items on a belt, i.e. to achieve a max. certain number of items going around?
thanks
I come from the wiki and the FAQ and I'm unsure about this one thing right now: Belts and the wire Network, there seems to be no direct way to know how many items are on a belt? The Network only knows about chests? Is that correct?
What confuses me is the tooltip shown here in the Picture that says "items on the belt". So I expect the number at the moment to be 10 (or '4' in the second pic). But the connected inserter above continues to place items on the belt although it should only be enabled if "iron plates < 1" - (belt empty)
Whats up with counting items on a belt, i.e. to achieve a max. certain number of items going around?
thanks
-
- Filter Inserter
- Posts: 952
- Joined: Sat May 23, 2015 12:10 pm
- Contact:
Re: Count items on the belt?
The reader only looks at the belt segment it is on. The item will move way from the reader and let the inserter activate again.
The inside of a corner belt is a very small space to put items, so the belt needs to be pretty saturated to stop the inserter inserting.
The inside of a corner belt is a very small space to put items, so the belt needs to be pretty saturated to stop the inserter inserting.
Re: Count items on the belt?
Read belt contents read the contents that particular piece of belt. If you want the contents of the multiple pieces of belt you need to wire each individual piece into the circuit network.
Edit: It's also possible to wire up the inserters adding/removing things from a belt, and using that and some combinators, calculate how many items are on the belt that way
Edit: It's also possible to wire up the inserters adding/removing things from a belt, and using that and some combinators, calculate how many items are on the belt that way
Last edited by Zavian on Tue Nov 21, 2017 2:45 pm, edited 1 time in total.
Re: Count items on the belt?
As it was said. Circuit connector on a belt operates only on the tile it is on. So it will read the contents on this particular belt tile which can hold maximum of 8 items when fully saturated. Also if you want to stop the belt it will stop only this tile allowing rest of the belts move freely and items will just stop right before this belt piece like it is not there.
With inserters be aware that it makes its decision on making its move BEFORE it moves and it will not stop if its condition has become false while doing so. This can lead to undesirable result for you as you are using burner inserter in this case which is painfully slow.
If you need to count items on all the belts on a certain path you have to make circuit connections on them all chain connecting them up to your inserter.
With inserters be aware that it makes its decision on making its move BEFORE it moves and it will not stop if its condition has become false while doing so. This can lead to undesirable result for you as you are using burner inserter in this case which is painfully slow.
If you need to count items on all the belts on a certain path you have to make circuit connections on them all chain connecting them up to your inserter.
- impetus maximus
- Smart Inserter
- Posts: 1299
- Joined: Sat Aug 20, 2016 10:07 pm
- Contact:
Re: Count items on the belt?
as Zavian said, you can use combinators to keep track of the belt's contents.
have the inserters that are placing/picking set to 'read hand contents' 'pulse'.
wire the inserter placing to the belt, to the input of an arithmetic that's set to *each +0 *each.
wire the output of that combinator to it's own input (making a memory cell).
wire the inserter taking from the belt (again read/pulse on the inserter) to a second arithmetic combinator
set to *each *(mulitply) by -1 so it subtracts what is taken from the belt.
then wire it to the 'memory cell's' input.
*Nixie Tube Mod use for the numbers shown (not used in blueprint)
mouse over the poll to see the item count.
since it uses *each it can track multiple types of items with a single memory cell.
[edit] of course this is kind of a bad example since the burner inserters will count the fuel they used.
have the inserters that are placing/picking set to 'read hand contents' 'pulse'.
wire the inserter placing to the belt, to the input of an arithmetic that's set to *each +0 *each.
wire the output of that combinator to it's own input (making a memory cell).
wire the inserter taking from the belt (again read/pulse on the inserter) to a second arithmetic combinator
set to *each *(mulitply) by -1 so it subtracts what is taken from the belt.
then wire it to the 'memory cell's' input.
*Nixie Tube Mod use for the numbers shown (not used in blueprint)
mouse over the poll to see the item count.
0.15.37 blueprint string
you can then track what is currently on the belt.since it uses *each it can track multiple types of items with a single memory cell.
[edit] of course this is kind of a bad example since the burner inserters will count the fuel they used.
Re: Count items on the belt?
PacifyerGrey wrote: Circuit connector on a belt operates only on the tile it is on.
Ok, I was afraid that this would be the actual case here. So I have to implement my Loop differently.
Nice example @Impetus maximus, thanks
- impetus maximus
- Smart Inserter
- Posts: 1299
- Joined: Sat Aug 20, 2016 10:07 pm
- Contact:
Re: Count items on the belt?
you're welcome.
Re: Count items on the belt?
Check out Siggboys rolling average for belt throughput. viewtopic.php?f=193&t=29679
My Mods: mods.factorio.com
Re: Count items on the belt?
In an example like that, you could also wire the entire belt. I realize that it might not work well on a larger scale, but in a small loop like this it should work.
There are 10 types of people: those who get this joke and those who don't.
Re: Count items on the belt?
I use a similar setup for a science sushi belt:
Connect the 10 belt segments before the inserter to the inserter. Set condition to "xy < 10".That works pretty well if it's not important how many items are exactly on the loop. I do this with 6 inserters for 6 differnt science packs. On 10 segments fit 70 items. That leaves 10 open spaces which suffices to avoid a jam.
Connect the 10 belt segments before the inserter to the inserter. Set condition to "xy < 10".That works pretty well if it's not important how many items are exactly on the loop. I do this with 6 inserters for 6 differnt science packs. On 10 segments fit 70 items. That leaves 10 open spaces which suffices to avoid a jam.
Re: Count items on the belt?
I did the same for a sushi science belt with a twist. Have a loop with fast transport belts (red) and all the science labs. Then at one end wire up 10 segments like you did, then one yellow transport belt and then the inserters. The yellow transport belt slows down the loop, causing unused science packs to collect before it. Hopefully there aren't many since the science labs should be using most of them before that point.Bauer wrote:I use a similar setup for a science sushi belt:
Connect the 10 belt segments before the inserter to the inserter. Set condition to "xy < 10".That works pretty well if it's not important how many items are exactly on the loop. I do this with 6 inserters for 6 differnt science packs. On 10 segments fit 70 items. That leaves 10 open spaces which suffices to avoid a jam.
This gives a better count of what is on the belt in excess and allows other science packs to be inserted inbetween them. For example when you switch to something requiring only red science and 70 green science packs collect before the yellow transport belt then after the inserters you will have 50% green science packs on the loop and up to 50% red science packs depending on your inserter speed and number.
Re: Count items on the belt?
That's a neat idea. I use blue belts for max throughput, though. I just don't want things to slow down. (Things tend to be too small, too slow, too little in factorio too quickly anyway.)mrvn wrote:I did the same for a sushi science belt with a twist. Have a loop with fast transport belts (red) and all the science labs. Then at one end wire up 10 segments like you did, then one yellow transport belt and then the inserters. The yellow transport belt slows down the loop, causing unused science packs to collect before it. Hopefully there aren't many since the science labs should be using most of them before that point.Bauer wrote:I use a similar setup for a science sushi belt:
Connect the 10 belt segments before the inserter to the inserter. Set condition to "xy < 10".That works pretty well if it's not important how many items are exactly on the loop. I do this with 6 inserters for 6 differnt science packs. On 10 segments fit 70 items. That leaves 10 open spaces which suffices to avoid a jam.
This gives a better count of what is on the belt in excess and allows other science packs to be inserted inbetween them. For example when you switch to something requiring only red science and 70 green science packs collect before the yellow transport belt then after the inserters you will have 50% green science packs on the loop and up to 50% red science packs depending on your inserter speed and number.
As long as all labs are working, there is no danger for a dead-lock situation anyway. But you will run short of one kind of science packs sooner or later. It's then when it's important to have sufficiently gaps on the belt once the missing packs come again. With blue belts you need stack inserters. I recomment to carefully adjust the stack size and use a splitter to forge the new science packs into the loop. The same splitter can be used for lane balancing.
Re: Count items on the belt?
Or you can use belts to side feed science packs and wire them to stop when the counting segments show > 10 items already. But be sure to use slower belts so one type doesn't fully saturate the loop.Bauer wrote:That's a neat idea. I use blue belts for max throughput, though. I just don't want things to slow down. (Things tend to be too small, too slow, too little in factorio too quickly anyway.)mrvn wrote:I did the same for a sushi science belt with a twist. Have a loop with fast transport belts (red) and all the science labs. Then at one end wire up 10 segments like you did, then one yellow transport belt and then the inserters. The yellow transport belt slows down the loop, causing unused science packs to collect before it. Hopefully there aren't many since the science labs should be using most of them before that point.Bauer wrote:I use a similar setup for a science sushi belt:
Connect the 10 belt segments before the inserter to the inserter. Set condition to "xy < 10".That works pretty well if it's not important how many items are exactly on the loop. I do this with 6 inserters for 6 differnt science packs. On 10 segments fit 70 items. That leaves 10 open spaces which suffices to avoid a jam.
This gives a better count of what is on the belt in excess and allows other science packs to be inserted inbetween them. For example when you switch to something requiring only red science and 70 green science packs collect before the yellow transport belt then after the inserters you will have 50% green science packs on the loop and up to 50% red science packs depending on your inserter speed and number.
As long as all labs are working, there is no danger for a dead-lock situation anyway. But you will run short of one kind of science packs sooner or later. It's then when it's important to have sufficiently gaps on the belt once the missing packs come again. With blue belts you need stack inserters. I recomment to carefully adjust the stack size and use a splitter to forge the new science packs into the loop. The same splitter can be used for lane balancing.
- impetus maximus
- Smart Inserter
- Posts: 1299
- Joined: Sat Aug 20, 2016 10:07 pm
- Contact:
Re: Count items on the belt?
<off topic> what is wrong with long handed inserters for science?
or belt weaving if you are feeling hackish?
or belt weaving if you are feeling hackish?
Re: Count items on the belt?
7 science packs, 2 sides per belt, 2 belts, you do the math.impetus maximus wrote:<off topic> what is wrong with long handed inserters for science?
or belt weaving if you are feeling hackish?
I have a loop with science packs feeding into science labs. Then 4 more rows of science labs that feed from the previous row. So putting 2 belts on each side of the labs is impractical. Makes for a very compact science setup.
Re: Count items on the belt?
Well, you can do 3 belts, and underground belts to access the far side with long handed inserters. 3 time 2 is still not 7.mrvn wrote:7 science packs, 2 sides per belt, 2 belts, you do the math.impetus maximus wrote:<off topic> what is wrong with long handed inserters for science?
or belt weaving if you are feeling hackish?
I have a loop with science packs feeding into science labs. Then 4 more rows of science labs that feed from the previous row. So putting 2 belts on each side of the labs is impractical. Makes for a very compact science setup.
Belt weaving forces you to use red and/or yellow belts. I hate this slow stuff. Have you seen a yellow belt moving at 13 UPS? I have no such patience.
On the other hand. Due to UPS limitation I switched to bot logistics for science a while ago.
If you want a resource efficient mathod, go for the sushi belt.
- impetus maximus
- Smart Inserter
- Posts: 1299
- Joined: Sat Aug 20, 2016 10:07 pm
- Contact:
Re: Count items on the belt?
or cart it in.Bauer wrote: If you want a resource efficient mathod, go for the sushi belt.
cart science belt
Re: Count items on the belt?
I wrote this viewtopic.php?f=93&t=25959 many versions ago. It became mostly obsolete when they added the option to directly read one belt tile to the circuit network, so I stopped updating it. Also because they never added an easy way to find all the connected belts, so 99% of the mod code is just the "follow the belt network and update a cache of connected belts" part and I hated debugging that part.