dOPC Client Toolkit
Close
ua.client.TdOPCUAClient.ReadNodeAttributeAsVariant

Reads one Attribute of one Node.

function ReadNodeAttributeAsVariant(NodeId: string; Attribute: integer; TimestampsToReturn: integer = uaTimestampsToReturn.Neither): Variant;
__fastcall Variant ReadNodeAttributeAsVariant(AnsiString NodeId, int Attribute, int TimestampsToReturn = uaTimestampsToReturn.Neither);

This method can be used to read one Attribute of one Node. It returns a Variant value. 

 

Parameter
Description
NodeId
The Node you want the attribute for.
Attributes
Defines which attributes we want to read. For further information look also at: TuaAttributes
Result
Result as Variant
program dOPUACTest; uses ua.client; var OPCClient: TdOPCUAClient; Displayname : string; begin OPCClient := TdOPCUAClient.Create(nil); OPCClient.Url := 'opc.tcp://opcuaserver.com:48010'; OPCClient.Active := true; Displayname := OPCClient.ReadNodeAttributeAsVariant('i=2259', TuaAttributes.DisplayName); Writeln(Displayname); Writeln('Press Enter to exit'); Readln; OPCClient.Free; end.
Kassl GmbH Copyright © 2021. All rights reserved.