Announcement

Collapse
No announcement yet.

Discrete Output Array

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

  • Discrete Output Array

    Is it possible to use an array to directly control discrete outputs in the Productivity platform? Can I build an array that is directly mapped to either discrete output tags or System ID addresses and manipulate them directly using an array index?

  • #2
    https://accautomation.ca/productivit...ctions-part-1/

    The above post will show defining an array and use this in an indirect addressing program. This will sequence bits in an output card indirectly.
    Here is a link to the entire P1000 series.
    https://accautomation.ca/series/productivity-1000-plc/

    Regards,
    Garry
    _________________________________________________
    Garry
    ACC Automation
    https://www.accautomation.ca
    Connect with us on Facebook: facebook.com/accautomation/

    Comment


    • #3
      Garry,
      In your example the Sequence array using Pointer as the index is a 16 bit integer array. With the unpack bits command during the iterative process it looks like the "bits" being unpacked are the word values at index Pointer. It also looks like you're limited to "unpacking" only up to sixteen values because the Sequence array is a 16 bit integer array. I'm assuming if you selected a 32 bit integer array you'd be able to unpack 32 words. Is this correct? The problem with this is that I have about 120 outputs that I'm trying to index through. It looks like the unpack command might be able to be used but you'd have to create some kind of logic to work around only being able to unpack 32 "bits" at a time?

      Comment


      • #4
        You are correct. If you select a 32-bit integer array you would be able to unpack 32 bits.
        120 outputs would be handled by creating four-pointer variables.
        Example: Use a 32-bit integer array instead of the 16-bit.
        Pointer = 1
        Pointer2 = 2
        Pointer3 = 3
        Pointer4 = 4
        Each of the pointers then would increment by 4 when you wanted to advance.
        All of the pointers would unpack a 32-bit memory area. This would give you 128 bits for your outputs.

        I hope this helps you out.
        Regards,
        Garry
        _________________________________________________
        Garry
        ACC Automation
        https://www.accautomation.ca
        Connect with us on Facebook: facebook.com/accautomation/

        Comment


        • #5
          Thanks for the help Garry. It looks like it can be done but not as straight forward as I'd hoped. I work with the BRX as well and this operation is relatively trivial there.

          Comment

          Working...
          X