Yank31 Posted October 28, 2019 Share Posted October 28, 2019 Hey, I am looking to make a 1 second timer, to activate a gaz shut-off to send only 1kg in a gaz pipe, per activation. This is what I currently have Filter is set to 0,7 linked to an XOR gate. When I trigger it manually, or watch it trigger on its own, it works fine. However if I do something else on the map and come back a few cycles later, the system clearly has been sending 2kg per activation. Is the circuit flawed or is it something else, like an off-screen weird issue perhaps (the whole thing is located at the very top right of the map, near both the right edge and the sky limit) ? Link to comment Share on other sites More sharing options...
Gurgel Posted October 28, 2019 Share Posted October 28, 2019 There are some differences hos timing on-screen and off-screen are handles. I suggest to find another approach that does not use timers. Link to comment Share on other sites More sharing options...
Eleyvie Posted October 28, 2019 Share Posted October 28, 2019 Duration 0.4% of 600 seconds = 3.2 seconds. XOR gate activates and starts sending Green. Filter activates in 0.7 seconds. XOR gate starts sending Red. After timer expires, it starts sending Red. However, Filter gate output will only switch to Red on the next tick. As a result, XOR gate will have another Green phase for one tick when clock timer turns off. When you're watching this directly, this is apparently not enough to send anything through. However it's possible that when working off-screen, the game is optimizing the processing and a single Green tick is actually enough. Try replacing your Filter + XOR gates with NOT + AND gates, they will convert any activation to a single-tick Green pulse, and will ignore deactivation entirely. Follow this with a 1-second Buffer gate and you'll have the same effect without an extra Green pulse. Link to comment Share on other sites More sharing options...
Ktoblin Posted October 28, 2019 Share Posted October 28, 2019 10 minutes ago, Eleyvie said: Duration 0.4% of 600 seconds = 3.2 seconds. XOR gate activates and starts sending Green. Filter activates in 0.7 seconds. XOR gate starts sending Red. After timer expires, it starts sending Red. However, Filter gate output will only switch to Red on the next tick. As a result, XOR gate will have another Green phase for one tick when clock timer turns off. When you're watching this directly, this is apparently not enough to send anything through. However it's possible that when working off-screen, the game is optimizing the processing and a single Green tick might be enough. Try replacing your Filter + XOR gates with NOT + AND gates, they will convert any activation to a single Green tick, and will ignore deactivation entirely. Follow this with a 1-second Buffer gate and you'll have the same effect without an extra Green pulse. Or use Buffer. Think it will be works then timer off Link to comment Share on other sites More sharing options...
Craigjw Posted October 28, 2019 Share Posted October 28, 2019 This might work for you, it'll repeatedly send a signal every [filter time] for [buffer time] until the signal stops Or, a latch, activates for some time once a signal has been received. I would expect that this is what you are after. Using only a filter & toggle is unreliable, as the gate won't reset if both set and reset are active at the same time, hence the not gate & And gate. Link to comment Share on other sites More sharing options...
biopon Posted October 29, 2019 Share Posted October 29, 2019 21 hours ago, Yank31 said: When I trigger it manually, or watch it trigger on its own, it works fine. However if I do something else on the map and come back a few cycles later, the system clearly has been sending 2kg per activation. As @Gurgel said, filter & buffer timers are notoriously inaccurate and won't give you perfect results. They don't even work well with each other, but pipes run on a different thread, and that makes things even more fuzzy. I ran into a similar problem with conveyor shutoffs, and a 0.8 second opening time seems to prevent multiple packets from getting through. I haven't noticed any packets being inadvertently blocked either. I am absolutely sure this isn't perfect and will occasionally err this way or the other, but for what I'm using it for, it's good enough. If you must have accurate control over how much gas you let through, I would recommend limiting the flow with a valve to, say, 100g/sec, and opening the shutoff for 10 seconds. This won't be perfect either, but at worst it will be only off by 10%. Link to comment Share on other sites More sharing options...
Craigjw Posted October 29, 2019 Share Posted October 29, 2019 I've come into similar issues with timers and rails. I would propose that this is because the rails are on a different thread to the automation and it doesn't syncronise properly. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.