Announcement

Collapse
No announcement yet.

Is there any setup to use Relay outputs on SECU-16?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Is there any setup to use Relay outputs on SECU-16?

    I've had my SECU-16 since May and have been using it to read analog inputs without any problems. I tried to exercise a relay and the relay contacts always remain open as measured with a multimeter.

    I first tried a little CMAX program including the 3 lines below and used the CMAX debug and toggled variable 109 and none of the relays responded.
    IF Variable 109 = 0
    Then Module 1/Point 8 = 0
    Else Module 1/Point 8 = 1

    I then used the CMAX relay set utility and tried module 1 and 0 and relays numbers 0 and 8 and again no success.

    Is there any setup needed to make the relay's work? I've got the analog inputs configured as Module 1 and I can see changes in these input values.

    #2
    Michael,
    It sounds like you may have a bum SECU16. I've been using mine and didn't do anything special to make it work. I don't have CMAX doing anything on the SECU16, but I have a couple of scripts that simply do something like:

    cpuxa.SetPoint 1,0,1

    and bingo, my garage opens. You might want to contact Kevin Barrett at ADI (kbarrett@appdig.com). ADI is really great about this stuff, and Kevin has helped me in the past.

    Steve


    Steve

    Comment


      #3
      The first relay on the secu16 is module point 8. So to close the first relay:

      If whatever
      then Module #1/Point #8 Turns On

      Kevin Barrett
      ADI Tech Support

      Comment


        #4
        I just saw your program segment:

        IF Variable 109 = 0
        Then Module 1/Point 8 = 0
        Else Module 1/Point 8 = 1

        and would like to suggest avoiding such code where a module update command is being sent out across the adnet bus on every program pass. Your module could in fact appear to lock up because of this, especially if the whole program is rather short and loops quickly. You might want to try and recode as:

        IF Variable 109 becomes = 0
        Then Module 1/Point 8 Turns ON
        IF Variable 109 becomes NOT = 0
        Then Module 1/Point 8 Turns OFF

        That way, nothing is sent out unless the variable actually changes

        -----------------------------
        If you don't know what you're doing... do it neatly

        Comment


          #5
          It looks like the ocelot did not like the code setting the relay every loop. I took care of this and now the relays work as expected.

          It does bring up a question, however. Why doesn't the same bus utilization problem occur when the analog data is copied to variables in the same loop. Eight module accesses are made to get the current analog reading every cycle.

          And now that I have your attention...
          I attempted to use the supervised inputs and included the resistor across the inputs as described in the documentation. This resistor loaded my circuit so the outputs now go between 0 and 2.4 volts rather than the 0 to 4.8 volts on an unloaded output. I then changed to input to be an analog input and checked the voltage. Do I really need the resistor for the supervised inputs to function?

          Comment


            #6
            The input is working correctly.

            In analog mode, you read the value of parameter #10~ #17 to determine the digitized analog value.

            In secure mode, you use the SECU internal acceptance bandwidth window. The SECU will report ON, or OFF, depending on the input value. No need to read the analog value, the SECU does it automatically.
            The default window is set to 1.33V ~ 3.66V.

            A shorted sensor returns a value close to 0V.
            A cut wire returns a value close to 5V.
            Both of these conditions are reported as an exception (problem, or switch closed).

            If the sensor is open, and the termination resistors are installed, the input reads about 2.5V.(all is well)

            You can invert the logic in your code, depending on your switch operation (NO vs NC switched)
            Dan Boone, ADI

            Comment


              #7
              Thank you again.

              Either an description this clear is not in the manual or I was not yet ready to understand the answer when I read the manual.

              Comment


                #8
                <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>

                It does bring up a question, however. Why doesn't the same bus utilization problem occur when the analog data is copied to variables in the same loop. Eight module accesses are made to get the current analog reading every cycle.

                And now that I have your attention...
                I attempted to use the supervised inputs and included the resistor across the inputs as described in the documentation. This resistor loaded my circuit so the outputs now go between 0 and 2.4 volts rather than the 0 to 4.8 volts on an unloaded output. I then changed to input to be an analog input and checked the voltage. Do I really need the resistor for the supervised inputs to function?<HR></BLOCKQUOTE>

                To answer your first question (and it's a very good one), the master (Ocelot) regularly polls all it's modules and maintains an in-memory cache of the various values for the inputs of each module. Even when you have a program line asking for a specific input value (and you say you have 8 of these) it actually satisfies the request from the cached value and does not go out across the bus just to get it. The Ocelot's polling "schedule" is independant of your running program so a short program might actually be getting the same value twice before a new sample of the value will be obtained from the bus polling routine. For module outputs however, sending commands out to them is done according to program logic since it cannot know when an output will need to be changed unless your code determines the right conditions. So when you do speify an output change, the equivalent bus command is put in a queue and will get sent out, intermixed with the regular polling commands. The problem is if you fill that output queue faster then it can transmit the individual commands...

                For your second question. The supervised mode jumper adds a 1k resistor pulling up to +5v to the SECU16 input. The external 1k resistor you add then creates a voltage divider and when you read the input as an analog voltage, you see about half of the 5 volts. The idea behind reading the input with a "IF Module/Point" command is to invoke the module's internal logic to determine if the analog value is between the parameter 2 and parameter 3 values and respond with an on or off condition. This is meant to emulate the operation of an alarm system input where you can determine if the loop wires are cut or shorted (due to a fault or intentional tampering) as opposed to seeing the 1k resistor at the other end of the wires. Using the "IF Module/Parameter" command bypasses the internal logic and just gives you the straight analog value of the input

                -----------------------------
                If you don't know what you're doing... do it neatly.

                Comment

                Working...
                X