I have a tag (reel#) that always has a 4 digit value (float32 type). I want to create a PE tag that will store that last 2 digits of this 4 digit value. Can anyone lead me in right direction?
I have done in two ways one using PI AF and another using PE.
If you are using PE or AF Analysis then request you to use below expression : FLOAT(RIGHT(STRING('FLOAT TAG'),2)).
AF Analysis :
Another way is to create AF attribute (String) with string builder reference and use RIGHT('FLOAT TAG',2)
If your using the AF the please hit following formula:
Thanks and Regards,
Another technique would be to use the Mod function. Example: 'Your Float32 Tag' Mod 100. Note this returns a numeric value with leading 0's also stripped out. So anything from 00--09 will show as 0-9 instead.
The biggest concern should be that your Float32 value contains only integers. Otherwise, whichever technique you employ, you should convert to integer first.
Int('Your Float32 Tag') Mod 100
I'm guessing it is Float32 because of the interface being used. I would suggest the data type should have been Int32.
Retrieving data ...