ShadowBound Posted April 20, 2018 Share Posted April 20, 2018 As the title says. Link to comment https://forums.kleientertainment.com/forums/topic/89977-can-someone-explain-to-me-the-memory-toggle/ Share on other sites More sharing options...
KittenIsAGeek Posted April 20, 2018 Share Posted April 20, 2018 Its basically a SR-Latch. There are three ports that all look different. The two you know are the Logic port and the Signal port. The third is the Reset port. If there's an Active signal on the Signal port, the toggle goes active. It stays active, even if the signal port goes inactive, until the Reset port goes active. A very quick example of a use for SR-Latches is hysteresis on a thermostat. Lets say that you have a 5 degree range you want to keep your cold pool. So you would set one sensor to above, say, 10c and the other to below 5c. The first sensor would connect to the logic port, turning your aquatuner on if your pool got warmer than 10c. The second sensor would connect to the reset port. This would keep your aquatuner active until the temperature dropped to below 5c. The tuner would not come on again until the temperature rose above 10c. Link to comment https://forums.kleientertainment.com/forums/topic/89977-can-someone-explain-to-me-the-memory-toggle/#findComment-1027768 Share on other sites More sharing options...
ShadowBound Posted April 20, 2018 Author Share Posted April 20, 2018 @KittenIsAGeekI think I understand now, this is something I wanted for a long time. Thanks. Link to comment https://forums.kleientertainment.com/forums/topic/89977-can-someone-explain-to-me-the-memory-toggle/#findComment-1027774 Share on other sites More sharing options...
KittenIsAGeek Posted April 20, 2018 Share Posted April 20, 2018 You've been able to do it for a while; but this reduces the complexity down to one logic item instead of several. Link to comment https://forums.kleientertainment.com/forums/topic/89977-can-someone-explain-to-me-the-memory-toggle/#findComment-1027776 Share on other sites More sharing options...
BlueLance Posted April 20, 2018 Share Posted April 20, 2018 Another example is lets say you have a storage room for hydrogen, and you want it to start pumping that to your hydrogen generators once it hits 2kg per tile but stop if it falls below 500g. You can now use it for this purpose Well that used to be my wanting for it but now I changed my power grid haha Link to comment https://forums.kleientertainment.com/forums/topic/89977-can-someone-explain-to-me-the-memory-toggle/#findComment-1027809 Share on other sites More sharing options...
Arxeon Posted April 20, 2018 Share Posted April 20, 2018 Here's a pic to show the idea for those who like pics. Link to comment https://forums.kleientertainment.com/forums/topic/89977-can-someone-explain-to-me-the-memory-toggle/#findComment-1027815 Share on other sites More sharing options...
Flydo Posted April 20, 2018 Share Posted April 20, 2018 2 hours ago, ShadowBound said: @KittenIsAGeekI think I understand now, this is something I wanted for a long time. Thanks. You just need to learn more about logic gate, we can do it since the beginning of the automation upgrade. A latch can be made with only AND (or OR) gate and the NOT gate (two NAND or NOR gate) In fact, in electronic system all you need is a AND (or OR) gate and the NOT gate and you can build a computer, all the other logic system is a combination of the previous logic gate 6 minutes ago, Arxeon said: Here's a pic to show the idea for those who like pics. You're system is too big, for a latch all you need is two AND (or OR) and two NOT gate, why using filter? Link to comment https://forums.kleientertainment.com/forums/topic/89977-can-someone-explain-to-me-the-memory-toggle/#findComment-1027818 Share on other sites More sharing options...
Arxeon Posted April 20, 2018 Share Posted April 20, 2018 I've tried that method (example B) but it can cause the signal hold and the reset to flip functions. Example A was another that I tried but on the odd occasion go on the blink like a siren. not reliable enough for me. Example C is actually 2 components (Latch and Pulse) put together to give the desired result to hold the main signal but not be triggered by the reset. As for the reason for the filters. The 1 second filter on the pulse gives it a 1 second pulse while the 0.1 second filter cleans up a brief after blip when the pulse stops receiving a signal. The 1 second filter on the latch side prevents the latch from going on the blink during the 1 second pulse reset. Link to comment https://forums.kleientertainment.com/forums/topic/89977-can-someone-explain-to-me-the-memory-toggle/#findComment-1027845 Share on other sites More sharing options...
Flydo Posted April 20, 2018 Share Posted April 20, 2018 I try myself the B example, it's work well, it's probably just because you misunderstood the function of this latch. With Lach gate you have a forbiden state. The forbiden state cause trouble and unpredictable result, it's for that reason is called forbiden state For example B you need to invert entry signal with a NOT gate for the both entry signal to made the latch correctly (SR NAND latch), so the forbidden state is S=inactive and R=inactive (so in your example is S=active and R= active), i don't know if you know logic system but the sign upside the letter is the meaning of a NOT If you made example B with OR gate instead of AND gate, you will have a latch with normal entry signal (SR NOR latch), the forbiden state is S=active and R= active If you affraid of forbidden state you can also made a SR AND-OR latch with a OR, a AND and a not gate (so only three gate needed) I'm not sure witch model dev use to make the new logic gate cause i not test it completly to made the truth table but i suppose they use the SR AND-OR to avoid the forbiden state that could be really annoying for newbie in automation Choose wisely how you use it and all will be fine, but you need to prefectly avoid forbiden state when you design your logic circuit It's just a matter of how you use it Link to comment https://forums.kleientertainment.com/forums/topic/89977-can-someone-explain-to-me-the-memory-toggle/#findComment-1027853 Share on other sites More sharing options...
Saturnus Posted April 20, 2018 Share Posted April 20, 2018 Note that for most common use cases you never needed an SR latch. An AND gate would do exactly the same. Link to comment https://forums.kleientertainment.com/forums/topic/89977-can-someone-explain-to-me-the-memory-toggle/#findComment-1027856 Share on other sites More sharing options...
Flydo Posted April 20, 2018 Share Posted April 20, 2018 5 minutes ago, Saturnus said: Note that for most common use cases you never needed an SR latch. An AND gate would do exactly the same. Not really, you can't do something like BlueLance talk about, it's could look the same but in some case you will have some serious trouble 2 hours ago, BlueLance said: Another example is lets say you have a storage room for hydrogen, and you want it to start pumping that to your hydrogen generators once it hits 2kg per tile but stop if it falls below 500g. You can now use it for this purpose Well that used to be my wanting for it but now I changed my power grid You could do something look like it with a sensor under 2 Kg and another above 500 g but your system will block if pressure go more than 2Kg, and it's impossible to make a system waiting for the pressure to hit 2Kg per tile I use latch for my water treatment system to avoid overpressurized the room, sure it's possible without but at some point the system turn off and down like a impredictable clock, i prefer to use a big amount of gas for a time and stopping the anti-overpressurize for a while Link to comment https://forums.kleientertainment.com/forums/topic/89977-can-someone-explain-to-me-the-memory-toggle/#findComment-1027865 Share on other sites More sharing options...
Saturnus Posted April 20, 2018 Share Posted April 20, 2018 5 minutes ago, Flydo said: Not really. Did you even look at it? Probably not. What I posted is an AND-OR latch. But because of the way logic is handled in ONI you do not need the OR gate at all unless you need it to feed other logic circuits after it. And in that case you'd simply isolate it by using a buffer gate at 0.1s. Link to comment https://forums.kleientertainment.com/forums/topic/89977-can-someone-explain-to-me-the-memory-toggle/#findComment-1027868 Share on other sites More sharing options...
Flydo Posted April 20, 2018 Share Posted April 20, 2018 1 minute ago, Saturnus said: Did you even look at it? Probably not. What I posted is an AND-OR latch. But because of the way logic is handled in ONI you do not need the OR gate at all unless you need it to feed other logic circuits after it. And in that case you'd simply isolate it by using a buffer gate at 0.1s. Probably yes , sorry it's work for what bluelance talk about, just a non-sense for me to can have a inactive and active signal on the same wire, too dangerous to made But his is not an AND-OR latch, it's could look the same but it's not (it's work only if you use the same sensor type): -first you need to invert reset signal to have a something look quite the same but it's not the same -second your "reset" signal don't have the priority, and this for me is very annoying cause once this system is on, you can only turn off with the two signal turn inactive. Reset priority is one of the important thing in a latch to made security system work well (like an emergency shut down for example) So another example: i want a system that start pumping liquid when the pressure above 700 Kg/tile but absolutely stop pumping in all case if temperature rise above 50 °C, AND gate not working Link to comment https://forums.kleientertainment.com/forums/topic/89977-can-someone-explain-to-me-the-memory-toggle/#findComment-1027877 Share on other sites More sharing options...
Saturnus Posted April 20, 2018 Share Posted April 20, 2018 14 minutes ago, Flydo said: But his is not an AND-OR latch... (it's work only if you use the same sensor type) It is in fact an AND-OR latch. As I said Quote Note that for most common use cases you never needed an SR latch. An AND gate would do exactly the same. And then I give an example of said use case which will be the one most people would need it for, ie. a hysteresis switch. Link to comment https://forums.kleientertainment.com/forums/topic/89977-can-someone-explain-to-me-the-memory-toggle/#findComment-1027885 Share on other sites More sharing options...
Flydo Posted April 20, 2018 Share Posted April 20, 2018 10 minutes ago, Saturnus said: It is in fact an AND-OR latch. Nope: I test your, reset have not the priority, once it's on, you need to have both to inactive 11 minutes ago, Saturnus said: And then I give an example of said use case which will be the one most people would need it for, ie. a hysteresis switch. Yes for the same sensor type on signal entry and reset entry, it's work, but it's the only case, you can't have a hysteresis switch with an emergency shut down Link to comment https://forums.kleientertainment.com/forums/topic/89977-can-someone-explain-to-me-the-memory-toggle/#findComment-1027887 Share on other sites More sharing options...
Saturnus Posted April 20, 2018 Share Posted April 20, 2018 2 minutes ago, Flydo said: Yes for the same sensor type on signal entry and reset entry, it's work... Good. 3 minutes ago, Flydo said: you can't have a hysteresis switch with an emergency shut down Yes, you can. Sorry if you can't see how but you can. Link to comment https://forums.kleientertainment.com/forums/topic/89977-can-someone-explain-to-me-the-memory-toggle/#findComment-1027889 Share on other sites More sharing options...
Flydo Posted April 20, 2018 Share Posted April 20, 2018 3 hours ago, Saturnus said: Yes, you can. Sorry if you can't see how but you can. Sorry but i test it to made the truth table to be sure what i talk about, if one of the input is active the output stay active. You probably need to add something to have a real reset Link to comment https://forums.kleientertainment.com/forums/topic/89977-can-someone-explain-to-me-the-memory-toggle/#findComment-1027960 Share on other sites More sharing options...
Arash70 Posted April 20, 2018 Share Posted April 20, 2018 This is gonna make pipe routing easy I think Pipe 1 + Sensor 1-> S not (output) -> liquid shutoff 1 -> Pipe 2 -> SR Latch -> Pipe 1 + Sensor 2-> R output -> liquid shutoff 2 -> Pipe 3 And that would be a logical filter this is just awesome Link to comment https://forums.kleientertainment.com/forums/topic/89977-can-someone-explain-to-me-the-memory-toggle/#findComment-1027973 Share on other sites More sharing options...
Denisetwin Posted April 20, 2018 Share Posted April 20, 2018 37 minutes ago, Arash70 said: This is gonna make pipe routing easy I think Pipe 1 + Sensor 1-> S not (output) -> liquid shutoff 1 -> Pipe 2 -> SR Latch -> Pipe 1 + Sensor 2-> R output -> liquid shutoff 2 -> Pipe 3 And that would be a logical filter this is just awesome I hope someone posts some screenshots of this because I can kinda grasp it and hope that it does what I think you are saying it does!! Link to comment https://forums.kleientertainment.com/forums/topic/89977-can-someone-explain-to-me-the-memory-toggle/#findComment-1027985 Share on other sites More sharing options...
Saturnus Posted April 20, 2018 Share Posted April 20, 2018 5 hours ago, Flydo said: i want a system that start pumping liquid when the pressure above 700 Kg/tile but absolutely stop pumping in all case if temperature rise above 50 °C, AND gate not working I don't see the problem. Pressure sensor goes ON when above 700kg. Feed to one input of AND. Temperature sensor goes OFF when above 50C. Feed to other input of AND. AND output controls pump. Also, hysteresis with one AND in function. Both sensors ON when above 500kg. Link to comment https://forums.kleientertainment.com/forums/topic/89977-can-someone-explain-to-me-the-memory-toggle/#findComment-1028003 Share on other sites More sharing options...
Arash70 Posted April 20, 2018 Share Posted April 20, 2018 2 hours ago, Denisetwin said: I hope someone posts some screenshots of this because I can kinda grasp it and hope that it does what I think you are saying it does!! Ok here it goes: Model #1: Pushes liquid of your choosing to bottom vent, and others to right vent Model #2: Same thing for 3 mixed liquids So using SR would work similar to this Link to comment https://forums.kleientertainment.com/forums/topic/89977-can-someone-explain-to-me-the-memory-toggle/#findComment-1028029 Share on other sites More sharing options...
Flydo Posted April 20, 2018 Share Posted April 20, 2018 3 hours ago, Saturnus said: I don't see the problem. Pressure sensor goes ON when above 700kg. Feed to one input of AND. Temperature sensor goes OFF when above 50C. Feed to other input of AND. AND output controls pump. Also, hysteresis with one AND in function. Both sensors ON when above 500kg. Yes, i know it's work but in this particular case You test in truth table 00 01 11 11 not 10, it's what i mean by "you can reset the system, so it's can't work with pressure sensor and a thermal sensor for emergency shut down Link to comment https://forums.kleientertainment.com/forums/topic/89977-can-someone-explain-to-me-the-memory-toggle/#findComment-1028092 Share on other sites More sharing options...
Saturnus Posted April 20, 2018 Share Posted April 20, 2018 26 minutes ago, Flydo said: You test in truth table 00 01 11 11 not 10 That's the point. You set it up like that on purpose. Link to comment https://forums.kleientertainment.com/forums/topic/89977-can-someone-explain-to-me-the-memory-toggle/#findComment-1028113 Share on other sites More sharing options...
Flydo Posted April 21, 2018 Share Posted April 21, 2018 14 hours ago, Saturnus said: That's the point. You set it up like that on purpose. Yes but without the 10 you can't made a emergency shut down like i need it. Sure for a double pressure sensor it's smart (but dangerous if dev reencode the automation ingame, it's for that i don't want to use it too), with double sensor you can't have code 10, pretty impossible that you have pressure under 500g/tile and above 2 Kg/ tile........but I know it by my own experience in game, it's possible (don't seem logic but it's possible, i will explain), if you have a mixed type of liquid, like water and a little polluted water, you can have one sensor above 2Kg/tile of water and the other under 500g/tile of polluted water, in this case i need the system reset to avoid pumping polluted water and making trouble in my system. Priority of the reset function is important for me and your system look great but I really prefer to use a real latch gate Link to comment https://forums.kleientertainment.com/forums/topic/89977-can-someone-explain-to-me-the-memory-toggle/#findComment-1028314 Share on other sites More sharing options...
Saturnus Posted April 21, 2018 Share Posted April 21, 2018 1 hour ago, Flydo said: Priority of the reset function is important for me and your system look great but I really prefer to use a real latch gate I'm not arguing that a real latch doesn't have a use. I'm saying that for the vast majority of use cases for the average player, they'd only need the single AND gate hysteresis control. Or with an AND and NOT gate for full AND-OR gate functionality. This is a very old discussion though and has already been exhaustively covered within the first few days of the automation update preview release. Personally I'd much rather they'd made a single gate JK flip flop instead of a single gate SR latch as that would have been much more useful for more complex circuitry but I digress. As it is the added SR latch hardly makes any difference for anyone. Link to comment https://forums.kleientertainment.com/forums/topic/89977-can-someone-explain-to-me-the-memory-toggle/#findComment-1028342 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.