high/low signal detector with example use

    Joined
    Jun 23, 2013
    Messages
    80
    Reaction score
    75
    • Community Content - Bronze 1
    • Purchased!
    • Legacy Citizen 4
    Greetings.

    So i was playing around with complex rail movement sequences and found that i needed a failsafe to prevent messing up the sequence by spamming the activation module.

    I haven't found anything like that on this forum so i made one and wanted to share with the lot.


    So the First step would be to mock up a sequence like this example:


    Repeated input by the user messes up the sequence wich can be fatal in a more complex sequences.
    It could for example tangle up hatches in each other or gates are closing on extended turrets etc.


    How to prevent this?

    My approach was to detect the state the sequence is in and block input accordingly.

    on this example i used activation modules to detect if the docked core is moving or not.
    If it is not moving it is stationary at either end of the rail.


    The OR module will always be lit if the rail is stationary and off if not.

    NOTE!
    When the docked entity is starting to move there is a delay until the docked entity fully left the rail block. Only then the activation module switches off. That is why an additional rail with no attached modules as buffer is required here.

    The output of the OR module cannot be used yet since this setup uses permanent On/off signals instead of pulses. If we were to directly use it as condition on an AND module we would end up with this:


    This will prevent the sequence whenever the docked entity is moving, This is not wanted.
    What is desired is to prevent a change of signal while the rail is moving.

    For this it is needed to detect the change of the signal wich can be done with a setup like this:


    Whenever the activation module is turned on or off a pulse signal is created wich is effectively detecting the change of the signal.
    On to off its a high edge and a on to off is a low edge. This setup combines the both to detect either edges.

    Now the output of our High/low Edge detector is our first condition and the Railposition detector is our second condition.
    If the Docked entity is currently not in sequence AND the Signal is changed Then we output a Permanent signal to our activation module initiating the sequence.

    to make the pulse permanent we use a flip flop. and the result is this:


    As you can see im hitting the activation module like an epileptic monkey, the sequence will always finish before changing back again.


    my mother language is not english so if i screwed up with the terminology correct me please.
    I really just was in the mood to make a tutorial. Still criticism is always welcome so i may improve upon.
     
    Last edited:

    Gasboy

    BLRP
    Joined
    Aug 11, 2013
    Messages
    1,311
    Reaction score
    360
    • Community Content - Bronze 2
    • Legacy Citizen 6
    • Purchased!
    I am guessing that it is possible to make your circuit more compact, yeah? You've only stretched it out to make it understandable for laymen like me? :D
     
    Joined
    Jun 23, 2013
    Messages
    80
    Reaction score
    75
    • Community Content - Bronze 1
    • Purchased!
    • Legacy Citizen 4
    Yeah for presentation purposes so one can see the connections made. the detctor circuit can be fitted into a 3x3x1 grid.
    i wouldnt recommend it though if u got the space for maintainability.
     

    Gasboy

    BLRP
    Joined
    Aug 11, 2013
    Messages
    1,311
    Reaction score
    360
    • Community Content - Bronze 2
    • Legacy Citizen 6
    • Purchased!
    Yeah for presentation purposes so one can see the connections made. the detctor circuit can be fitted into a 3x3x1 grid.
    i wouldnt recommend it though if u got the space for maintainability.
    Well, I'm going to be putting your idea into a ship, so space is at a premium.
     
    Joined
    Dec 23, 2013
    Messages
    131
    Reaction score
    16
    • Purchased!
    • Legacy Citizen 3
    I like this format. Present the problem and then show all the steps up to the solution. Brilliant.
     

    Treefolk

    The Clueless
    Joined
    Apr 4, 2017
    Messages
    20
    Reaction score
    9
    This is fantastic. You should make more things like this!
     

    Dr. Whammy

    Executive Constructologist of the United Star Axis
    Joined
    Jul 22, 2014
    Messages
    1,789
    Reaction score
    1,723
    • Thinking Positive
    • Likeable Gold
    • Legacy Citizen 9
    1) You're a logic hero!

    2) Double points for having Axelay as your avatar.
     

    Crimson-Artist

    Wiki Administrator
    Joined
    Sep 10, 2013
    Messages
    1,667
    Reaction score
    1,641
    • Video Genius
    • Competition Winner - Stations
    • Wiki Contributor Gold
    couldn't you just use a RS-NOR latch to prevent premature input press? thats what I would do
     
    Joined
    Jun 23, 2013
    Messages
    80
    Reaction score
    75
    • Community Content - Bronze 1
    • Purchased!
    • Legacy Citizen 4
    couldn't you just use a RS-NOR latch to prevent premature input press? thats what I would do
    I tried that and found it having problems with latency not working reliably, how does your RS-NOR latch look like?
    is it 1 to 1 basic logic? with !Q/ Q output?
     
    Joined
    Jul 30, 2013
    Messages
    398
    Reaction score
    282
    • Wired for Logic Gold
    • Legacy Citizen 8
    • Purchased!
    well done mate, i think to prevent logic signals when the entity is moving is more easy to do, but hey!, is great, follow your way, you are doing well :)
     

    Crimson-Artist

    Wiki Administrator
    Joined
    Sep 10, 2013
    Messages
    1,667
    Reaction score
    1,641
    • Video Genius
    • Competition Winner - Stations
    • Wiki Contributor Gold
    I tried that and found it having problems with latency not working reliably, how does your RS-NOR latch look like?
    is it 1 to 1 basic logic? with !Q/ Q output?
    RS-NOR 1.png
    this is the RS-NOR latch that I used. The ORs r the inputs and the NOTs r the output. When an low OR receives a high signal then it will turn on the low NOT which will in turn off the both the High OR and NOT and vise versa.
     
    Joined
    Jun 23, 2013
    Messages
    80
    Reaction score
    75
    • Community Content - Bronze 1
    • Purchased!
    • Legacy Citizen 4
    Yeahn i tried that and i found it somewhat unreliable unfortunately. for example if i were to spam that button the signal would jumble at some point.
     

    Crimson-Artist

    Wiki Administrator
    Joined
    Sep 10, 2013
    Messages
    1,667
    Reaction score
    1,641
    • Video Genius
    • Competition Winner - Stations
    • Wiki Contributor Gold
    Yeahn i tried that and i found it somewhat unreliable unfortunately. for example if i were to spam that button the signal would jumble at some point.
    I've never had that happen to me before. if the signal triggers the reset input from just spamming the main button input then it sounds like its a glitch with the game.
     
    Joined
    Jun 23, 2013
    Messages
    80
    Reaction score
    75
    • Community Content - Bronze 1
    • Purchased!
    • Legacy Citizen 4
    I think its an fps issue, i may have an very good gpu but an average at best cpu.