I have a switch, the status of that switch if even tells me equipment is not available and if odd means it is available. is there a function that can help get a similar result?
You will need to provide a bit more information in order to get a decent answer to this question. In what environment are you wanting to use such a function - AF Analytics, PI client tools, a programming environment, etc? Are you looking for something that can be configured, or are you looking for a code solution? At the moment we have no real context in which to begin to provide an answer.
Thanks John for your response. To give you the context; We have recently developed a couple of PI tags to monitor the availability of our critical complex integrated equipment. This PI tag "Eqp.Status" has values from 0 to hundred thousands. It is a 32 bit word and different bit corresponds to different situations, Bit 0 is for available, Bit 1 is for running, Bit 2 is remote, etc. etc.
To evaluate each bit individually from the "Eqp.status" word, i need to divide it and hence, need the MOD and INT functions. I can do this using data-link and working with excel, but if i can create a performance equation I will be easily able to trend it.
Appreciate your time.
You could use the logical AND to do your bit-masking. If ('Eqp.Status' and 1) =1 then available.
If ('Eqp.Status' and 2) =2 then running.
and then 4, 8, ect. ect.
If you can set this up in AF, Asset Analytics includes both functions.Mod: PI Server Int: PI Server
Retrieving data ...