dOPC Client Toolkit Help file
TdOPCEventServer.GetConditionState Method
C++
public: __fastcall tdOPCEventCondition GetConditionState(
    AnsiString Source, 
    AnsiString ConditionName
);
C#
public tdOPCEventCondition GetConditionState(
    String Source, 
    String ConditionName
);
Visual Basic
Public Function GetConditionState(
    Source As String, 
    ConditionName As String
) As tdOPCEventCondition

GetConditionState returns the TdOPCEventCondition from the passed Source for the passed ConditionName.

procedure TForm1.Button1Click(Sender: TObject);
var
  dOPCEventServer: TdOPCEventServer;
  Source, ConditionName: string;
  ConditionNames : TStringlist;
  Condition : TdOPCEventCondition;
begin
  ConditionNames := TStringlist.Create;
  Source := 'Device1.Ramp';
  dOPCEventServer.QuerySourceConditions(Source,ConditionNames);
  if ConditionNames.Count > 0 then
  begin
    ConditionName := ConditionNames[0];
    Condition := dOPCEventServer.GetConditionState(Source,ConditionName);
    if Condition <> nil then
    begin
      //... show info ...
      Condition.Free;
    end;
  end;
  ConditionNames.Free;
end;
What do you think about this topic? Send feedback!
Copyright © 2001-2014 Kassl GmbH (http://www.kassl.de). All rights reserved.