Main Content

getDescription

Get description of OPC HDA aggregate type or item attribute

Description

dStr = getDescription(obj,ID) returns the description associated with the aggregate type or item attribute specified by its ID.

example

dStr = getDescription(obj,nameStr) returns the description associated with the aggregate type or item attribute specified by its name.

example

Examples

collapse all

Create an OPC HDA client and connect the client to the server.

hdaObj = opchda('localhost','Matrikon.OPC.Simulation');
connect(hdaObj);

Get description of aggregate type TIMEAVERAGE using its ID.

oneDesc = getDescription(hdaObj.Aggregates,4)
oneDesc =

    'Retrieve the time weighted average data over the resample interval.'

Get a description of all aggregate types provided by the Matrikon™ Simulation Server.

hdaObj = opchda('localhost','Matrikon.OPC.Simulation');
connect(hdaObj);
allDesc = getDescription(hdaObj.Aggregates)
allDesc =

  6×1 cell array

    {'Retrieve interpolated values.'                                                              }
    {'Retrieve the time weighted average data over the resample interval.'                        }
    {'Retrieve the minimum value in the resample interval and the timestamp of the minimum value.'}
    {'Retrieve the minimum value in the resample interval.'                                       }
    {'Retrieve the maximum value in the resample interval and the timestamp of the maximum value.'}
    {'Retrieve the maximum value in the resample interval.'                                       }

Create an OPC HDA client and connect the client to the server.

hdaObj = opchda('localhost','Matrikon.OPC.Simulation');
connect(hdaObj);

Get description of item attribute SAWTOOTH using its name.

oneDesc = getDescription(hdaObj.ItemAttributes,"SAWTOOTH")
oneDesc =

    'Saw-toothed Wave'

Get a description of all item attributes provided by the Matrikon Simulation Server.

hdaObj = opchda('localhost','Matrikon.OPC.Simulation');
connect(hdaObj);
allDesc = getDescription(hdaObj.Aggregates)
allDesc =

  10×1 cell array

    {'Data type'       }
    {'Item Description'}
    {'High EU'         }
    {'Low EU'          }
    {'Item ID'         }
    {'Triangle Wave'   }
    {'Square Wave'     }
    {'Saw-toothed Wave'}
    {'Random'          }
    {'Bucket Brigade'  }

Input Arguments

collapse all

OPC HDA object for aggregate types or item attributes, specified as an opc.hda.AggregateTypes object or an opc.hda.ItemAttributes object.

Example: hdaObj.Aggregates

Property ID of OPC HDA client aggregate types or item attributes, specified as a scalar or a vector.

Example: 4

Property name of the OPC HDA client aggregate types or item attributes, specified as a character vector, string, array of character vectors, or vector of strings.

Example: "TIMEAVERAGE"

Output Arguments

collapse all

Property description of the aggregate type or item attribute, returned as a character vector or cell array of character vectors.

Version History

Introduced before R2006a