Dynamic Links¶
Introduction
A dynamic link is a link between two nodes: a parent node, which is always a variable, and a remote node called a source. Typically, it is used to set the value of a variable based on the value of another variable or attribute of another node, for example, to set the text of a label based on the value of a temperature variable.
Advanced dynamic links
When a dynamic link implements transformations of the source node’s value through specific converters, it is referred to as advanced dynamic link (see Converters).
Dynamic Link Modes
A dynamic link can be set in one of the following modes, which determines the direction of the link:
Read: from source node to parent
Write: from parent to source
Read/Write: bidirectional
Note
when the dynamic link is between a graphical object property and another node, the parent node is always the graphical object property.
Default Behavior
When setting-up a dynamic link, the following default behavior applies:
If the source is a variable, the source value is that of the Value attribute.
If the source is an object, the source value is the NodeId attribute of the object.
Creating a Dynamic Link to an Array Variable
In a dynamic link, if the parent or source node is an array variable, a specific array cell can be set as parent or source.
Format of the Parent Node
When a dynamic link is set between two nodes with the same data types, the desired format for the parent node data can be set for some data types. The following table shows for which Data Types this function is available, and the selectable formats:
Source Datatype |
Parent node format |
Description |
Example |
---|---|---|---|
Int16 Int32 Int64 Integer UInt16 UInt32 UInt64 UInteger |
0 (1234) |
Binary representation, without the thousands separator |
|
Hexadecimal (ff) |
Hexadecimal representation |
|
|
Octal |
Octal representation |
|
|
Binary |
Binary representation |
|
|
Float Double |
0,# (1234,5) |
Rounding to the first decimal place |
|
0,## (1234,56) |
Rounding to the second decimal place |
|
|
0,### (1234,56) |
Rounding to three decimal places |
|
|
0.0 (1234.0) |
Representation with exactly one decimal place |
|
|
0.00 (1234.00) |
Representation with exactly two decimal places |
|
|
0.000 (1234.000) |
Representation with exactly three decimal places |
|
|
DateTime |
hh:mm |
Date/time format, t |
|
dd/MM/yy |
Date/Time format, d |
|
|
hh:mm:ss |
Extended date time format, T |
|
|
d MMM yyyy |
Extended date, format D |
|
|
dd/MM/yy, hh:mm |
Extended date/time, format g |
|
|
d MMM yyyy, hh:mm:ss |
General date/time layout, format F |
|
|
yyyy-MM-ddThh:mm:ss.0000000Z |
ISO 8601 Standard, format o or O |
|
|
Duration |
[d.]hh:mm:ss[.0000000] |
Format c |
|
[d:]h:mm:ss[,0000000] |
General short format, g |
|
|
d:hh:mm:ss,0000000 |
General extended format, G |
|
See also
Related concepts
Related procedures
Using the Advanced Dynamic Link Editor
Related APIs
References