Reflex Control from Momentary Switch

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Paul_B
    Automated Home Legend
    • Jul 2006
    • 608

    Reflex Control from Momentary Switch

    As my reflex programming looks to have been wiped at some point I'm trying to reprogramme my modules. One problem I have is with a fairly simple requirement.

    I have a DRH (2 inputs, 2 relays) one input goes to a momentary switch (aka retractive switch) and one relay controls a light.

    Now the problem with the momentary switch is that it seems to go -ve, +ve, +ve, -ve. Which has the result of toggling twice (toggle is the associated packet for the light relay) giving the following outcome:

    - Press switch down, light comes on
    - Release switch (switch retracts), light goes off

    How can I get around this problem so that:

    - Press switch down, light comes on
    - Release switch (switch retracts), light stays on

    (Obviously the above is from light starting in off position and going to an on position, it could equally have been light is intially on and being turned off)

    Paul
  • Karam
    Automated Home Legend
    • Mar 2005
    • 863

    #2
    Are you sure the retractive switch is working the way you say it is? In other words that you are getting 4 edges from a single push and release?

    In the Reflex programming you can choose to trigger on either +ve or -ve edge or on both. If you choose both then you would get the described unwanted behaviour from a 2 edged (normal) push button because you'd get a toggle on one edge (when you push) then a toggle on the next (release) edge. If you think that this is actuallly what is happening then the answer is to just trigger on one of the edges. Depending on how you've wired the switch you can select the edge which gives the toggle on the push (if that is what feels more natural to you).

    Comment

    • Paul_B
      Automated Home Legend
      • Jul 2006
      • 608

      #3
      I am sure that is how I had it working before, setting trigger as +ve and then using the toggle relay packet. I've taken the switch off and see it is just wired to the digital outputs on CMN & 1-Way. In fact I removed the wires and touched them together on contact light comes on, on disconect light goes off. Getting to the DRH is bit more hassle as it is in the roof.

      The programming looks like this:

      Ensuite Switching:
      Par#=00 IFN=00 Value=01

      Ensuite Switching Switches:
      Par#=00 IFN=04 Value=12
      Par#=03 IFN=04 Value=00F0
      Reflex Vectors
      1: Ensuite Switching Relays-_Relay 1 Toggle
      3E0304

      The Reflex trigger on the switch module looks like:

      Comment

      • Karam
        Automated Home Legend
        • Mar 2005
        • 863

        #4
        Paul,

        The programming looks correct though to be pedantic it looks like the module initialise vector is enabled (see module level Reflex menu) though there is no actual initialise vector or Reflex programmed for this so it won't have an effect.

        The listing you have provided looks to be from the Cortex database Reflex list (not actually read from module). It would be better to perform a node profile analysis on the module after it is reset and with Cortex not running the network since this will tell us what is actually in the module rather than what Cortex thinks is in there. Also it'll tell us something about the module itself, e.g. could it be some bug in older firmware?

        Touching two wires together will typically result in detection of multiple 1/0 transitions so is not a reliable way to test a toggle function. There is filtering on the digital inputs but this is more geared towards contact bounce which typically settles much quicker than a manual wire touch operation.

        Comment

        • Paul_B
          Automated Home Legend
          • Jul 2006
          • 608

          #5
          Can I send a reset packet on the network or will the watchdog reset packet do with the network paused?

          If the latter is okay then I get the following:

          Name= 1020 Ensuite Switching
          Version
          Master firmware version= 08
          Year= 04
          Month= 08
          Day= 20
          Slave firmware version= 00
          Variant= 0
          Hardware ID= 029
          OS Parameters
          Max NIDs= 01
          NID 01= 1020
          Max ZIDs= 02
          ZID 01= 00
          ZID 02= 00
          Max TIDs= 02
          TID 01= 21 Relay
          TID 02= 12 General Digital input
          Max NIDMASKs= 00
          Min bit rate= 13
          Max len bytes-1/max bit rate exp= 01
          Receive Buffer Length= 13
          Transmit Buffer Length= 13
          Bit Rate Setting= 2E
          Reset status=00
          Module (general)
          Par#0= 01
          Vector 01 (Init)
          Addr=FFFF
          EX
          Par#0= 12
          Par#1= 00
          Par#3= 00
          Vector 01
          Addr=0100
          Packet Set
          Pkt 1= 033E0304
          Vector 02
          Addr=FFFF
          Relay
          Par#1= 00

          Comment

          • Karam
            Automated Home Legend
            • Mar 2005
            • 863

            #6
            Reset when network is running won't work because Cortex will just re-initialise the module when it sees the initialise packet from the module. However a reset with Cortex paused should work so the latter method was ok.

            The programming looks correct. Intriguing. Assuming this digital switch is represented in Cortex then maybe you can do a simple test with Cortex running the network normally and that is to wait a while (to get a clear time point) and then go and press the switch once. Then have a look in the history list for that digital input (behaviour menu, icon at the bottom that looks like a text file). You should be able to see Cortex reporting state changes. Does it show 2 or 4?

            Comment

            • Paul_B
              Automated Home Legend
              • Jul 2006
              • 608

              #7
              Hi Karam,

              Sorry its been a while getting back to you. Hectic week last week with work, anniversary and away at the weekend.

              I've finally got around to capturing the switch action to log file with logging turned up. I basically held the switch down for a second or two and then released. From my basic interpretation I am guessing two states? Text file attached.
              Attached Files

              Comment

              • Karam
                Automated Home Legend
                • Mar 2005
                • 863

                #8
                Yes it looks from this listing that you held the switch in one state for 10 seconds and then released. I.e. only 2 edges. However interestingly it seems that Cortex switches the relay ON when the switch is pressed and then OFF when switch is released. Perhaps it is this Cortex behaviour rather than Reflex behaviour that you were originally describing? For this you will have to look at the Cortex connections for this digital input and relay attached light.

                On the Reflex front I have double checked your module's programming on an exact same version module - just incase this was some sort of bug - but can confirm that it works correctly.

                In the light of my observations about the Cortex behaviour above could it be that you have confused Cortex behaviour with Reflex behaviour? Is this module network enabled?

                Comment

                • Paul_B
                  Automated Home Legend
                  • Jul 2006
                  • 608

                  #9
                  Resurrecting an old thread here. I've just fitted another momentary switch from the Get range, but its not linked to Idratek at the moment. However, it has illustrated that these switches don't latch (think that is the right expression). So pressing and holding changes the light state, on releasing the switch the state is not maintained and returns to the original condition.

                  It looks like I'm going to have to automate this switch ASAP for it to operate the light as it was previously with a normal switch. But that then leaves the issue of reflex programming. How do I latch in reflex when the switch itself is unlatched?

                  Paul

                  Comment

                  • Karam
                    Automated Home Legend
                    • Mar 2005
                    • 863

                    #10
                    If I have understood correctly: you are saying its a straightforward momentary switch? Like, say, a doorbell button? In that case you would just set the Reflex to trigger on one edge (probably the press rather than release in practical terms) and then the action would be to toggle the light. The trouble is I can see in this thread that you have previously been having problems with a retractive switch which seemed to give two pairs of edges. If for some reason this new switch does the same (though I don't understand why it would - is there some special function these switches are intended for?) then there can be a conditional Reflex workaround where the trigger checks a user defined flag (UDF) and if the flag is set does not toggle the light but clears the flag, or if the flag is clear toggles the light and sets the flag.

                    Comment

                    Working...
                    X