I'm looking for some help regarding combinators
I'm a total noob at this and I know what I want is doable and probably fairly easy for any combinator expert out there
I'm looking to control 2 train signals based on 1 final condition with 2 different timer involved
1 Timer will be a countdown to verify the condition every X amount of time
the other timer is for if the condition is met it will maintain that condition "true" for X amount of seconds
From the pictures below:
Left signal is to be green (unless there is a train in between the 2 or unless it meets my condition to be red)
Right signal is to be red at all time unless it meets my condition
I have 3 constant combinator that I want to use to modify value freely if needed
One on the left is a 10 seconds countdown timer that I want to use to turn ON the right signal green and force the left signal to go red for 10 seconds (or whatever amount of seconds I decide to change on that combinatory)
In other words when my condition is met, I want to allow the train in between the signal to go trough and force the "next train in line" to stop at the left signal (until the 10 seconds timer is over so that both signals changes and allow that next train to place itself between the 2 signals)
One in the middle is a 180 seconds is another countdown timer of 3 minutes that I want to use in this circuit logic to perform a check every 3 minutes
Basically my final condition cannot be met at all time... I want it to be verified only once every 3 minutes (or more... or less depending how I want to tweak it.. but I have to be able to change that timer freely if I need to)
Combinator on the right is currently at R=6. It is what I want to use to verify against the amount of ores on a belt (or multiple belts)... (that is my final condition check)
R for resources and 6 because if the amount of ores fall below that R value then condition is met. I want it to be able to change it freely from the combinatory directly so I could put 4 or 5 or 7 if I want to
In the end you should have guessed it by now... If the amount of ores fall below my variable (3rd combinatory R=6) is want to allow a changeable time of 10 seconds for the train in between the 2 signals to go trough (but blocking all other trains behind) and this check has to be performed every X amount of time (currently set at 3 minutes) because I need to give some time for the extra train in the system to actually grab the stuff and come back to the unloading station before rechecking the ore status again otherwise there would be too much trains sent out in the system while that 1 train does his thing come back with goods
I plan to have ore loading station already set with trains ready to go... just waiting for the "low ore" signals to send them out
hope that make any sense... any questions feel free to ask!
(Image were reversed when I submitted... check them from bottom to top...)
Combinator timer and train signal control help
Combinator timer and train signal control help
- Attachments
-
- 5555.jpg (948.03 KiB) Viewed 4328 times
-
- 555.jpg (835.71 KiB) Viewed 4328 times
-
- 55.jpg (1.26 MiB) Viewed 4328 times
Re: Combinator timer and train signal control help
By default train signal will turn red if the block ahead is occupied by train. If you turn it green you have big chance the train will crash into the other train if he didn't leave the block first.
Not exactly what you want but you'll understand better the combinator. Take a look at balance train station tutorial https://www.youtube.com/watch?v=72dXc23y_rs&t
Not exactly what you want but you'll understand better the combinator. Take a look at balance train station tutorial https://www.youtube.com/watch?v=72dXc23y_rs&t
Re: Combinator timer and train signal control help
Not worried about that...vtx wrote:By default train signal will turn red if the block ahead is occupied by train. If you turn it green you have big chance the train will crash into the other train if he didn't leave the block first.
I'm familiar with how train signals works... If I force once signal to go green there's gonna be at least 1 more signal ahead not to have train crash into another
My point in my scenario is
On the left side of the track is a closed (and controlled) train system which is only a parking lots of trains ready to go into the system (the right side of the track) if needs be based on my condition
what I rly need is the circuit logic for what I described in my first post
-
- Inserter
- Posts: 39
- Joined: Wed Apr 20, 2016 2:12 pm
- Contact:
Re: Combinator timer and train signal control help
I feel that for what you are trying to accomplish that it should be possible, and much easier, to not use timers. It's very rare that timers are the correct solution. You say, "I need to give some time for the extra train in the system to actually grab the stuff and come back", however you shouldn't need a timer for that. You can detect exactly when a train is or isn't in a particular location by checking the various rail signals. If they are all green then the train has left, if they are red then a train is still there. You haven't given enough details for me to say exactly how those checks should work in your situation, but I think it should be possible to do so.
Re: Combinator timer and train signal control help
reallylost
here is a crappy but simple sketch I made so you can understand better what I meant or what I'm trying to do
note that I plan on having a LOT of iron and copper mines / loading stations already setup with train already configured to go there but I want them to remain parked in that closed circuit until it is needed (until my condition is met) which is basically "Ore qty at loading station = low"
Whenever my condition is met and it is sending extra train in the system to grab more ore from completely new loading station... I have to give it some time to load and unload at the station at least once before doing another check. Otherwise It might simply sends multiple trains out... hence probably too much train out there... hence the reason why I'd like a customisable timer where I simply change 1 simple value to modify its time lapse... all the logic would remain the same
Hope it makes more sense now
here is a crappy but simple sketch I made so you can understand better what I meant or what I'm trying to do
note that I plan on having a LOT of iron and copper mines / loading stations already setup with train already configured to go there but I want them to remain parked in that closed circuit until it is needed (until my condition is met) which is basically "Ore qty at loading station = low"
Whenever my condition is met and it is sending extra train in the system to grab more ore from completely new loading station... I have to give it some time to load and unload at the station at least once before doing another check. Otherwise It might simply sends multiple trains out... hence probably too much train out there... hence the reason why I'd like a customisable timer where I simply change 1 simple value to modify its time lapse... all the logic would remain the same
Hope it makes more sense now
- Attachments
-
- 9.jpg (332.66 KiB) Viewed 4154 times
-
- Inserter
- Posts: 39
- Joined: Wed Apr 20, 2016 2:12 pm
- Contact:
Re: Combinator timer and train signal control help
The standard design is to have the trains which are waiting in your "park" on the left to be full of ore already. Then when you detect that your iron is low, one of them can move up and unload immediately. Then it goes off to refill and then comes back to the park to wait again, but it doesn't matter how long it takes. If it takes too long, you just build more trains so there is a larger queue waiting in the "park" (aka, "stacker", as it's usually called by players).
- impetus maximus
- Smart Inserter
- Posts: 1299
- Joined: Sat Aug 20, 2016 10:07 pm
- Contact:
Re: Combinator timer and train signal control help
just a heads up. you can't force a signal to go green if the block ahead of it is occupied by a train. it will remain red.