Another Logic Question...

    Joined
    Jul 29, 2013
    Messages
    1,173
    Reaction score
    494
    • Competition Winner - Small Fleets
    • Top Forum Contributor
    • Legacy Citizen 5
    I'm getting better with logic, but the actual terminology that a lot of people who understand this stuff use is still beyond my understanding, so I'm forced to ask these questions a lot.

    I'm trying to do something very simple. I want to activate a block for just a few moments, before the system I'm logicking resets itself.

    I'm so freaking close to solving this one on my own, but the closest I've gotten is using non-repeating delays and a not switch. This has the desired effect, but it only works every other activation sequence.
     

    MossyStone48

    Cmdr Deathmark
    Joined
    May 29, 2013
    Messages
    1,255
    Reaction score
    432
    Keep in mind the logic system works a lot like a basic breadboard program. If you can make it in VBB or Fritzing you should be able to mimic it in StarMade. But you'd have to keep it super basic and use only maybe a few parts libraries if any. There's a lot out there what with Arduino and Raspberry Pi being so popular a lot of those tutorials should carry over pretty well.

    But that only gives you some sources to look into. As to your current problem.. No clue.
    Good luck , starmate jstenholt :3

    May the plex be with you.
     
    Joined
    Jan 22, 2014
    Messages
    1,047
    Reaction score
    299
    It should work like this:
    1. Place an Activation block, an AND, a NOT and several delay modules.
    2. Slave the AND to the Activation block and the NOT-gate.
    3. Slave the Activation block to the NOT-gate, too.
    4. Connect the delayers in line.
    5. Slave their input to the AND-gate.
    6. Slave the NOT to their output.
    Note that this requires the initial output of the NOT-gate to be true, otherwise signals won't be propagated through the circuit.
     

    jayman38

    Precentor-Primus, pro-tempore
    Joined
    Jul 13, 2014
    Messages
    2,518
    Reaction score
    787
    • Purchased!
    • Thinking Positive
    • Legacy Citizen 4
    It sounds like you need some additional logic to ensure that all intermediate logic blocks are reset when the whole system is reset.

    I normally start out with a simple clock as described in the video linked below.


    Unfortunately, as you have found, things get sticky when it's time to switch off. (some logic blocks are left in the on-position in the middle of the circuit.)

    Therefore, you may need to invest in a bunch of AND blocks.

    Normal circuit:
    Activation connected to both the light and to the first delay block
    first delay block connected to either additional delay block (for extended time) or to the NOT block
    (repeat as many delay blocks as necessary for the desired delay time)
    NOT block attached to the light to turn it off.

    Self-Resetting circuit:
    Activation connected to the light and to all AND blocks.
    The first AND block is attached to the first delay block.
    Additional AND blocks can be attached to additional delay blocks, if there are any.
    The final delay block is attached to a final AND block, which is already attached to the original activation block.
    The final AND block is attached to the NOT block.
    The NOT block is attached to the light and to the activation block (or whatever you use to reset the circuit.)

    You will probably need to cycle this circuit one time at first, to get the NOT block set right. From then on, with all the AND blocks attached to the activation block, the entire circuit should cycle correctly, with all those AND blocks correctly resetting all the links along the circuit path to off (well, ON, in the single case of the NOT block)
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    The easiest way is to make a button and chain it to delays first.
    B -> D1 -> D2 -> D3 ...
    (B is the button / activation block)​

    Then
    EITHER connect them all to input into one AND (activates after some time of input into B, deactivates immeadiately when B receives false)
    OR connect them all to input into one OR (deactivates after some time with no input into B, activates imeadiately when B receives true)​

    Works well for simple tasks, but may trigger mutlitple times if the input changes twice in less than 0.5 seconds.
    I haven't tested how delays behave on a 0.2 long second input signal inversion.
     
    Joined
    Jul 29, 2013
    Messages
    1,173
    Reaction score
    494
    • Competition Winner - Small Fleets
    • Top Forum Contributor
    • Legacy Citizen 5
    This is exactly the solution I came up with, but it just turns into a pulser...

    The system in question is a torpedo launcher. So I have Activator>Delay,Delay,Delay>Docking Module>Delay>Push Beam.

    This effectively launches the torpedos, but I have to manually reset the system, I just want the system to reset itself after firing and I just came up with a genius solution while typing this...

    If I hook up an activation module next to the docking module and then link that activation module so that it activates the firing button only when the firing button is on, this may do what I want. Will update after work.
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    You can make a button next to the dock.
    It activates if something docks and deactivates if something undocks.
    Connect that to a not, that to the trigger and you get your self-resetting system.​

    You can also make:
    ActivationModule(UserButton) => OR <=> ActivationModule
    ActivationModule(UserButton) <= ActivationModule

    With an OR you can only enable, not disable the right ActivationModule with the UserButton
    With an AND instead of an OR you can only disable right ActivationModule from the left UserButton.

    But the left UserButton can be changed by AND independently from the right ActivationModule.​

    How that is useful:
    A user may only set it.
    A clock may only reset it.

    To reset the ActivationModule to OFF, you need to set it ON when met the 1.condition and to OFF again when both conditions are met.
    If you reset it to OFF if the first condition is met, it will be reset to ON again once the first condition is reset, or not process the OFF because the signal didn't change.

    Chain : ActivationModule => Delay1 => ... => DelayN-1 => DelayN

    Condition1 == (( ( DelayN => NOT ) & DelayN-1 => AND ))

    Condition2 == DelayN

    AND(ActivationModule & {Delay1 to DelayN-1 but not DelayN which is only for the reset}) => Trigger​
     
    Joined
    Jul 29, 2013
    Messages
    1,173
    Reaction score
    494
    • Competition Winner - Small Fleets
    • Top Forum Contributor
    • Legacy Citizen 5
    Tagging the reset mechanism to the docking module itself seems to have done the trick. Now, when I have the system armed and ready to fire, activating it will cause the docking module to send a signal after firing, I used that signal to reset the original activator.