10 Replies Latest reply on Jul 31, 2018 8:15 PM by vkaufmann

    Filtering negative tag values in attributes in AF Analyses


      Dear Forum Members,

      I need your help.

      I create totalizers in AF Analyses using TagTot Function. In the source tags for totalizers I need to filter negative values, replacing them with zeros.

      Here's what I did:

      1. Created attributes with Data Reference: PI Point . In Settings I attached a PI tag (\\PISrvName\TagName). Attribute Name = TagName

      2. Created attributes with Data Reference: Formula . String of settings: A=TagName;[if A < 0 then 0 else A] . Attribute Name = TagName_FILTERED

      In principle, the second attribute receives data and filters it, but when the first attribute has a bad value, the second attribute has an error: "Data was not available for attribute 'TagName' ". And then the totalizer gives an error "Calc Failed".

      In other cases, the totalizer works correctly.

      Please tell me what I did wrong. Is there a more correct way to filter tag values in an attribute for a totalizer?