One time clock

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
maxp779
Inserter
Inserter
Posts: 45
Joined: Thu Oct 08, 2020 4:39 pm
Contact:

One time clock

Post by maxp779 »

So im trying to get the one time clock mentioned here working:
https://wiki.factorio.com/Tutorial:Comb ... ial#Memory

I cannot figure it out though... What im trying to accomplish is a simple 10 minute countdown (or count up idc) linked to inserters which insert artillery shells into guns of a forward artillery post. I want to give the bots 10 minutes to finish the walls/defences before those guns start firing.

Right now i've got a simple arithmetic combinator linked to itself just counting up from 1. And the inserters activate at 60k. This is around 10 minutes and has worked fine. But the counter keeps on going, it would be good if I could figure out a better timer or something that stops at 60k etc. Any solutions? How do I get that one time clock to work?

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

Re: One time clock

Post by MassiveDynamic »

Use a decider combinator set to x<60000 output x. connect the output to the input connect a constant combinator x=1 to the input It will roll from 1 to 60000 and reset.


Test it yourself using a smaller number... 60 or so and you’ll see.

zaubara
Burner Inserter
Burner Inserter
Posts: 14
Joined: Fri Jan 02, 2015 11:12 am
Contact:

Re: One time clock

Post by zaubara »

For a one-time-counter, use 2 decider combinators: one with x != 0 -> x (input count), the other x < 60000 -> x (1), wire all in- and outputs together.
Activate the inserters from the output of the second combinator, when x = 0.


Yoyobuae
Filter Inserter
Filter Inserter
Posts: 499
Joined: Fri Nov 04, 2016 11:04 pm
Contact:

Re: One time clock

Post by Yoyobuae »

maxp779 wrote:
Fri Oct 30, 2020 11:29 pm
But the counter keeps on going, it would be good if I could figure out a better timer or something that stops at 60k etc. Any solutions?
Let it count forever. The max possible value for a signal is 2147483647.

At 60 per second it will take 1.14 years of running continuously for it to finally overflow. So unless you plan on running Factorio 24/7 for over a year, this is not a problem you should worry about.

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

Re: One time clock

Post by MassiveDynamic »

Or here is one I made for you...

All the instructions are in the Blueprint.



A is the TIMER, L is the LOAD signal. The middle chest will hold 20 items and together with the attached decider combinator will perpetuate the LOAD signal.
Screenshot (55).png
Screenshot (55).png (1.59 MiB) Viewed 2323 times

maxp779
Inserter
Inserter
Posts: 45
Joined: Thu Oct 08, 2020 4:39 pm
Contact:

Re: One time clock

Post by maxp779 »

Awesome, thanks for the blueprints guys! :)

maxp779
Inserter
Inserter
Posts: 45
Joined: Thu Oct 08, 2020 4:39 pm
Contact:

Re: One time clock

Post by maxp779 »

Yoyobuae wrote:
Sat Oct 31, 2020 5:29 am
maxp779 wrote:
Fri Oct 30, 2020 11:29 pm
But the counter keeps on going, it would be good if I could figure out a better timer or something that stops at 60k etc. Any solutions?
Let it count forever. The max possible value for a signal is 2147483647.

At 60 per second it will take 1.14 years of running continuously for it to finally overflow. So unless you plan on running Factorio 24/7 for over a year, this is not a problem you should worry about.
Ah good to know, im a software developer so it kinda bothers me to just leave it running but yeah seems like that's viable since these artillery bases are ultimately temporary. Im enclosing the territory cleared by them in a large perimeter wall.

User avatar
KoblerMan
Fast Inserter
Fast Inserter
Posts: 185
Joined: Sat Mar 05, 2016 12:59 am
Contact:

Re: One time clock

Post by KoblerMan »

maxp779 wrote:
Sat Oct 31, 2020 4:28 pm
Yoyobuae wrote:
Sat Oct 31, 2020 5:29 am
maxp779 wrote:
Fri Oct 30, 2020 11:29 pm
But the counter keeps on going, it would be good if I could figure out a better timer or something that stops at 60k etc. Any solutions?
Let it count forever. The max possible value for a signal is 2147483647.

At 60 per second it will take 1.14 years of running continuously for it to finally overflow. So unless you plan on running Factorio 24/7 for over a year, this is not a problem you should worry about.
Ah good to know, im a software developer so it kinda bothers me to just leave it running but yeah seems like that's viable since these artillery bases are ultimately temporary. Im enclosing the territory cleared by them in a large perimeter wall.
Yes, Factorio uses integer logic for the circuit network. Signed 32-bit to be precise. So, the value range is from -2147483648 to 2147483647.
ImageImage
System Specs
OS: Windows 10 Professional 64 Bit
CPU: AMD Ryzen 5 3600X (@~3.8 gHz)
GPU: Nvidia RTX 2080
RAM: 32GB DDR4 (2400)
DRIVES: 2x 1TB NVMe SSD, 1x 6TB HDD

Post Reply

Return to “Gameplay Help”