Changes

HowTo:Implementing Live Values

27 bytes added, 08:33, 21 January 2020
/* How Live Values work */
== How Live Values work Work ==
Live values are special properties without a value that is persisted in the database. Instead, they get their current value frequently from a live value server, including a measurement quality indicator and a read time stamptimestamp, among other details. Live values can be used to display trends and current values (e.g., sensor values) from dynamic sources like process control systems (e.g., via OPC-UA).
In {{UBIK}}, live value properties are defined by a special kind of [[MetaProperty]], a live value meta property. So, if you want to add a live value to a {{UBIK}} object, you first need to add such a meta property to the meta class metaclass of the object in question. You can get such a live value meta property from creating an instance of the [[MetaClass]] ''LIVEVALUE_METAPROPERTY''. This way, for example, you could define a property "temperature" on a meta class metaclass "cooling unit".
So, following this example, how do individual "cooling unit" instances know their specific "temperature" values? An individual live value property holds the answer: It actually ''has'' a persisted value - a reference to a so-called live value data point. Such a data point knows a live value server (providing access to a process control system for example), and an identifier of (or path to) a dynamic variable, e.g. representing a specific temperature sensor in the process control system. This means, for a specific "cooling unit" instance, we want to configure the correct live value data point as a value of the "temperature" live value property.
Hence, we require a live value data point and a live value server. There is a {{UBIK}} plugin UBIK.Interface.Module.OPCUA which we can use for getting those. That module implements a specific kind of live value server, namely the OPC-UA live value server. It is represented by a meta class metaclass ''OPC_SERVER'', and instances thereof can be used to configure a connection to a specific OPC server. Similarly, there is a meta class metaclass ''OPC_DATAPOINT'' representing variable configurations. We want to have a data point instance with a link to a server instance (and a path to the variable we need). This data point instance must be set on the "temperature" property in our example.
With the UBIK.Interface.Module.OPCUA plugin, {{UBIK}} will detect that there is a live value server and it will host a live value data service, supplying our "cooling unit" objects with their current "temperature" values.  [[Category:How-To|Live Values]]
== Implementing Live Values in {{UBIK}} Studio ==
187
edits