Skip to main content
14-Alexandrite
February 20, 2025
Solved

Advanced Tags with unknown values

  • February 20, 2025
  • 2 replies
  • 1213 views

Hi, I'm using an Advanced Tag of type Derived to perform an AND between two boolean tags. It is expected that if one of them is Unknown because the PLC is disconnected, the result will be 0. If I use only the Derived Tag, the result is shown as Unknown in Quick Client. If I use a Link Tag to copy the result of the Derived to another boolean tag, it shows me the value 0 which is the expected value. Is there any way to get the value 0 without using a link tag?

Best answer by MRohilla

Greetings,

You won't be able to obtain the result as a derived tag until you have the values for the input tag. The derived tag calculation fails if an input tag utilized in the computation returns a low-quality value; it does not output a default value, such as 0. It won't be known until every input is of high quality.

Regards,

Mohit

2 replies

15-Moonstone
February 20, 2025

Greeting @anaclos 

 

It sounds like you're encountering an issue with how the Derived Tag handles unknown values in Kepware.

One potential solution is to use a Trigger While Comparison is True trigger type on the Derived Tag. This can help ensure that the Derived Tag evaluates to 0 when one of the boolean tags is unknown. Hereโ€™s how you can set it up:

  1. Create a Derived Tag: Set up your Derived Tag to perform the AND operation between the two boolean tags.
  2. Configure the Trigger: Use the "Trigger While Comparison is True" option to check the quality of the boolean tags. If either tag is unknown, the Derived Tag should output 0.

This method avoids the need for a Link Tag and directly sets the Derived Tag to 0 when one of the boolean tags is unknown.

anaclos14-AlexandriteAuthor
14-Alexandrite
February 20, 2025

Thanks @ntripathi  but only Link Tags have the Trigger While Comparison is True option, in Derived Tags there is the Trigger option to select a particular tag.

MRohilla12-AmethystAnswer
12-Amethyst
March 24, 2025

Greetings,

You won't be able to obtain the result as a derived tag until you have the values for the input tag. The derived tag calculation fails if an input tag utilized in the computation returns a low-quality value; it does not output a default value, such as 0. It won't be known until every input is of high quality.

Regards,

Mohit