DataTalk

Set Commands

Turn any element of a view into a control — write a fixed value, ask the operator for a value, increment, decrement or toggle a tag on click, right click, mouse down or mouse up.

On this page

Any element in a view can be configured as a Set command. Set commands let operators interact with the process directly from the visualization: a rectangle becomes a start button, a text becomes an input field for a setpoint, a small triangle becomes an “increase” arrow.

Interaction events

Select an element and scroll the properties panel to the command sections. DataTalk supports four interaction events, each with its own section:

SectionEvent
SetMouse click
Set Right ClickMouse right click
Set Mouse DownMouse button pressed
Set Mouse UpMouse button released

Each section has an Add New button. A single event can perform one or more actions — click Add New repeatedly to add further commands to the same event, so one operator action can change several tags. The people icon next to Add New restricts the command to selected user groups (see Users).

Visibility, Set, Set Right Click, Set Mouse Down, Set Mouse Up and Open sections in the properties panel of a rectangle

Adding a Set command

Select the element

Click the element on the canvas or in the layer tree — for example a rectangle drawn as a button.

Add a command to an event

In the Set section (or Set Right Click, Set Mouse Down, Set Mouse Up) click Add New. A command row appears with a Tag field.

Choose the tag

Drag a tag from the TagDB tab into the Tag field. In a parametric view the varying part of the path is a placeholder — see Parameters.

Choose how the value is set

Click the icon on the left of the command row and select one of the methods described below.

Adjust the properties

Click the gear icon (Properties) to open the settings of the selected method — the value to write, or the step and limits.

Setting tag values

A set command can modify a tag value using four methods:

The four set methods offered by the command row — User Defined Value, Fixed Value, Inc/Dec and Toggle Value

User Defined Value — the operator is prompted to enter the value that is written to the tag.

Fixed Value — writes a predefined value. The properties dialog shows the allowed range of the tag and the value to write.

Set Fixed Value dialog with the allowed range and the value to write

Inc/Dec — increases (inc) or decreases (dec) the current value of the tag by a Value step. Optionally tick Min and Max to keep the result within limits, and Cycle to wrap around when a limit is reached instead of stopping.

Inc/Dec properties — type inc or dec, step value, optional Min and Max, Cycle

Toggle Value — toggles the value of the tag, which suits start/stop and on/off buttons.

Set section of an ON / OFF button — Toggle Value on the tag Global memory.valve

Example — three buttons of a motor faceplate

ButtonSet command
−Inc/Dec — dec, step 10, Min 0, Max 100 → Global memory.{2}
ON / OFFToggle Value → Global memory.{3}
+Inc/Dec — inc, step 10, Min 0, Max 100 → Global memory.{2}

{2} and {3} are view parameters that hold the names of the tags of one motor, so the same three buttons control whichever motor the view was opened for. The full walk-through is in Tutorial — Reusable Motor Faceplate.

Running view scripts

According to the product specification a set command can also execute a custom view script. This allows more complex operations to be implemented, such as:

  • modifying multiple tags,
  • performing calculations,
  • executing conditional logic,
  • or implementing custom operator actions.

See View Scripts.

Combine with animations

Give a button visual feedback: bind its fill to the same tag with an animation, so the operator sees the effect of the click immediately.