Jump to content

Help with a 1 second timer


Recommended Posts

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

56576432092189b460fbe7101993d196.jpg

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

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

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

This might work for you, it'll repeatedly send a signal every [filter time] for [buffer time] until the signal stops

Untitled.thumb.png.76201e192b5643fffdc907dd2b0aa7f4.png

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.

Untitled2.thumb.png.14f7763d00ca8e0d28dcd8e3abc0d75c.png

Link to comment
Share on other sites

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

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.

×
×
  • Create New...