2 of 2 people found this helpful
Unfortunately, this is a known issue (internal, #94315 - Digstate() function should look into SYSTEM digital state set) which has still not been resolved.
Thanks for the info.
It would be good if these known issues were known outside of internal.
That is a very valid point. We are currently performing some major changes on some backend features to more easily expose those backlogs and WI's externally in the near future.
How are you using your DigState function? Could you provide the version of the AF Analysis service?
DIGSTATE is used to convert a string into a corresponding PI Data Archive digital state object, either based on the attribute's digital state enumeration or on a system enumeration set values.
Syntax: DigState(s1 [, x]) where,
s1 = A string representing a digital state in double quotes
x = Optional: An attribute with PI point digital state reference or of value type enumeration set. If omitted, only the system digital set is searched for the given string.
When I test it for a custom Digital State Set, the analysis expression evaluates without errors (Analysis ver. 220.127.116.1165)
1 of 1 people found this helpful
I ran into the same problem. Here's how I made a workaround.
Create a digital PI tag called, say, "SystemDigital" and assign the SYSTEM digital state set to it. Create an attribute for this tag in your element (or element template) and maybe make it hidden.
In your PI-AF code do something like:
'Pump1 Status' = DigState('halfopen", 'SystemDigital')
This will have the affect of assigning your 'Pump1 Status' attribute (and its corresponding PI tag) the customized system digital state value of "halfopen". It works because the DigState function is using the SystemDigital PI tag (which has been assigned the SYSTEM digital state set) as the source for resolving the digital state name.