GregDumas

Configuring Modbus tags to display correctly in PI

Discussion created by GregDumas on Oct 14, 2009
Latest reply on Oct 14, 2009 by spilon
I am working with a tag that stores a value in the range of 0-1000, and uses bit 15 as sign bit. The format that need the data in is from -1 to 1. For positive values this is easy, as I can just set SquareRoot = 3 and Conversion = 1000 to get my value between 0 and 1. However, when the value is negative (bit 15 is 1), the value is stored as a large negative value. Is there an easy way within PI to convert this to a value between -1 and 0? I was thinking that I might need to use bit masking but I'm not coming up with anything viable.... Thanks in advance for any ideas here.

Outcomes