Function TOPCClient.ReadItemVQT(Name: String; var ItemValue: Variant; var ItemQuality: word; var ItemTimeStamp: TDateTime): Boolean; var ReadVar_vonSPS : Array of OleVariant; AttributeSPSData, AttributeNonSPSData : UAAttributeData; ReadVar_NonSPS : OleVariant; ItemFlagbit,I,J,K: Integer; begin Result := FALSE; ItemQuality := OPC_QUALITY_BAD; try for I := 0 to Length(OPCServerItemArray)-1 do begin if (AnsiMatchStr(Name, OPCServerItemArray[I].ItemName)) then begin if (OPCServerItemArray[I].Source='SPS') then begin AttributeSPSData := OPCUAClientSPS.Read(Url_String,'nsu='+ nsu + ';s=' + S0); ReadVar_vonSPS := AttributeSPSData.Value; ItemValue := ReadVar_vonSPS[I]; ItemQuality := AttributeSPSData.StatusCode.CodeBits; ItemFlagbit := AttributeSPSData.StatusCode.FlagBits; ItemTimeStamp := AttributeSPSData.ServerTimestampLocal; Result := True; end else begin Name := OPCServerItemArray[I].Source + '.' + Name; AttributeNonSPSData := OPCUAClientRead.Read(Url_String,'nsu='+ nsu + ';s=Local Items.' + Name); ReadVar_NonSPS := AttributeNonSPSData.Value; ItemQuality := AttributeNonSPSData.StatusCode.CodeBits; ItemFlagbit := AttributeNonSPSData.StatusCode.FlagBits; ItemTimeStamp := AttributeNonSPSData.ServerTimestampLocal; Result := True; end; end else begin Meldung(1,'TOPCClient.ReadItems: ' + Name + ' (FAILED)'); end; end; except on E: Exception do begin Meldung(0,'TOPCClient.ReadItems - Exception: ' + E.Message); end; end; end;