I could not find the answer in the documentation so I am hoping someone from OSIsoft may shed some light:

I am currently using the in .. operator (`If 1 in 0 .. 2 Then 1 Else 0) in a performance equation but I am using it with for a PI tag that has a float32 value. Here is my example:`

Not('CGL:% Iron Top' in 5 .. 20)

'CGL:% Iron Top' is a PI Tag of type Float32. All of the example show only Ints being used. I am wondering how this is handled. It seems to work and it is a very powerful choice for what I need. I am hoping that 4.99 and 20.01 are out of the range. I am not sure if the Float is being converted and possibly rounded or truncated.

Thank you in advance for your response

Hello Mike,

I wasn't aware this Performance Equation functionality exists but I just tried it and it works with a Float32 point too.

I've tested the functionality using PI SMT:

- Used the Point Builder plug-in to create 2 tags 'Int32Point' as Int32 type and 'Float32Point' as Float32 type.

- Used Archive Editor plug-in to apply values: Int32Point=6, Float32Point=5.66

- Used Performance Equation Builder plug-in to create a new PE tag with type Int32 and tested (tab Equation) by modifying the equation and hitting [Evaluate]:

Equation

Result

If 'Int32Point' in 5 .. 10 Then 1 Else 0

1

If 'Int32Point' in 6 .. 10 Then 1 Else 0

1

If 'Int32Point' in 7 .. 10 Then 1 Else 0

0

If 'Float32Point' in 5 .. 10 Then 1 Else 0

1

If 'Float32Point' in 6 .. 10 Then 1 Else 0

0