How to execute multiple Vision template timers in a fixed sequence order?

Details

I'm developing a dynamic process in Ignition Vision. My process consists of several reusable templates connected together, for example:


Source
   ↓
Pipe
   ↓
Valve
   ↓
Pipe
   ↓
Distillation Column
   ↓
Distillate Pipe
   ↓
Valve
   ↓
Final Distillate Pipe

Bottom Pipe
   ↓
Valve
   ↓
Final Bottom Pipe

Each template (Source, Pipe, Valve, Column, etc.) has its own Timer component that performs calculations and updates outputs.

The issue is that each timer runs independently, so there is no guaranteed execution order. Sometimes downstream components (such as valves or pipes) execute before upstream components have updated their outputs, resulting in components using stale data.

I experimented with different Initial Delay values (for example Source = 0 ms, Pipe = 10 ms, Valve = 20 ms, etc.), but since Pipes and Valves are reused multiple times throughout the process, using the same template causes all instances to have the same timer settings unless I manually override every instance.

My questions are:

  1. Is there a recommended way in Ignition Vision to execute multiple template calculations in a deterministic sequence?
  2. Is using multiple Timer components considered good practice for process simulation?
  3. Would a single master timer that updates all templates sequentially be a better architecture?
  4. Has anyone implemented a scheduler or execution manager for Vision templates?

My goal is to have calculations execute in a fixed order, such as:


Source
→ Feed Pipe
→ Feed Valve
→ Column
→ Distillate Pipe
→ Distillate Valve
→ Final Distillate Pipe
→ Bottom Pipe
→ Bottom Valve
→ Final Bottom Pipe

so that each component always receives the latest values from the previous component.

Any recommendations or examples would be greatly appreciated.

No, sorry. And such process-specific tasks belong in the gateway, not in a Vision client.

What Phil said. Think too about what if someone opened up a second vision client, now you're in a world of hurt with these timers fighting each other from across clients.

Have your gateway run the sequence and write results to the tags that your template will read from and display, it can be that simple if no user input is required mid way through.

Running a series of steps in order is also literally the entire raison d'etre of the SFC module:

One additional point about my application:

The process flow is not fixed. Users can build different process configurations at runtime by adding, removing, or reconnecting templates. For example, one process might contain:

Source → Pipe → Valve → Column

while another process might contain:

Source → Pump → Heat Exchanger → Tank → Valve

or any other combination.

Templates or objects such as Pipes, Valves, Pumps, and Columns are reused multiple times, and users can dynamically create or delete instances while the application is running.

Because of this, I cannot hardcode a fixed execution sequence or manually configure timer delays for every template instance. The execution order needs to be determined dynamically based on the current process connections, so that upstream components are always calculated before downstream components.

Has anyone implemented a dynamic execution scheduler or dependency-based update mechanism in Vision for this type of configurable process simulation? Any recommendations on the best architecture for this scenario would be greatly appreciated.

What is rendering these templates dynamically at runtime—a Template Repeater, a Canvas?

Consider moving the timer logic out of the individual templates to the window. Instead of individual timers, use a single timer, and let the templates supply a list or dictionary of template presets that can be sorted according to index position within the repeater's or canvas's template parameters. The timer value could be offset by a fixed amount for each template’s index in the list, and a modulo operation could then compare the accumulated value against each preset independently of the timer’s absolute value. This way, the timer doesn't need to be bound to any specific preset value.

One additional challenge in my application is that the process topology is completely dynamic.

The process is not limited to a simple linear flow, and users can create or modify the process at runtime. For example, a user may create:

Source → Pipe → Valve → Column

or

Source → Pump → Heat Exchanger → Tank → Valve

or even more complex flows such as:

Source → Pipe → Valve → Column → Pipe → Valve → Column → Pipe

The same template or objects(Pipe, Valve, Pump, Column, etc.) can appear multiple times within a single process, so there is no fixed number of instances or a predefined execution order.

In addition, the process does not always start from a Source template. In some cases, the simulation may begin from the middle of the process (for example, a Column, Tank, or Pump), and in closed-loop or recycle systems the flow may even contain feedback paths. Therefore, the execution order cannot simply be hardcoded as "Source → Pipe → Valve → Column".

Because of these requirements, I need an execution mechanism that can determine the correct calculation order dynamically based on the current connections between templates. Ideally, each component should execute only after all of its upstream dependencies have been updated for the current simulation cycle.

Has anyone implemented something similar in Ignition Vision, such as a dependency graph, topological execution scheduler, or another approach for configurable process simulations?

The process still needs to execute on the gateway. Presumably via a timer event, with configurable state machine code to call many snippets. Have the Vision UI tell the gateway to set up the desired structure, and then monitor with Vision.