Announcement

Collapse
No announcement yet.

P1000 32 parallel level alarm inputs energizing a single horn coil

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • P1000 32 parallel level alarm inputs energizing a single horn coil

    I am looking for a simpler way to program 32 separate level alarms to energize a horn coil. I know I can simply put the first level switch and horn coil on the first rung, and then add the remaining 31 level switches as parallel sub-rungs to the horn coil.

    However AD Tech support suggested simplifying this using bit addresses so I don't need all of these sub-rungs? I looked through all of the P1000 help files, and available videos and didn't find any examples that seemed to help.

    Any suggestions would be greatly appreciated.

  • #2
    If you already have the bits allocated you could PACK BITS into a word and check if the word is nonzero.
    if you dont already have them allocated, make a 32-bit word for alarms - like ALARM.
    Then use bit 1 of the ALARM as ALARM:1, thru bit 32 as ALARM:32.
    You didnt say if the alarm bits are physical I/O.

    Comment


    • #3
      Kewaki, thank you for the suggestions. Alarm bits are not physical I/O.

      Comment


      • #4
        OK, I understand defining the allocated bits using Pack Bits, but don't know how to do the next two steps; "pack bits into a word and check if the word is nonzero". Can you elaborate?

        Comment


        • #5
          Something like this

          Code:
          .       trigger                     |  PKB     ALARM_WORD
          .---------]^[-----------------------+
          .                                   |  ALM_BIT_1
          .                                   |  ALM_BIT_2
          .                                   |  ALM_BIT_3
          .                                   |  ALM_BIT_4
          .                                   |    ~~~~
          .                                   |  ALM_BIT_32
          .                                   +------------------------
          .
          . ALARM_WORD  0   SILENCE               HORN
          .---------]<>[------]/[-----------------(O)
          .
          .
          the 'trigger' may be unnecessary for your application
          Last edited by kewakl; 05-31-2019, 07:28 AM.

          Comment


          • #6
            The other idea was:
            Instead of this
            Code:
            .      WhateverAlarmEvent_1        ALARM_BIT_1
            .------------] [---------------------(O)
            .      WhateverAlarmEvent_2        ALARM_BIT_2
            .------------] [---------------------(O)
            .      WhateverAlarmEvent_3        ALARM_BIT_3
            .------------] [---------------------(O)
            .
            .
            .       trigger                     |  PKB     ALARM_WORD
            .---------]^[-----------------------+
            .                                   |  ALM_BIT_1
            .                                   |  ALM_BIT_2
            .                                   |  ALM_BIT_3
            .                                   |  ALM_BIT_4
            .                                   |    ~~~~
            .                                   |  ALM_BIT_32
            .                                   +------------------------
            use this
            <<This way, the alarm bits are already packed into an ALARM_WORD and the same 'compare to ZERO' works>>
            Code:
            .      WhateverAlarmEvent_1        ALARM_WORD:1
            .------------] [---------------------(O)
            .      WhateverAlarmEvent_2        ALARM_WORD:2
            .------------] [---------------------(O)
            .      WhateverAlarmEvent_3        ALARM_WORD:3
            .------------] [---------------------(O)
            .

            Comment


            • #7
              Adding the compare contact (Alarm_Word<>0) to trigger the alarm worked. Prior to that it was looking for the individual Alarm1, Alarm2, etc. bit to be on. Now any of the alarm bits fire the horn.

              Thanks a bunch.

              Comment


              • #8
                Thank you for responding with your results.

                Comment


                • #9
                  Originally posted by kewakl View Post
                  Thank you for responding with your results.
                  I second that, it's nice when people reply whether or not something worked. It makes people much more likely to help.

                  Comment

                  Working...
                  X