2 Replies Latest reply on Apr 21, 2017 5:34 AM by 529931

    Bit manipulation in PI PE/Analytics for 16bit integer values

    529931

      Hello All,

      We have a PLC that sends us a 16 bit integer register, where each bit indicates different alarm statuses. I would like to manipulate the value of each bit, by shifting the bit to right and then performing an AND operation with 1.

       

      Value of bit = (Number >> n) &1

      where, n is the nth bit.

       

      I am trying to do this with PI PE/analytics, but not able to find the shift operators. Could you please help me with this.

      I would also like to know if we have any other ways of determining the bit, if shift operators are not supported in PI. Thanks in advance.

       

      Thanks,

      Nandhini.S