Configuring Ignition Multi-Instance Valve Pop-Ups Guide

Tom Garrett5 min read
HMI ProgrammingOther ManufacturerTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Ignition treats a pop-up window as a named navigation object. The number that matters is the count of live window instances: five valve symbols may all target Control/Valve, but ordinary window navigation resolves that path to one reusable window. To display valve 1 and valve 2 simultaneously, create a separate instance for each request with system.nav.openWindowInstance and pass the selected valve's TagPath into that instance.

Window Reuse Versus Multiple Instances

The two navigation calls support different operator workflows. system.nav.openWindow opens or reuses the named window. That behavior suits a single-detail display: selecting another valve updates or reuses the one available pop-up rather than creating another visible copy.

system.nav.openWindowInstance creates an additional instance of the same window definition. Each instance receives its own parameter dictionary, allowing multiple copies of Control/Valve to display different valve paths at the same time.

Approach Instance behavior Operator result Best use
system.nav.openWindow Opens or reuses the named window One valve pop-up remains in use Single-detail workflow
system.nav.openWindowInstance Creates another instance Valve 1 and valve 2 can remain visible together Side-by-side comparison or concurrent control
Combined mouse-button logic Left click reuses; right click creates The operator chooses the behavior per click Interfaces that need both modes

For a requirement that every selected valve open another pop-up, use system.nav.openWindowInstance for the valve click action. Use the combined design only when operators have a defined need for both a reusable window and additional instances.

Instance Identity and Parameter Binding

The window path identifies the reusable design, while the parameter dictionary supplies installation-specific context. In the shown design, the valve component's parent exposes TagPath. The click script reads that value into param1 and passes it to the pop-up under the parameter name TagPath.

Quantity or identifier Meaning Where to read it
Live instance count Number of concurrently open valve pop-ups Count the visible instances during the operator test
event.source.parent.TagPath Valve-specific path selected by the click Parent container property of the clicked component
Control/Valve Window definition used for every valve instance Navigation script and project window tree
TagPath Parameter key delivered to the pop-up Dictionary in the open call and the pop-up's root parameters
event.button Mouse button that triggered the event mouseClicked event object

Each pop-up must bind its display and command components through the received TagPath. If any component still uses a fixed valve path, every instance may show or command the same valve even though the navigation call created separate windows. Instance creation isolates the window copies; correct parameter binding isolates their data contexts.

Recommended Multi-Instance Script

Place the following logic in the valve symbol's mouseClicked event when every click must produce another pop-up:

param1 = event.source.parent.TagPath
windowInstance = system.nav.openWindowInstance(
    'Control/Valve',
    {'TagPath': param1}
)
system.nav.centerWindow(windowInstance)

The return value from system.nav.openWindowInstance identifies the new instance. Pass that value to system.nav.centerWindow; otherwise, centering code may target the wrong window or lack the instance reference needed to position the new copy.

  1. Add a TagPath property to the valve symbol's parent container if that property is not already part of the reusable object.
  2. Assign the appropriate valve path to each symbol instance.
  3. Open the valve window with system.nav.openWindowInstance.
  4. Pass a dictionary whose TagPath key matches the parameter consumed by the pop-up.
  5. Capture the returned window instance and pass it to system.nav.centerWindow.
  6. Bind the pop-up's indicators, status fields, and commands relative to its received TagPath.

Optional Left-Click and Right-Click Behavior

A mixed interaction can reserve the left mouse button for the reusable pop-up and the right mouse button for an additional instance:

param1 = event.source.parent.TagPath

if event.button == event.BUTTON1:
    window = system.nav.openWindow(
        'Control/Valve',
        {'TagPath': param1}
    )

if event.button == event.BUTTON3:
    windowInstance = system.nav.openWindowInstance(
        'Control/Valve',
        {'TagPath': param1}
    )
    system.nav.centerWindow(windowInstance)

This design makes the instance policy part of the operator gesture. It also creates a discoverability requirement: operators must know that left and right clicks have different effects. If the operating procedure simply says that every valve selection opens another window, the single-action multi-instance script is clearer and produces fewer ambiguous outcomes.

Verification and Recurring Failure Modes

  1. Click valve 1 and confirm that one Control/Valve pop-up opens with valve 1 data.
  2. Leave that pop-up open, then click valve 2. Confirm that a second pop-up appears and the first remains visible.
  3. Operate a harmless test control or observe a changing status on each pop-up. Confirm that each instance reads and writes only through its own TagPath.
  4. Open additional valves up to the five-valve use case. Confirm that the client remains usable and that operators can distinguish and close each instance.
  5. Close one pop-up and verify that the remaining instances retain their original valve bindings.
Symptom Likely cause Check Correction
Second click does not leave two windows visible The script still calls system.nav.openWindow Inspect the component's active mouseClicked script Call system.nav.openWindowInstance
Two windows show the same valve A fixed path or shared context bypasses the instance parameter Inspect bindings inside Control/Valve Resolve bindings and commands through the received TagPath
The pop-up opens without valid data The source property, dictionary key, or destination parameter does not match Compare event.source.parent.TagPath, the TagPath key, and the pop-up parameter Use the same parameter name and provide a valid valve path
The new window is not centered The returned instance was not passed to the centering call Check the assignment to windowInstance Call system.nav.centerWindow(windowInstance)
Right click behaves like left click Button constants or event placement are wrong Confirm the logic is in mouseClicked and compares event.button Use event.BUTTON1 and event.BUTTON3 in their intended branches

Frequently Asked Questions

What happens if I use system.nav.openWindow for every valve?

The named Control/Valve window is opened or reused, so selecting valve 2 does not provide the required second independent instance. Use system.nav.openWindowInstance when both pop-ups must remain visible.

What happens if two instances receive the same TagPath?

Both windows resolve their bindings against the same valve context. Check each symbol's event.source.parent.TagPath value before examining the pop-up bindings.

What happens if I do not save the returned window instance?

The pop-up can still be created, but the shown centering step needs the returned reference. Assign the result to windowInstance and pass it to system.nav.centerWindow.

What happens if operators need both single and multiple pop-ups?

Map event.BUTTON1 to system.nav.openWindow and event.BUTTON3 to system.nav.openWindowInstance. Document the mouse-button behavior in the operator interface or operating procedure.

When should I stop troubleshooting and contact official support?

Escalate when the verified mouseClicked script calls system.nav.openWindowInstance, passes distinct valid TagPath values, and separate instances still cannot be created or retain their bindings. Provide official support with the window path, event script, parameter definition, observed client behavior, and relevant diagnostic messages.

Back to blog