Hello,
I'm currently trying to build a few blueprintable circuit items. One of these is a memory cell that can hold any signal (except two that are needed for logic). I made a working prototype that I now try to rebuild in a more compact way but it doesn't work as the other does. Since this design depends on very specific timing and signal pulse length it is impossible to do it at 60 ticks/s because the entire thing is done withing 5 ticks. I tried /c game.speed = 0.01 which helps but is not quite enough because comparing the state of different circuit pathways would require a pause function. Now my question: is there a mod that could change game speed even lower or pause it all together? Possibly without lowering the FPS. Maybe there should be a special dimension (like the inside of a Factorissimo building) that has different circuit behavior which allows detailed circuit analysis. If it is not possible yet then maybe this should become a feature in an upcoming version.
[Circuit Network] Speed and Debugging
-
- Inserter
- Posts: 24
- Joined: Mon Jan 26, 2015 3:32 pm
- Contact:
Re: [Circuit Network] Speed and Debugging
You might be able to build a debugger circuit actually...
You can halt the execution of your circuit by disconnecting the power. And you can connect a power switch to a circuit network to halt on a specific condition (Like a "breakpoint" in a software debugger). Of course, when you disconnect the power your memory cells will be erased too, so you need to either move those or connect additional memory cells outside on a different power network. Then you can freeze it, check the values in memory, then reconnect the power again. Or you could put the power switch on a clock and only enable it one out of every 'x' ticks to run it as slow as you want.
Here's a simple example using a circuit that just counts items passing on a belt, see if you can adapt this for what you need. Connect power at the top and put items in the box on the right, the belt reads in pulse mode, and the arithmetic combinator at the bottom counts them using "Each + 0 = Each". The power switch is enabled when stone = 0, so once it counts a stone it will cut the power, and you can check the value of the memory in the debugger at the top (another arithmetic combinator with Each + 0 = Each but on a separate power network).
You can halt the execution of your circuit by disconnecting the power. And you can connect a power switch to a circuit network to halt on a specific condition (Like a "breakpoint" in a software debugger). Of course, when you disconnect the power your memory cells will be erased too, so you need to either move those or connect additional memory cells outside on a different power network. Then you can freeze it, check the values in memory, then reconnect the power again. Or you could put the power switch on a clock and only enable it one out of every 'x' ticks to run it as slow as you want.
Here's a simple example using a circuit that just counts items passing on a belt, see if you can adapt this for what you need. Connect power at the top and put items in the box on the right, the belt reads in pulse mode, and the arithmetic combinator at the bottom counts them using "Each + 0 = Each". The power switch is enabled when stone = 0, so once it counts a stone it will cut the power, and you can check the value of the memory in the debugger at the top (another arithmetic combinator with Each + 0 = Each but on a separate power network).
Code: Select all
0eNrlltuOmzAQht/Ft4UV5pBNkPok1QoZmCyWwEb2kG0U8e6144bQ4mRhe9kbED58Hv+e38OFlO0AveICSX4hvJJCk/zHhWj+Llhr2/DcA8kJR+hIQATr7NeRaQxRMaF7qTAsoUUyBoSLGn6SnI7Bp4RefoAK9QfHqplNjce3gIBAjhxcJNePcyGGrgRl2BOBKY5NB8irsJJdyQVDqcwCvdRmthR2aUMM44CczSt9ycwyZoOoZFuU0LATN+PNoDuoMN31dbK2HUeuNBaLjZy4wsG0TJG4ESEwtxUrIjKraBQQ2YNiLhzyzUyRA/bDZujosAKqKThqH+8KQMxl4rWRKDWDuaoGju57fLOAhZTxtFYHNR+6EFrDV0bPXrbgUTJxSmY+WLIRtnvCSicWFxoUgu9YfwNio0zNlRPG5s8Sl901RYA2rBrQ6CG+3ogexu5p6i9ZmTe6nYf8upGcribvN5KT1eTDRnLsJ/vteEtdEKxsoai5tm+SH1mr4Z7ZClhdNEzU1rRoAjSuQDXMRtza3dBO1gYSbTJSMtv7FmfRaEUGR6sTmNKNetPVJ0njdeagT7xBE/+t7nHFi/NF9PAunp1dPU19cA//WVA0SgGL69dUhp6pa2XIyXey6R49PDrd9Is1iF63PTuR9P8oSIdPbBT/3b90WUDif653NPtawUtH+1NyzbZ89r8UkBMo7ZyVpnG22x+i/X4cfwFS7yy0
-
- Inserter
- Posts: 24
- Joined: Mon Jan 26, 2015 3:32 pm
- Contact:
Re: [Circuit Network] Speed and Debugging
Thanks you for your suggestion about the power switch. I installed the Pushbutton mod that lets me turn on the power to the circuits for a single tick at a time. However a single tick of power allows circuits to run for 3 ticks. Maybe if i fiddle around with the power supply I can make a single tick of power only give enough energy to power the combinators for a single tick.
Pic related: the memory cell:
Pic related: the memory cell:
Re: [Circuit Network] Speed and Debugging
Btw you do not need so complicated memory cell. I need to do same thing (store signals as many as it is possible). And my memory looks like this
To the both comparator have to go signal R from source (or have to come at the same time => same number of gates).
. It take some hours to sort it out but now it is compact as it can be I think.To the both comparator have to go signal R from source (or have to come at the same time => same number of gates).