-
Notifications
You must be signed in to change notification settings - Fork 4
(Direct Binding) Sources and Targets
In general source and target are interchangeable. Bindings can also between two widgets. For example, a toggle button can be connected directly to visible property of another widget. Most of the direct binding can now be done in the Automation Studio editor.
OPC variables are typically PLC variables. In most cases this variable is coming from the PLC but it can also be a remote OPC variable. Use ::Program:Variable1 for local variable and ::AsGlobalPV:Variable1. OPC variables can be a source or a target.
Remember that all OPC variables only exist once for all connections (sessions). Therefore an OPC variable should not be used to store HMI properties that can be different for each client connection like visibility of a widget. For this type of information session variables should be used instead.
Attribute | Value |
---|---|
xsi:type | opcUa |
refId | Reference to an OPC UA variable. See Addressing an OPC UA variable. |
attribute | node, value |
serverAlias (optional) | OPC UA server connection in use |
samplingRate (optional) | Sampling rate for OPC UA variables |
<Source xsi:type="opcUa" refId="::AsGlobalPV:gMainLogic.par.coffeeType" attribute="value" />
Session variables exist for each client connection as individual set of data. Session variables can be a source or a target.
Session variable can be used to store HMI related properties for example visibility of a widget.
Attribute | Value |
---|---|
xsi:type | session |
refId | ID of the session variable |
attribute | value |
<Source xsi:type="session" refId="clientIndex" attribute="value" />
Client variables are similar to session variables. The session variables represent the panel side of a session where the client variables represent the client side. Client variables can be browser information or IP address of the connected client. In this case the client is the source of the data. It can also be the target for example to show a dialog box.
<Source xsi:type="session" refId="::SYSTEM:clientIndex" attribute="value" />
The following system variables are available:
Variable name | Data type | Default value | Description |
---|---|---|---|
clientInfo.userId | ANY_STRING | "Anonymous" | ID of the currently logged in user |
clientInfo.ipAddress | ANY_STRING | "" | IP address of the client |
clientInfo.activityCount | ANY_INT | 0 | All touch screen, mouse and key events are detected and counted. This number is passed onto the mapp View server in 1 second intervals. This feature must be enabled in the VIS file for the respective HMI application using a configuration entry. |
clientInfo.languageId | ANY_STRING | "de" | Language code for the currently selected language |
clientInfo.languages | ANY_STRING | "" | List of languages configured on the client separated by commas. (e.g. "de,de-AT,de-DE,en-US,en") |
clientInfo.measurementSystemId | ANY_STRING | From configuration | Name of the currently selected system of measurement |
clientInfo.screenResolution | ANY_STRING | "" | Screen resolution of the client (e.g. "1080x880") |
clientInfo.browserResolution | ANY_STRING | "" | Resolution of the browser window (e.g. "1080x880") The returned value is also dependent on the scaling of texts on the operating system, which is taken into account by the browser during calculation. |
clientInfo.isValid | BOOL | false | This value specifies whether a client is connected. |
clientInfo.connectionDateTime | DATE_AND_TIME | 1970-01-01T00:00:00Z | This value specified when the client-server connection was established. |
clientInfo.slotId | ANY_INT | -1 | Slot numbers are distributed based on when client connections are made (can be different each time). The first connected client received slot number 0. The number of maximum possible client slots is defined in the mapp View configuration. If the configured number of slots has been reached, no additional clients will be accepted. |
clientInfo.userAgent | ANY_STRING | "" S | tring for identifying the client (name and version of the browser software) |
clientInfo.cookieEnabled | BOOL | false | This value specifies whether cookies are accepted on the client. |
clientInfo.currentPageId | ANY_STRING | "" | This value specifies which page was loaded on the client. At runtime, the system variable is updated with the ID of the current page when navigating in the main HMI application. Loading an embedded page or a page of an embedded HMI application does not result in updating of the variables. |
clientInfo.isMultiTouch | BOOL | false | This value specifies whether the client supports multi-touch. |
Widget have a set of properties that can be used as data source or target. Check widget documentation in Automation Studio to see what properties are available for binding.
Attribute | Value |
---|---|
xsi:type | brease |
widgetRefId | ID of a widget instance |
contentRefId | ID of the piece of content where the widget was configured |
attribute | All bindable properties of widgets. See the widget documentation. |
<Target xsi:type="brease" contentRefId="myContent" widgetRefId="ImageSwitchCoffee" attribute="selectedIndex" />
This example shows a binding between internal server variable ::SYSTEM:server.maxClients and an OPC UA variable. The binding is similar to a binding between session and OPC UA variables. Because the internal variable applies to the server, target type server must be used.
<Source xsi:type="server" refId="::SYSTEM:server.maxClients" attribute="value" />
<Source xsi:type="snippet" refId="mySnippet" attribute="value" />
<Source xsi:type="expression" refId="myExpression" attribute="result" />
<Target xsi:type="expression" refId="myExpression" attribute="operand1" />
<Target xsi:type="text" refId="IAT/myTextID" attribute="value" />
<Source xsi:type="mapp" refId="gAlarmXCore" attribute="link" />
General Information
Direct binding
Event binding
Use cases
- General
- Widgets
- Styles
- Text
- Content