Skip to main content

Hello, I’m looking for a way to setup of formula to return value of tag A during certain condition based on value of another tag B.

 

The goal is to check, if during specific phase (“phase” is when tag B is in the range of 1 and 10), the value of A tag exceeds the value captured during the start of the phase, for, let’s say, 5 points increase.

I assume this all can be done setting up using formulas and monitoring, but the bottleneck currently is to capture the start value of the tag during the start of the phase and to reference to this value during the phase duration (and this logic should be happening with each new phase, indeed).

Example for better understanding: tag B becomes 1, we need to capture the value of tag A at this moment (let’s say 3), and then during all the time when tag B is going the way from 1 to 10, we need to constantly check if the value of tag A is not increasing on more than 5 points (meaning, threshold for this specific phase would be 3 + 5 = 8); so if value of tag A is > 8, the formula for “event monitoring” would capture this and return TRUE, otherwise it will be FALSE. And again, this should only be happening within each phase individually (when tag B is in the range of 1 and 10).

 

I couldn’t find a way to reach that goal using formulas builder, could you please suggest a way to solve this?

Hi Roman,

 

To implement this kind of logic you would have to use the custom calculations in TrendMiner. 

I attached an example script which applies to the use case you mentioned in the script I took the following steps:

  1. I create a value based search to search when tagB is between 1 and 10 (please review the min and max duration for search results to further finetune the tag).
  2. I calculate the start value of tag for the search results with the calulcations on search results.
  3. I then fetch the data of tagA for the search results intervals and calculate the max of this interval for tagA
  4. Last I check if the max tagA - start value tagA >= 5.

The values we return are 1 and 0 to match the true and false states.

Let me know if you have any questions.

Our product team is always looking to enhance the TrendMiner platform, monitor on these kind of complex conditions is definitely a great product idea feel free to post it in the Product Ideas section of the community.

 

 

 


Thank you, that works as expected!


Reply