SCADA Manual · Chapter 5

Using tags on screens

Put a tag in a property such as DataName and the screen control displays and writes the value without any script.

DataName notation

NotationTargetExampleUse
TAG.NameA tag in the tag tableTAG.Tank1.LevelUse this for production screens.
PLC.Source.AddressA PLC address directly (temporary tag)PLC.PLC1.D100Commissioning and checks
IO.NameIOIO.DoorProperties that accept IO
Variable nameScript variables, parametersCounter, Mod::Var, SS.NameExisting method
  • The property's search dialog lists tags as TAG.Name on properties that support them, searchable by address and description too.
  • Everything after TAG. is the tag name. The name may contain dots.
  • Missing tags: entering a TAG.Name that is not in the table opens a window that creates the tag on the spot. A PLC.Source.Address can be turned into a regular tag too. See 'Creating a missing tag on the spot' below.
  • Limits of PLC. temporary tags: the control decides the type (Bit for state displays, Word for numbers). They are not in the tag table, vanish when the project closes, and log a message when first created. Source names cannot contain dots.

Supported controls

KindControlProperty that takes a tagDirection
DisplayXDataLabelDataNameRead
DisplayXOnOffDisplay, XLampDataName (IO too)Read
InputXTextBox, XNumericUpDown, XTrackBar, XCheckBoxDataNameRead, write
ButtonXPlcButtonDataName (tags only)Write, shows state
DiagnosticsXTagListViewNone (whole tag table)Read, write
ShapeXShapeRectangle, XShapeCircleDataNameStateA/B, RotateDataName, MoveXDataName, MoveYDataName, ScaleDataName, FillLevelDataNameRead
ShapeXShapeTriangle, XShapeLineRotateDataName, MoveXDataName, MoveYDataName, ScaleDataName (triangle also FillLevelDataName)Read
ImageXImageRotateDataName, MoveXDataName, MoveYDataName, ScaleDataName, FillLevelDataNameRead
ImageXImageDisplayImageIndexDataName and the properties aboveRead
ImageXAnimateImageDataNameStateA/BRead
MimicSymbols (pump, valve, tank, gauge, Symbol, etc.)DataNameStateA/B, ValueDataNameRead
MimicXMimicPipeFlowSpeedDataNameRead
  • The plain XButton does not write tags; use XPlcButton.
  • Charts and gauges (the nine controls of the Chart & Gauge toolbox group) cannot connect to tags directly either, so a script copies the value into a variable that they use (chapter 13 of the Chart & Gauge manual in QMS Help).
  • The Mimic Symbol can also fill its names from TagPrefix. A prefix that starts with TAG. (TAG.P101 → TAG.P101_Run) connects to tags. (Mimic — Symbol library)
  • For the full list of controls see the UI Control Reference.

Quality display

Controls connected to tags show bad quality by themselves; you do not build anything. For 1 second after a screen opens, the not-connected display is held back while waiting for the first value.

LookStateMeaning
Red border and grey washBad, NotConnected, UnlicensedThe value is wrong or was not received. Unlicensed is a tag beyond the licensed count that is not read. (License — external tag count)
Yellow borderStale, UncertainThe value is old or uncertain.
Blue dashed border and an hourglass ⌛ at the top rightWritingA value is being written to the tag.

Shapes whose bounding box is much larger than the shape, such as lines and triangles, use a small badge instead of a full overlay. Colours follow the theme. For the rules on Mimic symbols see Mimic — Common rules.

The three SCADA controls

Found in the toolbox SCADA group. The toolbox shows them without the leading X (Lamp · PlcButton · TagListView).

XLamp — status lamp

PropertyValue
DataNameTAG.Name, PLC.Source.Address, IO.Name, bool variable
OnColor, OffColor, BlinkColorOn, off, and blink colours
BlinkNone · WhenOn (blinks when on: alarm) · WhenOff (blinks when off: standby)
ShapeCircle · Square · Lamp (industrial indicator look)
Caption, LabelPositionLabel text and place: Right · Bottom · None

XPlcButton — tag write button

PropertyDefaultMeaning
DataNameTAG.Name or PLC.Source.Address. Variables are not accepted.
WriteModeMomentaryMomentary 1 while pressed, 0 on release · Set press writes 1 · Reset press writes 0 · Toggle press writes the opposite
ConfirmWriteOffShows a confirmation before writing. Set, Reset, Toggle only.
RequiredLevelOperatorMinimum level to press. If lower, a login window opens. The tag's Write Level is checked separately.
WriteEnableOnRunOnWhen off, blocked while the machine is running.
ShowStateOnShows the pressed look (DownBackground) while the tag value is on.

Release guarantee of Momentary. While pressed, it checks for release at a short interval, and if another window takes input away it treats that as a release. The release write (0) is sent whatever the result of the press write, even if the tag loses its license place while the button is held (Unlicensed). Use it for commands that act only while pressed, such as jogging.

XTagListView — tag diagnostics table

