Logic Ticks for Factory Cycle

    Joined
    Dec 20, 2014
    Messages
    39
    Reaction score
    2
    I was wondering if anybody has been able to work out how many delay ticks (0.5s) match up to a single factory cycle?

    I've been trying to work it out myself but can't seem to manage it to the accuracy I am looking for. The forums also seem to be absent of the answer (though I may have missed a thread as there seem to be so many for factories and logic)

    I'm trying to build a clock based automated factory, but I keep getting varied production output because the clock timer doesn't line up with the factory tick.
     
    Joined
    Jan 22, 2015
    Messages
    110
    Reaction score
    14
    What are you trying to do that simply chaining factories and storage doesn't accomplish?
     
    Joined
    Dec 20, 2014
    Messages
    39
    Reaction score
    2
    I am trying to build a system that generates multiple block types in a set ratio. In this case I am building all the components for exactly one drone.

    I have a chained factory stacks already producing multi-stage parts, I can activate a chain system of factories with a single activator. I am actually activating multiple independent factory chains with a single activator.

    However I am now at the point where adding in the additional factory enhancers requires many times more blocks than making a clock. if I can work out how many delays represent exactly 1 cycle I can build a clock to manufacture exactly 100 sets of components.

    If I do this using enhancers 2 things happen:
    1/ power consumption is massively increased per cycle.

    If 1 cycle of the factories uses 1k power then we get the following:

    - with 99 enhancers I can get 100 sets of modules in a single factory cycle. This would use approx 100x the amount of power - thus requiring significantly more power storage capacity to deal with the spike in consumption.

    - With no enhancers but a clock set to 100 I get 100 sets of modules in 100 cycles. This would use only 1k power per cycle - thus reducing the spike in the power system. If time is no issue then over all this will use no more power than the enhancer solution but requires less extreme levels of power capacity.
    2/ Simply put it uses less blocks than the enhancer solution.

    As an Example: A simple factory chain that creates 1 advanced armour per cycle has 7 compulsory enhancers simply to keep products and resources in balance. to make 100 per cycle I need 99 factory enhancers for every factory and every compulsory enhancer. This means to build a system that makes 100 advanced armour you need (not including the 7 compulsory enhancers) 1287 enhancers. my clock system uses 166 blocks and I can fix the system with a single additional clock, which is likely to take less than 20 blocks.

    A resource analysis gives me the following:

    Code:
    |     Method Used     |      Resources Required   |
    |Solution    | Blocks | Metal Mesh | Crystal Comp |
    |Enhancers   |  1287  |   64350    |     64350    |
    |Clock       |  186   |    372     |       372    |
    In total I am making a resource profit of 63978 metal mesh and 63978 Cyrstal Comp. To make a production run of 700 I would need to use 699 Enhancers per compulsory unit, and merely include a single additional clock of 22 blocks the above table now changes to:

    Code:
    |     Method Used     |      Resources Required   |
    |Solution    | Blocks | Metal Mesh | Crystal Comp |
    |Enhancers   |  9087  |  454350    |    454350    |
    |Clock       |  208   |    416     |      416     |
    This example shows that the further we go the wider this gap becomes.

    In reality: My savings in terms of blocks and resources are many times that of the original table by a factor of 5 in rough numbers.

    Once you hit the tipping point (which is in my calculations ~200 enhancers for blocks and ~ 8 enhancers for resources) you need to make a choice about speed vs power/resource requirements. It costs more resources and you require vastly more power generation and power capacity to use enhancers beyond the relevant tipping point. But you are increasing waiting times using the clock.

    The Ultimate solution is obviously a mix of the two, want to make 700 Advanced Armour it is far more efficient to use enhancers to make say, 50 at a time and then include the clock to make sure the chain only runs 14 times.




    Having said all that - the clock system depends on knowing how long a factory cycle takes, which is mhy I was asking.

    p.s. I wish there was a table plug in in this forum some times​
     
    Last edited:
    Joined
    Aug 14, 2013
    Messages
    2,811
    Reaction score
    960
    • Councillor 3 Gold
    • Wired for Logic
    • Top Forum Contributor
    my best guess is 4.5 seconds or 9 delays. Storage chests run at 9 second intervals and factories tick twice for every cycle of the chest. You will also need a circuit to synchronize your logic clocks to the factory system, I built one into my auto factories.
     
    Joined
    Jan 22, 2015
    Messages
    110
    Reaction score
    14
    Okay, first the solution to finding your answer:

    (and Sven is prolly right, but you can be sure)

    You can build a logic circuit to time your storage ticks. Put down 2 storage blocks and slave them to each other and set them to pull everything. Throw 1 item into one of them. Doesn't matter which as they'll start tossing it back and forth in a moment once you have everything built.

    Next to one box, put an OR. Next to the other put a NOT. Slave the NOT to the OR. The NOT can't actually read the storage bin, but the OR can. It goes high when something is in it, and off when empty. Now, the NOT's box gets slaved to the OR, and the OR's box to the NOT (cross 'em). Hook a chain of at least 15 delays to either the NOT or the OR.

    Now, turn off the autopull of the box that has that one item in it and wait. You should see the OR and NOT alternating in a really slow clock (useful trick for making long delay clocks that don't use a ton of delay blocks, especially after you run this and know exactly how many delay blocks each storage tick will represent).

    Count the number of delays and throw out one because of how StarMade processes logic ticks and divide by two because you timed storage, not factories. Odds are, you'll count 19 delays lit up, throw out one, have 18 and come up with the 9 that Sven told you.

    You'll also know that the crosswired OR-NOT storage system is a 9.5 second delay :D

    Now, practical advice:

    1. You're not saving enough materials to really matter. 64k of crystal and alloy sounds like a lot until you realize you can get billions of the stuff by eating a single derelict station, or mere tens of millions from eating a large planet plate. I'm not even going to get into loot pinatas which is pretty much the source of all my mats except bulk advanced armor, and I goof around in my station enough that I can just let my plain ordinary 6 at a time factories handle that production between ship ideas that require said armor.

    2. Power per sec on a planet or station, ie. the only places you can put factories, is ridiculously cheap and easy to add.

    Your clock system is cool and I'm totally in favor of building just for that reason, but sheer brute force would have saved you a lot of time and effort and wouldn't really cost you anything in the scheme of things StarMade.
    [DOUBLEPOST=1424836810,1424836723][/DOUBLEPOST]
    Okay, first the solution to finding your answer:

    (and Sven is prolly right, but you can be sure)

    You can build a logic circuit to time your storage ticks. Put down 2 storage blocks and slave them to each other and set them to pull everything. Throw 1 item into one of them. Doesn't matter which as they'll start tossing it back and forth in a moment once you have everything built.

    Next to one box, put an OR. Next to the other put a NOT. Slave the NOT to the OR. The NOT can't actually read the storage bin, but the OR can. It goes high when something is in it, and off when empty. Now, the NOT's box gets slaved to the OR, and the OR's box to the NOT (cross 'em). Hook a chain of at least 15 delays to either the NOT or the OR.

    Now, turn off the autopull of the box that has that one item in it and wait. You should see the OR and NOT alternating in a really slow clock (useful trick for making long delay clocks that don't use a ton of delay blocks, especially after you run this and know exactly how many delay blocks each storage tick will represent).

    Count the number of delays and throw out one because of how StarMade processes logic ticks and divide by two because you timed storage, not factories. Odds are, you'll count 19 delays lit up, throw out one, have 18 and come up with the 9 that Sven told you.

    You'll also know that the crosswired OR-NOT storage system is a 9.5 second delay :D

    Now, practical advice:

    1. You're not saving enough materials to really matter. 64k of crystal and alloy sounds like a lot until you realize you can get billions of the stuff by eating a single derelict station, or mere tens of millions from eating a large planet plate. I'm not even going to get into loot pinatas which is pretty much the source of all my mats except bulk advanced armor, and I goof around in my station enough that I can just let my plain ordinary 6 at a time factories handle that production between ship ideas that require said armor.

    2. Power per sec on a planet or station, ie. the only places you can put factories, is ridiculously cheap and easy to add.

    Your clock system is cool and I'm totally in favor of building just for that reason, but sheer brute force would have saved you a lot of time and effort and wouldn't really cost you anything in the scheme of things StarMade.

    Oh, one last thing...using an OR block to time your factories is prolly way easier than manually clocking. Jus' sayin'.
     
    Joined
    May 8, 2015
    Messages
    4
    Reaction score
    0
    There what it may look like. It's not totally working yet but i'm close to finish this compressed version. I already have a ''easy to build'' version working in the background. It's really a pain to build the compressed one. And thank for the tips with the storage, it will be usefull.
    http://prntscr.com/76m80x
     
    Joined
    May 2, 2015
    Messages
    73
    Reaction score
    22
    A combination of the new JKs and a pulse circuit would be your best bet. JKs make clock systems that are exponential so you can compress the timing a lot with that. You find that type of system in digital clocks in fact.

    Also a cyclic pulse timer (loop timer you normally see in SM) and that JK system can make an even slower timer if you need it. Then you can tie in ANDs to the JKs at points you need. So you can get the system to feed 10 of A (1010), 15 of B (1111), 5 of C (0011). Expand that out with the JK to the next set and you get 32, then 64 and so on in binary fashion.

    No matter what you will have some overages with any timed system in SM. The cycles are not perfect for timing nor is it exactly 4.5/9.0 ratio on the factory to storage. It seems every once in a while I will get 1 production with 1 pull, but never do I get 3 production with 1 pull which shows me the ratio isn't 50%.

    I do like the storage clock method, will need to play with that.
     
    Joined
    Jun 30, 2013
    Messages
    175
    Reaction score
    262
    • Railman
    • Wired for Logic
    • Community Content - Bronze 1
    i base many of my factory operations on a storage clock:

    take two chests, wire them to one another, each set to draw a single item from the other.
    use the empty / not empty indicators to power the alternatating chest, so a never-ending game of "catch" is cycling between them. you can interupt this flow with a quick and gate like any other clock.