InformationModel.MakeAnalogItem(browseName, dataTypeId)

Create a project analog variable derived from AnalogItemType, which contains the data type indicated and returns a corresponding IUAVariable C# object.

static IUAVariable MakeAnalogItem(QualifiedName browseName, NodeId dataTypeId);

Arguments

browseName (QualifiedName)
The BrowseName of the new variable.
dataTypeId (NodeId)

The Data type contained in the new variable.

Tip: A node inside the DataTypes class represents the Data type. For example,OpcUa.DataTypes.Boolean.

Returns

IUAVariable
A C# object that corresponds to the project variable created.

Example

The following example shows an API that creates an analog variable (MyAnalogVar) that contains a float data type:

var myVar = InformationModel.MakeAnalogItem("MyAnalogVar", OpcUa.DataTypes.Float);
Owner.Add(myVar);