Skip to main content
Solved

Creating a custom phase/signal using a State Tag trigger and clipping the end with a Valve Falling Edge

  • June 24, 2026
  • 1 reply
  • 35 views

Hi everyone,

I am trying to build a highly accurate, custom binary (0/1) signal to track a specific cooking phase on a production line. The standard state tags stay active too long, and I need an out-of-the-box solution using TrendMiner's formula tool or search capabilities to handle misaligned PLC signals.

The Challenge:

  • Start Condition: A state tag transitions to >= 3000 and < 7000. This triggers the start of the cooking phase.

  • The Process: While in this state, a cooling/discharge valve cycles ON (1) and OFF (0).

  • The Problem: The state tag continues to sit at 5000+ long after the physical process is done. A point-by-point IF statement formula fails because if the valve isn't open the exact second the state hits 3000, the formula evaluates to 0 and misses the batch.

  • The Goal: I want a calculated tag or capsule that jumps to 1 when the state hits 3000, stays at 1 through the process, and drops to 0 the exact moment the valve goes from 1 -> 0 (falling edge), completely returning 0 for the remainder of that residual 5000 state.

Because standard point-by-point formulas face timing alignment issues here, what is the best way to achieve this "latching" logic?

Best answer by Kevin

Hi Tim - the use case you described, if I understand it correctly, would require self-reference or recursion, which is not possible in Formula Tag Builder. In order to correctly create this latch binary tag, we will need to use our Custom Calculations Tag Builder feature. This feature allows tag creation via Python scripting which gets us out of the point-by-point constraint. If you are interested, please reach out to your TrendMiner CSM and we can further assist. Thank you!

1 reply

Kevin
Employee
Forum|alt.badge.img
  • Employee
  • Answer
  • June 25, 2026

Hi Tim - the use case you described, if I understand it correctly, would require self-reference or recursion, which is not possible in Formula Tag Builder. In order to correctly create this latch binary tag, we will need to use our Custom Calculations Tag Builder feature. This feature allows tag creation via Python scripting which gets us out of the point-by-point constraint. If you are interested, please reach out to your TrendMiner CSM and we can further assist. Thank you!