XTagListView — find bar, Problems only, and the Name, Value, Unit, Quality, Updated, Source, Address, Type, Description columns
XTagListView — find bar, Problems only, and the Name, Value, Unit, Quality, Updated, Source, Address, Type, Description columns

Shows name, value, unit, quality, update time, source, address, type, and description. Editing the value cell writes to the tag.

PropertyDefaultMeaning
AllowWriteOnAllows value cell editing
RequiredLevelMaintMinimum level to write. A higher tag Write Level takes priority.
SubscribeAllOnReads all visible tags. When off, it shows only values read by other screens and scripts, without extra PLC reads.
FilterInitial filter text (e.g. PLC1)
ProblemsOnlyOffShows only tags with bad or old quality. Same as the Problems only check box on the find bar.
ShowFilterBarOnShows the find bar
ShowPollStatsOffShows traffic per source below the table ('Checking the traffic' in Poll groups and traffic)

Input controls

  • Text box (XTextBox): writes only changed values. On Enter or losing focus, it writes if the value differs. The number pad writes on OK.
  • Up/down (XNumericUpDown) and track bar (XTrackBar): if the value changes again during a write, only the last value is written next, so old values do not trail in after you let go. The track bar writes only during user operation.
  • Check box (XCheckBox): for Bit tags.
  • On failure, an auto-closing message appears and the display returns to the tag value. Any pending next value is dropped.
  • A tag's Min and Max become the input range.

Shapes and Mimic

  • State A/B: A on and B off gives state A; A off and B on gives state B; otherwise the default look. This rule models cylinder forward and backward sensors.
  • Motion: connect numeric tags to rotation (Rotate), movement (MoveX/Y), size (Scale), and fill (FillLevel).
  • Mimic values: connect a tag to ValueDataName and set the range with ValueMin and ValueMax. Pipes show flow speed with FlowSpeedDataName.

Creating a missing tag on the spot

When a tag does not exist yet while you draw a screen, create it right there instead of going to the Tag Editor. The same New Tag window opens from every place.

WhereWhen it opensResult
A property box (a DataName that takes tags)When you enter a TAG.Name that is not in the table and press Enter or leave the box. Tag-only boxes (XPlcButton) take the bare name tooThe property becomes TAG.Name
PLC.Source.Address in a property boxWhen you enter a temporary tag. Source and address are filled in; just give it a nameIt is registered as a regular tag and the property becomes TAG.Name
The property search windowThe New Tag… button at the bottom. The search text becomes the nameThe search window closes with that tag
Script editor+ New Tag at the end of the TAG[ autocomplete listTAG["Name"]. is inserted and the member list follows

Prefilled values

  • Source: the source used last in this session → the only communication object that supports tags, if there is just one → LOCAL. The list shows only communication objects that can read and write tags.
  • Address: the next number after the address last created for the same source; otherwise after the last tag of the same source and the same bit/word kind in the table. It skips the size of that tag (2 words for Float) and addresses already in use, and follows the driver number base (MELSEC W1F → W20, MEWTOCOL R070F → R0710). Once you edit the address it is not overwritten when you change the type. For LOCAL, pick a variable with the … button (Pick a variable) next to the address box.
  • Type: guessed from the control. Bit for lamps, on/off displays, check boxes, PLC buttons and state A/B; XTextBox follows its DataType (strings are String, length 8); Float for numeric inputs with decimal places; Word otherwise. When opened from a PLC. address, bit or word follows the device of the address. In the script editor it is the type used last in this session.
  • Scale, offset, unit, poll group, read-only and word swap are under More options. Left as they are, they get the Tag Editor defaults.

Checks

  • ✖ errors (empty name, quotes, an existing name, empty address and so on) follow the Tag Editor rules and block Create.
  • ⚠ warnings still let you create the tag but deserve a look: not a usual address for the driver, a communication object without tag support, a missing variable, tags using the same address, tags with a similar name (differs only in case or separators, or by one typo). Names that differ only in numbers (Tank1/Tank2) are not treated as similar.
  • Click a tag name shown in a warning to use that tag instead of creating a new one. This keeps a typo from becoming one more tag.
  • Cancel or Esc keeps what you typed. If being asked for every PLC. address gets in the way, tick Don't offer this for PLC addresses until QMS restarts at the bottom of the window.

Saving

  • Creating writes the tag table file at once and registers only that tag as a running tag. An open Tag Editor reloads and shows the new row.
  • If the Tag Editor has unsaved edits, the file is left alone and the row is added to the editor table instead. It applies when you save in the Tag Editor. This keeps the two places from overwriting each other.
  • If the tag table file has content that cannot be rewritten here (unreadable, skipped items, unknown items, comments, a newer format), the tag is not created and a notice explains why. Check and save it in the Tag Editor, then try again.
  • Undo in the designer (Ctrl+Z) only reverts the property. Delete the created tag in the Tag Editor.
  • The New Tag window also warns when the licensed count is exceeded. (License — external tag count)
Subscribe