I'm looking for a way to find out if a digital state is a system State.
I can cast the value as digital state and can get the code and name. But I cant differentiate if it is a SYSTEM state or a regular state from a digital point. Any ideas?
The IsGood property does this. That's probably the easiest way.
For non-digital tags, IsGood is a way of type-checking the result - i.e. a float32 tag will either return a floating-point number (good) or system digital state (!good). For digital tags, IsGood will be true if the value is from the expected digital state, and false if the value is from the system state set.
It's also possible to examine which state set the value comes from and then see if that equates to the system digital state set, and we can talk more about that if necessary.
Are you using PI SDK or PI AF SDK?
PI-SDK ... weeding through some tags using Excel ...
Yes ... you are correct. I think that is all I need.
Retrieving data ...