dOPC Client Toolkit Help file
TdOPCItemData.EUType Property
C++
public: __property int EUType;
C#
public int EUType;
Visual Basic
Public Property EUType() As Integer

EUType contains the type of Engineering Units (EU) information of the item (if any) contained in the property EUInfo.

Type 
Description 
OPC_NOENUM 
No EU information available. (EUInfo will be VT_EMPTY) 
OPC_ANALOG 
EUInfo will contain an array of exactly two doubles (VT_ARRAY | VT_R8). Corresponding to the LOW and HI EU range. 
OPC_ENUMERATED 
EUInfo will contain a array of strings (VT_ARRAY | VT_BSTR) which contains a list of strings. (Example: OPEN, CLOSE, IN TRANSIT, etc.) 
procedure ShowEUInfo(Item: TdOPCItem);
var
  str: string;
  Low, High: Double;
begin
  case Item.EUType of
    OPC_NOENUM : str := 'Engineering Units (EU) information not available';
    OPC_ANALOG :
    begin
       Low  := Item.EuInfo[0];
       High := Item.EuInfo[1];
       str := format('Analog scale from: %.2f to %.2f',[Low,High]);
    end;
    OPC_ENUMERATED : str := 'ENUMERATED: ' +VarToAStr(Item.EuInfo);
  end;
  ShowMessage(Str);
end;
What do you think about this topic? Send feedback!
Copyright © 2001-2014 Kassl GmbH (http://www.kassl.de). All rights reserved.