Stop Watch / Count / Reset

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
mFokus
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Jul 23, 2022 12:32 pm
Contact:

Stop Watch / Count / Reset

Post by mFokus »

Hi,

I am new to the Forum but have some 1,400 hours experience playing Factorio.
So far, I have made very limited use of circuit networks. A little counting to activate belts and inserters, that's all.
I have now started looking into timers and counters and encountered some issues.

This is, what I have:

Code: Select all

0eNrNmM1uqzAQhd9l1qQKDoQf5e66yKardldFiIDTWgKDjIluFPHuHUNvFW4UgoGKSBGSzczx2J+jOeIM+6SkuWBcgn8GFmW8AP/9DAX74GGi5uQpp+ADkzQFA3iYqlFMIxZTsYiydM94KDMBlQGMx/Qv+Ga1M4ByySSjjVo9OAW8TPdUYECXjgF5VmBqxtXqKLcwV5YBJ/AJMZ9sXCZmgkZNADEAS5YiS4I9/QyPDAUw61s2wHdxLVWo2QMThQyudnZkQpY481NUE7F4U1tSByJDdTrrpRqleSjqMn34gxlZKfNSQ/O10cxPWFrJZXAQWRowjhrgH8KkoFWzJm82WJdtqseHoJRfniWLsSSMZSIqmayHpNphNrkZ7rTDEVOFy13RIbp0yBx0Xn+BzsukdBw9Om4/OitdOss56Lz8Ap3tpHRcPTpePzqWJh3izkFn26ZDrAnoPE9Kx9OjYy774bF/qv63+3v/HufJ/iZEehI6sERScaOL3uk1pcJhXjbSEe3g1iGsh3Zf8kjddzPgjr513FEpypHN12i9tu9c2StY7XSzH0tnaK8mj9SrNxM7KW2WTjdLc6TPaquRfmjdoY2ePFKj30xsw7TRut1oyUiT1lZb9UPrDXUJZEaXMAna7ZRovW60q5EOr61m9UOrnIge2/UcbJ/vOMDNxA5Qm+3/jo504xhmEHdG81nDv/gKYsAR3VsDwDUtxyOOvcaf5VbVF5sT41Y=
This inserts ticks (T) and gives seconds (S), minutes (M), hours (H) and days (D):

Image

Here is what I want to do with this:
  • Start the timer with some input. I will probably use a crate as trigger (something is in crate = run, crate is empty = reset timer).
  • Stop the timer when a certain quantity of a certain element is reached.
  • Reset the clock (T=0, S=0, M=0, H=0, D=0) when said crate is emptied (or any other mechanism, if that's easier).
I hope this makes sense. Sitting at home with Covid at not quite on top...

Thanks!
Amarula
Filter Inserter
Filter Inserter
Posts: 551
Joined: Fri Apr 27, 2018 1:29 pm
Contact:

Re: Stop Watch / Count / Reset

Post by Amarula »

You may find the wiki tutorial helpful: https://wiki.factorio.com/Tutorial:Comb ... sic_clocks
My own personal Factorio super-power - running out of power.
mFokus
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Jul 23, 2022 12:32 pm
Contact:

Re: Stop Watch / Count / Reset

Post by mFokus »

Thanks @amurala.
Here again, I only see a solution for resetting and immediately restarting the timer. I have that implemented for the minutes / seconds calculations.
I am looking for a solution to pause the clock and reset it when I decide to start over.
Or am I misinterpreting the tutorial?
asheiduk
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Sat Dec 05, 2020 9:46 am
Contact:

Re: Stop Watch / Count / Reset

Post by asheiduk »

A quick idea is this:


stopableclock.gif
stopableclock.gif (61.09 KiB) Viewed 2529 times
C=Counter/Clock
T=Tick (1: Clock is running, 0: Clock is stopped)
R=Reset (0: Clock is running, !=0: Reset counter)

Another quick idea: I think it is easier to have simple counter which is incremented. The HH:MM:SS conversion can be done after that by simple modulo calculations.
Post Reply

Return to “Gameplay Help”