Why didn't my recurring form trigger? (Continuous vs. Cumulative Time)
The Issue
You have a form set to repeat every 120 minutes based on a Machine State (e.g., Running). However, the form does not trigger even though the machine has been "Running" for a total of 3 hours over the course of the morning.
The Explanation
OFS-Flow triggers evaluate uninterrupted spans of a state. They do not "buffer" or accumulate time across different events.
-
How it works: When the machine enters the target state (Running), a timer starts. If the machine stays in that state for the full duration defined in your trigger (e.g., 2 hours), the form fires.
-
The "Gap" Problem: If the machine state changes—even for a single minute—the timer for that specific span is destroyed. When the machine returns to "Running," the timer starts from zero.
Example Scenario:
-
08:00: Machine starts Running (Timer starts).
-
08:20: Unplanned Downtime for 5 minutes (Timer is killed).
-
08:25: Machine starts Running again (Timer starts at 0).
-
10:05: Machine is still Running.
-
Result: No form triggers. Even though the machine ran for 120+ minutes total, it only ran for a maximum continuous span of 1 hour and 40 minutes.
Key Caveats
-
State Sensitivity: Any state not explicitly selected in your trigger will break the chain. If your trigger is set only for "Running," then "Run Slow" will reset your timer.
-
The "Start" Toggle: If you have the "Start" toggle ON, the form will fire immediately when the state begins (or after the offset). The 2-hour "Repeat" timer then begins after that first alert is generated.
-
Shift Changes: Depending on your configuration, a shift change or a job change can also conclude a state span, effectively resetting your frequency timer.
Best Practice Recommendation
If your production environment is prone to micro-stops or frequent short downtimes, a 2-hour Machine State repeat may be too "fragile."
The Alternative: Use a Shift-based Trigger with a repeat interval. Shift triggers look at the wall-clock time of the shift rather than the machine's heartbeat, ensuring the form pops up every 2 hours regardless of technical interruptions. Here is an article on setting up count based triggers.