An Asset is a logical representation of a field device, described by a list of Channels. The Asset uses a specific Driver instance to communicate with the underlying device and it models a generic device resource as a Channel. A register in a PLC or a GATT Characteristic in a Bluetooth device are examples of Channels. In this way, each Asset has multiple Channels for reading and writing data from/to an Industrial Device.
Assets can be used as Wire Components to access the resources referenced by the defined channels inside a Wire Graph, see the Assets as Wire Components guide for more details.
To further describe the concept of Channel and Asset, the following table shows a set of PLC register addresses as provided in a typical PLC documentation.
|Counter 3||INPUT REGISTERS||515|
|Quad Counter||INPUT REGISTERS||520|
|Toggle 4||DISCRETE INPUTS||2052|
|Toggle 5||DISCRETE INPUTS||2053|
|Toggle 6||DISCRETE INPUTS||2054|
|Reset Counter 3||COILS||3075|
|Reset Quad Counter||COILS||3084|
The corresponding Channels definition in the Asset is as follows:
As shown in the previous image, the Channel definition in an Asset results easily mappable to what available in a generic PLC documentation.
Once defined the Channels in an Asset, a simple Java application that leverages the Asset API can easily communicate with the Field device by simply referring the specific Channel of interest.
Driver independent parameters
Driver independent parameters provide general configuration information, these parameters are available regardless of the attached Driver.
- enabled: each channel can be separately enabled using this flag.
- name: unique user-friendly name for a channel
- type: represents the type of operation supported. Possible values are: READ, WRITE, READ/WRITE
- value.type: represents the data type that will be used when creating the Wire Envelope for the connected components.
- scale: an optional scaling factor to be applied only to the numeric values retrieved from the field. It is represented as a double and if the value.type is, for example, an integer, the scaling factor multiplier will be casted to integer before multiplying it to the retrieved value.
- offset: an optional offset value that will be added only to the numeric values retrieved from the field. It is a double in the asset definition, and will be casted to the value.type of the retrieved value before being applied.
- unit: an optional string value that will be added to the asset channel read to represent the unit of measure associated to that specific channel.
- listen: if supported by the associated driver, allows to receive notifications by the driver on events. This flag currently has effect only inside Kura Wires.
Driver specific parameters
The parameters that are not included in list of driver independent parameters above are driver specific. These parameters are used to identify the resource addressed by the channel.
Examples of such parameters are unit.id, primary.table and memory.address parameters defined by the Modbus driver, that allow to address a specific register/coil on a Modbus slave.
Driver specific parameters are described in the driver documentation.
Other Asset Configurations
- asset.desc: a user friendly description of the asset
- emit.all.channels: specifies wheter the values of all READ or READ_WRITE channels should be emitted in case of a channel event. If set to true, the values for all channels will be read and emitted, if set to false, only the value for the channel related to the event will be emitted.
- timestamp.mode: if set to PER_CHANNEL, the component will emit a driver-generated timestamp per channel property. If set to SINGLE_ASSET_GENERATED, the component will emit a single timestamp per request, generated by the Asset itself before emitting the envelope. If set to SINGLE_DRIVER_GENERATED_MAX or SINGLE_DRIVER_GENERATED_MIN, the component will emit a single driver generated timestamp being respectively the max (most recent) or min (oldest) among the timestamps of the channels.
- emit.errors: Specifies wheter errors should be included or not in the emitted envelope. Default is false.
Updated over 1 year ago