Change negative Float32 to Digital with -1/0 data in archive

Hi all,

I have added all binary signals as Float32 data point 2 yrs ago. Furthermore, i haven´t set compression deviation to 99d resulting in -1 and 0 values every 8 hours (standard settings) for all closing valves. Is there a chance to correct around 100 data points without extracting and backfilling (huge data and a lot of manual work)?

PS: It is not possible to change negative float32 to digital.

Is there a smart way to solve this "issue"?

Regards,

Marcus

Parents
  • A PI Digital State Set has the following properties:

    1. Must begin at 0.
    2. Must increment by 1.

    This means you cannot auto-cast a negative number to a digital state code. You would need to have some expression or calculation translate that for you. This may involve either directly mapping an input of -1 to some state, or simply using Abs(x) on the input.

     

    For future reference, when defining numeric tags you really should consider whether it is to be an integer that may map to a digital state or an AFEnumerationValue. In which case, you may consider reading it as Int32 instead of Float32.

     

    I found the title slightly confusing seeing -1/0 thinking you were trying to divide by 0. If you did try this, PI would store the value as a SYSTEM state 317 for InvalidFloat. After reading the post, I realized you meant values of -1 or 0 in the archive.

  • Is there any possibility to modify the archive data. It will consume a couple of weeks to correct 300 data points one-by-one. A state cannot be mapped to -1. What do you mean with using Abs(x) on the input? Would you do the correction in PSE/AF?

Reply Children