Point one screen at many machines with indirect addressing
Migrated page, not yet verified against the current code. Treat values, paths and examples as indicative until this notice is removed.
An area has many pumps with the same tags, one folder each: Plant/Area1/P101/Start, Plant/Area1/P102/Start and so on. The operator picks a pump, and one detail panel shows and commands the pump picked. You draw the panel once, with {@Plant/Area1/Selected} where the pump’s folder goes. The String tag Plant/Area1/Selected holds the name of the pump picked (P101). When its text changes, the panel follows.
Screen parameters and indirect addressing do different jobs:
- Screen parameters (
{Pump}) are fixed when the screen opens: one popup per pump, the parameter set chosen by the button that opens it. See Reusable screens with parameters. - Indirect addressing (
{@Tag}) follows a tag’s text while the screen is open: the same screen switches to another machine when the tag changes. The selection can come from the operator, a sequence in the PLC or a recipe.
You can combine them: {@{Area}/Selected} reads the selection tag of the area the screen was opened with. The full rules are in the Screen parameters reference.
Before you start
Section titled “Before you start”- Every machine’s tags follow the same layout: one folder per machine, the same tag names under it.
- The selection is a String tag whose text is exactly one folder name:
P101, neverPlant/Area1/P101. A text tag of a controller or a driver mapping does this (Text tags); local tags (eaxTags) are numeric and cannot hold it. - The selection decides where the panel’s commands go. Give write access to it only to the roles that may command every machine it can name, and set its write range’s allowed texts to the machine names.
- You can edit screens (Engineer role). Indirect addressing is in every edition.
1. Draw the panel with {@Tag}
Section titled “1. Draw the panel with {@Tag}”- Create a screen, for example Pump detail.
- Wherever the pump’s folder goes, write the indirection instead:
- a text bound to
Plant/Area1/Selected, so the operator sees which pump the panel shows; - a value display bound to
Plant/Area1/{@Plant/Area1/Selected}/Running; - a START button: action Set tag to 1 on
Plant/Area1/{@Plant/Area1/Selected}/Start, confirmation Require Confirmation, disabled conditiontag('Plant/Area1/{@Plant/Area1/Selected}/Fault') == 1; - a STOP button: Set tag to 0 on
Plant/Area1/{@Plant/Area1/Selected}/Start.
- a text bound to
{@...}works in bindings, expressions, conditions, visibility rules and action targets. Scripts (a startup script, Run script) are never resolved, as for parameters.
The text of the selection tag stands for one folder or name of the path. It is used only when it is letters, digits and _ . -, does not start with ., and is at most 128 characters long: never a /, .., a wildcard, a brace or a space.
Give every command with an indirect target a confirmation: the dialog is where the operator sees which machine the command goes to (step 4).
2. Check the panel in the Studio
Section titled “2. Check the panel in the Studio”In the binding and expression editor:
- typing
{@offers the String tags, and typing{offers the screen’s parameters; - an indirection whose tag does not exist is marked “Indirection tag: no such tag”;
- an indirection whose tag is not a String tag is marked “Indirection tag: not a String tag (its text must name one path segment)”.
The server’s checker accepts {@...}: it is not reported as a syntax error.
3. Let the operator pick the pump
Section titled “3. Let the operator pick the pump”The selection tag is written like any text tag. For example, on the overview, add a Selector on Plant/Area1/Selected with one option per pump (P101, P102…): a value that is not a number is written as text. The PLC can also set it, for example from a station sequence.
4. What the operator sees
Section titled “4. What the operator sees”- When the selection changes, the panel subscribes to the new pump’s tags first. Meanwhile its objects are dimmed and take no press, for at most 2 s, until the new values are in. Then they are drawn from the new pump, and the old pump’s tags are released.
- The confirmation dialog names the target, for example “Target: Plant/Area1/P101/Start”, and keeps it from the moment it opens. This holds for Require Confirmation, Require E-Signature and the Variable confirmation.
- If the selection changes while the dialog is open, the dialog says “The selection changed: this command would now go to Plant/Area1/P102/Start. The target stays Plant/Area1/P101/Start: cancel and open it again.” Its confirm button is disabled and the signature prompt refuses to sign. The operator cancels and presses the button again. If it changed just as the dialog closed, nothing is sent: “Command not sent to …: the selection changed while you were asked. Nothing was written.”
- If the selection has no usable value (the tag is missing, not Good, not a String tag, or its text is not one folder name), the objects that read through it show no value, and a command is refused before anything is sent: “The indirection Plant/Area1/Selected has no usable value (quality Bad): nothing was sent.”
- During a switch, a press is refused: “The target is being switched: nothing was sent. Try again in a moment.”
5. What the server checks
Section titled “5. What the server checks”The runtime sends the resolved path, the target as the screen holds it and the screen. The server never takes the resolved path on trust:
- The write is accepted only when the screen has an object that writes that target, and the server’s own resolution with the selection’s current text is exactly the path sent.
- Otherwise it is refused and nothing is written:
403 indirect_target_refused(no such object on the screen, an indirection tag missing, not Good, not a String tag or not one folder name), or409 indirect_target_changed(the selection changed after the operator was shown the target). Both are journaled asWRITE_DENIED_INDIRECT_TARGET. - Then every other check runs on the resolved path, as for any write: the tag exists, the user’s write permission, remote access, limits, interlocks, confirmation, signature and the screen’s Required Access Level.
- A pump tag that only the panel writes can only be written through the panel. When no screen, copy or dashboard writes
Plant/Area1/P101/Startby its own path or through a{Name}parameter, a direct write of that tag from a script, an API client, a NATS command or an AI approval is refused (403 indirect_target_refused). A tag that another object writes by its own path keeps the checks it had. - The interlock follows the pump. The disabled condition above uses the same
{@Plant/Area1/Selected}as the target, so the server readsPlant/Area1/P101/Faultfor a write toPlant/Area1/P101/Start. An interlock with an indirection that the target does not have fails closed: the command is refused unless If the interlock reads a Bad value is Allow.
Limits
Section titled “Limits”- Isometric (2.5D) blocks and dashboard cards do not resolve
{@Tag}: a command with one is refused, never sent to the path as written. Use indirect addressing on 2D screens. - An operator faceplate or an input opened on an indirect target keeps the target it opened with. If the selection changes while it is open, the server refuses its write (
409 indirect_target_changed), and the faceplate or input shows no notice of the change before that. Close it and open it again.
Verify
Section titled “Verify”- Set the selection to
P101. The panel shows P101’s values. Press START: the dialog says “Target: Plant/Area1/P101/Start”. - With the dialog open, set the selection to
P102from another station. The dialog says the selection changed, and its confirm button is disabled. - Set the selection to a text that is not one folder name, for example
P101/Start. The panel shows no values, and START says nothing was sent. - In the audit trail, refused writes of the panel are under
WRITE_DENIED_INDIRECT_TARGET.