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(QualifiedNamebrowseName, NodeIddataTypeId);
Arguments
- browseName(QualifiedName)
- TheBrowseNameof the new variable.
- dataTypeId(NodeId)
- The Data type contained in the new variable.TIP: A node inside theDataTypesclass 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);
Provide Feedback