Uniformance PHD .NET Wrapper Guide
Uniformance PHD .NET Wrapper Guide
In no event is Honeywell liable to anyone for any indirect, special or consequential damages. The information and
specifications in this document are subject to change without notice.
Honeywell, Experion, TotalPlant, Uniformance PHD, and [Link] are U.S. registered trademarks of Honeywell
International Sàrl.
1. Introduction .......................................................................................................... 6
1.1 About this Guide........................................................................................ 6
1.2 Overview ................................................................................................... 6
2. Usage..................................................................................................................... 7
2.1 Example .................................................................................................... 7
2.2 The .NET Wrapper Interface – Methods and Properties ........................ 10
Index 176
1.2 Overview
Honeywell's Process History Database (PHD) provides real-time data capture, historization, and intelligent
process data retrieval required for plant information system support. The result of extensive experience with
interfacing real-time systems with plant information systems, PHD forms a comprehensive platform that
supports Honeywell's entire family of integrated plant information system modules.
Various methods of accessing information are designed to allow data retrieval from PHD. As the
[Link] technology is popular in recent times, the PHD .NET Wrapper is developed for users who
design their client application tools in the .NET Framework environment.
The Wrapper is a set of methods and properties that communicate efficiently with the PHD Server native API
calls to fetch data. The next chapter includes a sample program as a quick starting point for developers, a
section that elaborates in detail on the methods and attributes available from the Wrapper.
Two versions of the Wrapper are available:
2.1 Example
The following is an example on how to use the PHD .NET Wrapper. This example illustrates a typical three-
stepped sequence that is normally found in an application that requires interfacing to a data storage, through a
support API.
1. Initializing
2. Data fetching
3. Closing
Developers can use the example as the initial guide, and subsequently expand the application using additional
help from the more detailed interface information in the next section, or using the embedded Help system, or
take advantage of features like IntelliSense in the Visual Studio development environment. The example is
provided in C#, but can be easily adapted to another equivalent language, like [Link], and so on.
Sample code:
// Locate [Link] on your system and add a reference to it into this project.
using System;
using [Link]; // This exposes the methods in the .NET Wrapper to this program.
namespace MySpace
{
class MyClass
{
//
// This program fetches and displays raw data from a tag in the last hour.
//
static void Main()
{
//
// Initialize the interfacing to the .NET Wrapper
// and setup the type of data to fetch.
// PHD Server is running on the localhost.
//
PHDHistorian phd = new PHDHistorian();
[Link] = new PHDServer("localhost", SERVERVERSION.API200);
[Link] = 3100;
[Link] = [Link];
[Link] = [Link];
//
// Fetch data.
//
Double [] timestamps = null;
Double [] values = null;
short [] confidences = null;
[Link] = "NOW-1H";
[Link] = "NOW";
//
// Display data.
//
int count = [Link](0);
//
// Clean up and quit.
//
[Link]();
}
}
}
Output:
Contents
[Link]
LinkListStruct Class
LinkListStruct Members
LinkListStruct Constructor
Properties
LinkName Property
ParentTaglistStruct Class
ParentTaglistStruct Members
ParentTaglistStruct Constructor
Properties
Tagname Property
Tagno Property
PHDataStruct Class
PHDataStruct Members
PHDataStruct Constructor
Properties
Confidence Property
ErrorMessage Property
HostName Property
TagName Property
TimeStamp Property
Tolerance Property
Units Property
Value Property
PHDErrorException Class
PHDErrorException Members
PHDErrorException Constructor
PHDErrorException Constructor ()
Properties
Message Property
Methods
ToString Method
PHDHistorian Class
PHDHistorian Members
PHDHistorian Constructor
Properties
ConnectionTimeout Property
DefaultServer Property
EndTime Property
MaximumRows Property
MinimumConfidence Property
MostRecentRows Property
Offset Property
ReductionFrequency Property
ReductionOffset Property
ReductionType Property
RetryPeriod Property
SampleFrequency Property
Sampletype Property
StartTime Property
UseSampleFrequency Property
UTCDateTime Property
UTCStartEndTime Property
CalendarMonthEnable Property
Methods
BrowsingTags Method
BrowsingTagsList Method
ClearTagUpdateList Method
ClearTagUpdateList Method ()
ConvertToPHDTime Method
DeleteTagData Method
Dispose Method
Dispose Method ()
EnableTagDataChangeNotification Method
EnableTagUpdateNotification Method
EngUnitConversion Method
FetchAllReductionData Method
FetchColumnData Method
FetchData Method
FetchDataList Method
FetchDataListNullable Method
FetchBestFitDataListNullable Method
FetchRowData Method
FetchStructData Method
Finalize Method
GetDBInfo Method
GetLinkList Method
GetLinkList Method ()
GetLinks Method
GetLinks Method ()
GetParentTagList Method
GetParentTagList Method ()
GetParentTags Method
GetParentTags Method ()
GetRDIInfo Method
GetRDIList Method
GetRDIList Method ()
GetRDIs Method
GetRDIs Method ()
PutData Method
PutList Method
TagDfn Method
TagDataChangeHandler Method
TagDataChangeHandler Method
(PHDServer,TagDataChangeNotify,IntPtr)
TagUpdateHandler Method
ValidateCalc Method
GetDigitalEnumerationDefinition Method
GetDigitalEnumerationDefinition
GetPHDTagName
[Link] Method(Int32)
[Link] Method(Int32,PHDServer)
[Link] Method(String)
[Link] Method(String, PHDServer)
PHDServer Class
PHDServer Members
PHDServer Constructor
PHDServer Constructor ()
Properties
APIVersion Property
HostName Property
MaxSearchBackTime Property
Password Property
PHDServerVersion Property
Port Property
RequestTimeout Property
ServerID Property
UserName Property
WindowsPassword Property
WindowsUsername Property
Methods
ConnectToServer Method
Dispose Method
Finalize Method
RDIListStruct Class
RDIListStruct Members
RDIListStruct Constructor
Properties
RDIName Property
REDUCTIONOFFSET Enumeration
REDUCTIONTYPE Enumeration
SAMPLETYPE Enumeration
SERVERVERSION Enumeration
Tag Class
Tag Members
Tag Constructor
Tag Constructor ()
Properties
EnumEnable Property
Server Property
TagName Property
Units Property
TagFilter Class
TagFilter Members
TagFilter Constructor
Fields
Collector Field
DataType Field
ParentTagname Field
ScanRate Field
SourceTagname Field
SourceUnits Field
Tagname Field
TagUnits Field
Methods
Clear Method
TagListStruct Class
TagListStruct Members
TagListStruct Constructor
Properties
CollectorName Property
DataLength Property
DataType Property
ParentTagname Property
ParentTagno Property
SourceTagname Property
SourceUnits Property
Tagname Property
Tagno Property
Units Property
Tags Class
Tags Members
Tags Constructor
Properties
Count Property
Item Property
Methods
Add Method
GetEnumerator Method
Remove Method
RemoveAll Method
TagDataChangeNotify Delegate
TagUpdateNotify Delegate
[Link] Namespace
Namespace hierarchy
Classes
Class Description
RDIListStruct
TagListStruct
Delegates
Delegate Description
Enumerations
Enumeration Description
LinkListStruct Class
PHD link to external systems such as experion etc.
[Link]
[Link]
[Visual Basic]
Public Class LinkListStruct
[C#]
public class LinkListStruct
Thread Safety
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance
members are not guaranteed to be thread-safe.
Requirements
Namespace: [Link]
See Also
LinkListStruct Members
LinkListStruct overview
GetHashCode (inherited from Object) Serves as a hash function for a particular type,
suitable for use in hashing algorithms and data
structures like a hash table.
GetType (inherited from Object) Gets the Type of the current instance.
ToString (inherited from Object) Returns a String that represents the current
Object.
Finalize (inherited from Object) Allows an Object to attempt to free resources and
perform other cleanup operations before the
Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.
See Also
LinkListStruct Constructor
Create an instance of the class.
[Visual Basic]
Overloads Public Sub New()
[C#]
public LinkListStruct();
See Also
LinkListStruct Properties
The properties of the LinkListStruct class are listed below. For a complete list of LinkListStruct class
members, see the LinkListStruct Members topic.
See Also
[Link] Property
PHD Tagname
[Visual Basic]
Public ReadOnly Property LinkName As String
[C#]
public string LinkName {get;}
See Also
ParentTaglistStruct Class
Parent Taglist
[Link]
[Link]
[Visual Basic]
Public Class ParentTaglistStruct
[C#]
public class ParentTaglistStruct
Thread Safety
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance
members are not guaranteed to be thread-safe.
Requirements
Namespace: [Link]
See Also
ParentTaglistStruct Members
ParentTaglistStruct overview
Equals (inherited from Object) Determines whether the specified Object is equal
to the current Object.
GetType (inherited from Object) Gets the Type of the current instance.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.
See Also
ParentTaglistStruct Constructor
Create an instance of the class.
[Visual Basic]
Overloads Public Sub New()
[C#]
public ParentTaglistStruct();
See Also
ParentTaglistStruct Properties
The properties of the ParentTaglistStruct class are listed below. For a complete list of ParentTaglistStruct
class members, see the ParentTaglistStruct Members topic.
See Also
[Link] Property
PHD Tagname
[Visual Basic]
Public ReadOnly Property Tagname As String
[C#]
public string Tagname {get;}
See Also
[Link] Property
PHD Tagno
[Visual Basic]
Public ReadOnly Property Tagno As Integer
[C#]
public int Tagno {get;}
See Also
PHDataStruct Class
FetchStructData returns an ArrayList of PHDataStruct. The List can return results from multiple tags.
[Link]
[Link]
[Visual Basic]
Public Class PHDataStruct
[C#]
public class PHDataStruct
Thread Safety
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance
members are not guaranteed to be thread-safe.
Example
PHDataStruct str;
for(int i=0;i<[Link];i++)
str=(PHDataStruct)lst[i];
if([Link]!="kst20000")break;
Requirements
Namespace: [Link]
See Also
PHDataStruct Members
PHDataStruct overview
Equals (inherited from Object) Determines whether the specified Object is equal
to the current Object.
GetType (inherited from Object) Gets the Type of the current instance.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.
See Also
PHDataStruct Constructor
Create an instance of the class.
[Visual Basic]
Overloads Public Sub New()
[C#]
public PHDataStruct();
See Also
PHDataStruct Properties
The properties of the PHDataStruct class are listed below. For a complete list of PHDataStruct class
members, see the PHDataStruct Members topic.
See Also
[Link] Property
PHD Confidence
[Visual Basic]
Public ReadOnly Property Confidence As SByte
[C#]
public sbyte Confidence {get;}
See Also
[Link] Property
Error Message if there is an error. null indicates there is no error.
[Visual Basic]
Public ReadOnly Property ErrorMessage As String
[C#]
public string ErrorMessage {get;}
See Also
[Link] Property
PHD Hostname
[Visual Basic]
Public ReadOnly Property HostName As String
[C#]
public string HostName {get;}
See Also
[Link] Property
PHD Tagname
[Visual Basic]
Public ReadOnly Property TagName As String
[C#]
public string TagName {get;}
See Also
[Link] Property
PHD Timestamp
[Visual Basic]
Public ReadOnly Property TimeStamp As Date
[C#]
public [Link] TimeStamp {get;}
See Also
[Link] Property
Tolerance for reductions
[Visual Basic]
Public ReadOnly Property Tolerance As Double
[C#]
public double Tolerance {get;}
See Also
[Link] Property
Engineering Units
[Visual Basic]
Public ReadOnly Property Units As String
[C#]
public string Units {get;}
See Also
[Link] Property
PHD Value
[Visual Basic]
Public ReadOnly Property Value As Object
[C#]
public object Value {get;}
See Also
PHDErrorException Class
PHD Exception Class
[Link]
[Link]
[Link]
[Visual Basic]
Public Class PHDErrorException
Inherits Exception
[C#]
public class PHDErrorException : Exception
Thread Safety
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance
members are not guaranteed to be thread-safe.
Requirements
Namespace: [Link]
See Also
PHDErrorException Members
PHDErrorException overview
InnerException (inherited from Exception) Gets the Exception instance that caused the
current exception.
Source (inherited from Exception) Gets or sets the name of the application or the
object that causes the error.
TargetSite (inherited from Exception) Gets the method that throws the current
exception.
Equals (inherited from Object) Determines whether the specified Object is equal
to the current Object.
subsequent exceptions.
GetObjectData (inherited from Exception) When overridden in a derived class, sets the
SerializationInfo with information about the
exception.
GetType (inherited from Object) Gets the Type of the current instance.
HResult (inherited from Exception) Gets or sets HRESULT, a coded numerical value
that is assigned to a specific exception.
Finalize (inherited from Object) Allows an Object to attempt to free resources and
perform other cleanup operations before the
Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.
See Also
PHDErrorException Constructor
Default constructor
Overload List
Default constructor
public PHDErrorException();
PHDAPI Exception handler
public PHDErrorException(int);
See Also
PHDErrorException Constructor ()
Default constructor
[Visual Basic]
Overloads Public Sub New()
[C#]
public PHDErrorException();
See Also
[Visual Basic]
Overloads Public Sub New( _
ByVal ErrorNo As Integer _
)
[C#]
public PHDErrorException(
int ErrorNo
);
Parameters
ErrorNo
PHD Error Number
See Also
PHDErrorException Properties
The properties of the PHDErrorException class are listed below. For a complete list of PHDErrorException
class members, see the PHDErrorException Members topic.
InnerException (inherited from Exception) Gets the Exception instance that caused the
current exception.
Source (inherited from Exception) Gets or sets the name of the application or the
object that causes the error.
TargetSite (inherited from Exception) Gets the method that throws the current
exception.
HResult (inherited from Exception) Gets or sets HRESULT, a coded numerical value
that is assigned to a specific exception.
See Also
[Link] Property
Custom Exception Message
[Visual Basic]
Overrides Public ReadOnly Property Message As String
[C#]
public override string Message {get;}
See Also
PHDErrorException Methods
The methods of the PHDErrorException class are listed below. For a complete list of PHDErrorException
class members, see the PHDErrorException Members topic.
Equals (inherited from Object) Determines whether the specified Object is equal
to the current Object.
GetBaseException (inherited from Exception) When overridden in a derived class, returns the
Exception that is the root cause of one or more
subsequent exceptions.
GetHashCode (inherited from Object) Serves as a hash function for a particular type,
suitable for use in hashing algorithms and data
structures like a hash table.
GetType (inherited from Object) Gets the Type of the current instance.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.
See Also
[Link] Method
Custom Detail exception Information
[Visual Basic]
Overrides Public Function ToString() As String
[C#]
public override string ToString();
Return Value
See Also
PHDHistorian Class
Main Class
[Link]
[Link]
[Visual Basic]
Public Class PHDHistorian
Implements IDisposable
[C#]
public class PHDHistorian : IDisposable
Thread Safety
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance
members are not guaranteed to be thread-safe.
Example
Requirements
Namespace: [Link]
See Also
PHDHistorian Members
PHDHistorian overview
PHDHistorian Constructor This Class is the entry point for Accessing the PHD
Server through the 200 and R200 API's
GetType (inherited from Object) Gets the Type of the current instance.
Notes:
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.
See Also
PHDHistorian Constructor
This Class is the entry point for Accessing the PHD Server through the 200 and R200 API's
[Visual Basic]
Public Sub New()
[C#]
public PHDHistorian();
See Also
PHDHistorian Properties
The properties of the PHDHistorian class are listed below. For a complete list of PHDHistorian class
members, see the PHDHistorian Members topic.
See Also
[Link] Property
The ConnectionTimeout property identifies the network timeout period used when attempting to connect to the
PHD server. If the connection to the PHD server is not established within the time period, the request is
abandoned. It is in milliseconds.
[Visual Basic]
Public Property ConnectionTimeout As UInt32
[C#]
public uint ConnectionTimeout {get; set;}
See Also
[Link] Property
Attach a PHDServer object to the Historian
[Visual Basic]
Public Property DefaultServer As PHDServer
[C#]
public PHDServer DefaultServer {get; set;}
Example
Create a new instance of a PHDHistorian and connect to a PHD Server on the local machine.
VB
[Link] = [Link].API200
[Link] = DefaultServer
c#
[Link]= [Link].API200;
[Link] = DefaultServer;
See Also
[Link] Property
Assign a default End Time
[Visual Basic]
Public Property EndTime As String
[C#]
public string EndTime {get; set;}
See Also
[Link] Property
Specifies the maximum number of raw values that will be retrieved to generate the requested data.
Note: do not use this setting to limit the number of values returned from a reduction – it is specifically to
restrict the input data set to a reduction, not the results.
[Visual Basic]
Public Property MaximumRows As UInt32
[C#]
public uint MaximumRows {get; set;}
See Also
[Link] Property
Specifies the confidence threshold for values for validation. If this is set to a value greater than 0, then any
values that have a confidence less than these are invalid and will not be returned to the client. Values are
between 0 and 100 with a default value of 0.
Note: when calculating reductions on PHD data, any raw values that do not meet the MinimumConfidence
setting will be excluded as inputs for the reduction – and the end effect will be as if the input values interpolate
between good values, with no indication that there were questionable values in between.
For this reason, it is recommended to not use this MinimumConfidence property, but instead use the
MinimumConfidence parameter that is available in the functions FetchDataList, FetchDataListNullable,
FetchBestFitDataListNullable – as this parameter will operate on the output set instead of the input, and more
closely matches the typical user expectation.
[Visual Basic]
Public Property MinimumConfidence As Integer
[C#]
public int MinimumConfidence {get; set;}
See Also
[Link] Property
Set or return the MostRecentRows. The most recent rows will be returned if it is set to true.
[Visual Basic]
Public Property MostRecentRows As Boolean
[C#]
public bool MostRecentRows {get; set;}
See Also
[Link] Property
Set or return the Offset
[Visual Basic]
Public Property Offset As Integer
[C#]
public int Offset {get; set;}
See Also
[Link] Property
Set or return the Reduction Frequency
[Visual Basic]
Public Property ReductionFrequency As UInt32
[C#]
public uint ReductionFrequency {get; set;}
See Also
[Link] Property
Set or return the Reduction Offset.
[Visual Basic]
Public Property ReductionOffset As REDUCTIONOFFSET
[C#]
public REDUCTIONOFFSET ReductionOffset {get; set;}
See Also
[Link] Property
Set or return the Reduction Type. Reduction Type is an Enumerate list
[Visual Basic]
Public Property ReductionType As REDUCTIONTYPE
[C#]
public REDUCTIONTYPE ReductionType {get; set;}
See Also
[Link] Property
The RetryPeriod property identifies the period after a connection timeout occurs before another connection
request to the PHD server will occur. This property is related to the ConnectionTimeout property for the
handling of network timeout conditions in communication with the PHD Server. It is in milliseconds.
[Visual Basic]
Public Property RetryPeriod As UInt32
[C#]
public uint RetryPeriod {get; set;}
See Also
[Link] Property
Set or return the Sample Frequency
[Visual Basic]
Public Property SampleFrequency As UInt32
[C#]
public uint SampleFrequency {get; set;}
See Also
[Link] Property
Set or return the Sample Type. Sample Type is an Enumerate list
[Visual Basic]
Public Property Sampletype As SAMPLETYPE
[C#]
public SAMPLETYPE Sampletype {get; set;}
See Also
[Link] Property
Assign a default Start Time
[Visual Basic]
Public Property StartTime As String
[C#]
public string StartTime {get; set;}
See Also
[Link] Property
Set or return the UseSampleFrequency. The SampleFrequency will be used as ReductionFrequency if it is set to
true.
[Visual Basic]
Public Property UseSampleFrequency As Boolean
[C#]
public bool UseSampleFrequency {get; set;}
See Also
[Link] Property
Set or Get the UTCDateTime flag. When UTCDateTime is set as true timestamp data will be returned as
Universal Time else local time.
[Visual Basic]
Public Property UTCDateTime As Boolean
[C#]
public bool UTCDateTime {get; set;}
Example
VB
[Link] = [Link].API200
[Link] = DefaultServer
[Link] = True
c#
[Link]= [Link].API200;
[Link] = DefaultServer;
[Link] = true;
See Also
[Link] Property
Set or Get the UTCStartEndTime flag. When UTCStartEndTime is set as true, the start and end times are
interpreted as Universal Time else local time.
[Visual Basic]
Public Property UTCDateTime As Boolean
[C#]
public bool UTCDateTime {get; set;}
See Also
[Link]
The CalendarMonthEnable property is set to specify whether to calculate the aggregate of data based on actual
number of days in a particular month/year, or based on a fixed number. The value can be set as 1 or 0. If the
CalendarMonthEnable is set to 1, the aggregate for the month/year is calculated based on the actual number
of days in that month/year. If the CalendarMonthEnable is set to 0, then a fixed number is used to calculate
the aggregate for any month or year (for example, 30 days for a monthly aggregate and 365 days for a yearly
aggregate).
[Visual Basic]
Public Property CalendarMonthEnable() As Integer
[C#]
public int CalendarMonthEnable { set; get; }
See Also
PHDHistorian Methods
The methods of the PHDHistorian class are listed below. For a complete list of PHDHistorian class members,
see the PHDHistorian Members topic.
Equals (inherited from Object) Determines whether the specified Object is equal
to the current Object.
GetType (inherited from Object) Gets the Type of the current instance.
ToString (inherited from Object) Returns a String that represents the current
Object.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.
See Also
[Link] Method
Return a DataSet of Tags
Overload List
See Also
[Visual Basic]
Overloads Public Function BrowsingTags( _
ByVal MaxTagCount As UInt32, _
ByVal MatchCriteria As TagFilter _
) As DataSet
[C#]
public DataSet BrowsingTags(
uint MaxTagCount,
TagFilter MatchCriteria
);
Parameters
MaxTagCount
Maximum number of tags to be returned
MatchCriteria
Tag filter conditions
Return Value
See Also
[Visual Basic]
Overloads Public Function BrowsingTags( _
ByVal Server As PHDServer, _
ByVal MaxTagCount As UInt32, _
ByVal MatchCriteria As TagFilter _
) As DataSet
[C#]
public DataSet BrowsingTags(
PHDServer Server,
uint MaxTagCount,
TagFilter MatchCriteria
);
Parameters
Server
PHDServer object
MaxTagCount
Maximum number of tags to be returned
MatchCriteria
Tag filter conditions
Return Value
See Also
[Link] Method
Return an ArrayList of Tags
Overload List
See Also
[Visual Basic]
Overloads Public Function BrowsingTagsList( _
ByVal MaxTagCount As UInt32, _
ByVal MatchCriteria As TagFilter _
) As ArrayList
[C#]
public ArrayList BrowsingTagsList(
uint MaxTagCount,
TagFilter MatchCriteria
);
Parameters
MaxTagCount
Maximum number of tags to be returned
MatchCriteria
Tag filter conditions
Return Value
See Also
[Visual Basic]
Overloads Public Function BrowsingTagsList( _
ByVal Server As PHDServer, _
ByVal MaxTagCount As UInt32, _
ByVal MatchCriteria As TagFilter _
) As ArrayList
[C#]
public ArrayList BrowsingTagsList(
PHDServer Server,
uint MaxTagCount,
TagFilter MatchCriteria
);
Parameters
Server
PHDServer object
MaxTagCount
Maximum number of tags to be returned
MatchCriteria
Tag filter conditions
Return Value
See Also
[Link] Method
Clear Tag Update List
Overload List
See Also
[Link] Method ()
Clear Tag Update List
[Visual Basic]
Overloads Public Sub ClearTagUpdateList()
[C#]
public void ClearTagUpdateList();
See Also
[Visual Basic]
Overloads Public Sub ClearTagUpdateList( _
ByVal Server As PHDServer _
)
[C#]
public void ClearTagUpdateList(
PHDServer Server
);
Parameters
Server
PHDServer object
See Also
[Link] Method
Convert DateTime to its string representation in the formant of "yyyy-MM-dd HH:mm:ss".
Overload List
See Also
[Visual Basic]
Overloads Public Function ConvertToPHDTime( _
ByVal dt As Date _
) As String
[C#]
public string ConvertToPHDTime(
DateTime dt
);
Parameters
dt
DateTime to be converted.
Return Value
The string representation of dt in the form of "yyyy-MM-dd HH:mm:ss" (format 2). Or zero length string if ts is
invalid.
See Also
[Visual Basic]
Overloads Public Function ConvertToPHDTime( _
ByVal ts As String, _
ByVal bConvertRelative As Boolean _
) As String
[C#]
public string ConvertToPHDTime(
string ts,
bool bConvertRelative
);
Parameters
ts
The DateTime string to be converted. This will be parsed using InvariantCulture, meaning that absolute date
strings will be interpreted as MM/dd/yyyy regardless of the current culture setting.
bConvertRelative
Indicate whether or not the relative time string should be converted.
Return Value
Example
string sOutDate="";
See Also
[Visual Basic]
Overloads Public Function ConvertToPHDTime( _
ByVal Server As PHDServer, _
ByVal ts As String, _
ByVal bConvertRelative As Boolean _
) As String
[C#]
public string ConvertToPHDTime(
PHDServer Server,
string ts,
bool bConvertRelative
);
Parameters
Server
The PHDServer object that specifies the PHD Server
ts
The DateTime string to be converted. This will be parsed using InvariantCulture, meaning that absolute date
strings will be interpreted as MM/dd/yyyy regardless of the current culture setting.
bConvertRelative
Indicate whether or not the relative time string should be converted.
Return Value
See Also
[Link] Method
Delete Tag Data
Overload List
See Also
[Visual Basic]
Overloads Public Sub DeleteTagData( _
ByVal tag As Tag, _
ByVal TimeStamp As Date _
)
[C#]
public void DeleteTagData(
Tag tag,
DateTime TimeStamp
);
Parameters
tag
Tag object
TimeStamp
UTC TimeStamp
See Also
[Visual Basic]
Overloads Public Sub DeleteTagData( _
ByVal tag As Tag, _
ByVal TimeStamp As String _
)
[C#]
public void DeleteTagData(
Tag tag,
string TimeStamp
);
Parameters
tag
The Tag object
TimeStamp
The string timestamp
See Also
[Link] Method
Clean up all managed and unmanaged code
Overload List
See Also
[Link] Method ()
Clean up all managed and unmanaged code
[Visual Basic]
NotOverridable Overloads Public Sub Dispose() _
Implements [Link]
[C#]
public void Dispose();
Implements
[Link]
See Also
[Visual Basic]
Overridable Overloads Protected Sub Dispose( _
ByVal disposing As Boolean _
)
[C#]
protected virtual void Dispose(
bool disposing
);
See Also
[Link] Method
Enable/disable tag data change notification callback
Overload List
See Also
[Visual Basic]
Overloads Public Sub EnableTagDataChangeNotification ( _
ByVal Enable As Boolean _
)
[C#]
public void EnableTagDataChangeNotification (
bool Enable
);
Parameters
Enable
A boolean flag. Callback will be enabled if it is true; otherwise callback will be disabled.
See Also
[Visual Basic]
Overloads Public Sub EnableTagDataChangeNotification ( _
ByVal Server As PHDServer, _
ByVal Enable As Boolean _
)
[C#]
public void EnableTagDataChangeNotification (
PHDServer Server,
bool Enable
);
Parameters
Server
PHDServer object
Enable
A boolean flag. Callback will be enabled if it is true; otherwise callback will be disabled.
See Also
[Link] Method
Enable/disable tag update notification callback
Overload List
See Also
[Visual Basic]
Overloads Public Sub EnableTagUpdateNotification( _
ByVal Enable As Boolean _
)
[C#]
public void EnableTagUpdateNotification(
bool Enable
);
Parameters
Enable
A boolean flag. Callback will be enabled if it is true; otherwise callback will be disabled.
See Also
[Visual Basic]
Overloads Public Sub EnableTagUpdateNotification( _
ByVal Server As PHDServer, _
ByVal Enable As Boolean _
)
[C#]
public void EnableTagUpdateNotification(
PHDServer Server,
bool Enable
);
Parameters
Server
PHDServer object
Enable
A boolean flag. Callback will be enabled if it is true; otherwise callback will be disabled.
See Also
[Link] Method
Convert from one Engineering Unit to another. example ((UnitIn + PreAdd) * Mult) + PostAdd
Overload List
Convert from one Engineering Unit to another. example ((UnitIn + PreAdd) * Mult) + PostAdd
See Also
[Visual Basic]
Overloads Public Sub EngUnitConversion( _
ByVal UnitIn As String, _
ByVal UnitOut As String, _
ByRef PreAdd As Double, _
ByRef Mult As Double, _
ByRef PostAdd As Double, _
ByRef pCode As Integer _
)
[C#]
public void EngUnitConversion(
string UnitIn,
string UnitOut,
ref double PreAdd,
ref double Mult,
ref double PostAdd,
ref int pCode
);
Parameters
UnitIn
The Engineering Unit that is to be converted
UnitOut
The new Engineering Unit
PreAdd
The value that is added to the UnitIn
Mult
The multiplation factor
PostAdd
The value that is added after the multiplication
pCode
Return Value
Example
double dblPreAdd = 0;
double dblMult = 0;
double dblPostAdd = 0;
int iCode = 0;
try
catch(PHDErrorException ex)
Result:
See Also
[Visual Basic]
Overloads Public Sub EngUnitConversion( _
ByVal Server As PHDServer, _
ByVal UnitIn As String, _
ByVal UnitOut As String, _
ByRef PreAdd As Double, _
ByRef Mult As Double, _
ByRef PostAdd As Double, _
ByRef pCode As Integer _
)
[C#]
public void EngUnitConversion(
PHDServer Server,
string UnitIn,
string UnitOut,
ref double PreAdd,
ref double Mult,
ref double PostAdd,
ref int pCode
);
Parameters
Server
The PHDServer object to be used for the conversion
UnitIn
The Engineering Unit that is to be converted
UnitOut
The new Engineering Unit
PreAdd
The value that is added to the UnitIn
Mult
The multiplation factor
PostAdd
The value that is added after the multiplication
pCode
See Also
Overload List
[Link] Method
Return Reduction Data for a Tagname
Overload List
See Also
[Visual Basic]
Overloads Public Function FetchAllReductionData( _
ByVal Tagname As String, _
ByVal bOverallReductionOnly As Boolean _
) As DataSet
[C#]
public DataSet FetchAllReductionData(
string Tagname,
bool bOverallReductionOnly
);
Parameters
Tagname
Valid PHD Tag Name
bOverallReductionOnly
Return all reduction data for the collection of Tags
Return Value
Example
Example 1: Return all Reduction data for a collection of Tags Example 2: Return as specified reduction type for
a collection of Tags
Example 1:
try
ds=[Link]("kst20000", true);
[Link]([Link]);
return;
Example 2:
See Also
[Visual Basic]
Overloads Public Function FetchAllReductionData( _
ByVal oTags As Tags, _
ByVal bOverallReductionOnly As Boolean _
) As DataSet
[C#]
public DataSet FetchAllReductionData(
Tags oTags,
bool bOverallReductionOnly
);
Parameters
oTags
Collection of Tag items
bOverallReductionOnly
Return all reduction data for the collection of Tags
Return Value
Example
Example 1: Return all Reduction data for a collection of Tags Example 2: Return as specified reduction type for
a collection of Tags
[Link](new Tag("kst20000"));
[Link](new Tag("kst20001"));
Example 1:
try
ds=[Link](oTags, true);
[Link]([Link]);
return;
12:29:54 115.6561355
Example 2:
[Link]=[Link].ToUInt32("60");
[Link]=(REDUCTIONOFFSET)[Link](typeof(REDUCTIONOFFSET),"After");
try
ds=[Link](oTags, false);
[Link]([Link]);
return;
Results:
...
...
See Also
[Link] Method
Fetch a single tag of Data and Display in a Column Format
Overload List
See Also
[Visual Basic]
Overloads Public Function FetchColumnData( _
ByVal Tagname As String _
) As DataSet
[C#]
public DataSet FetchColumnData(
string Tagname
);
Parameters
Tagname
Used to supply the Tag that is to be returned
Example
[Link]="now-1h;
[Link]="now";
try
dsGrid=[Link]("kst20000");
[Link]([Link]);
return;
timestamp kst20000
See Also
[Visual Basic]
Overloads Public Function FetchColumnData( _
Parameters
oTags
Used to supply the collection of Tags
Example
[Link]="now-1h;
[Link]="now";
_tags.Add(new Tag("kst20000");
_tags.Add(new Tag("kst20001");
try
dsGrid=[Link](_tags);
[Link]([Link]);
return;
See Also
[Link] Method
Fetch a single tag of Data and return results in an Array
[Visual Basic]
Public Sub FetchData( _
ByVal tag As Tag, _
ByRef datetime As Double(), _
ByRef Value As Double(), _
ByRef confidence As Short() _
)
[C#]
public void FetchData(
Tag tag,
ref double[] datetime,
ref double[] Value,
ref short[] confidence
);
Parameters
tag
Used to supply the Tag that is to be returned
datetime
return array of datetime values
Value
return array of values
confidence
return array of confidence values
Example
[Link] = SERVERVERSION.API200;
[Link] = defaultServer;
[Link]="now-1h;
[Link]="now";
[Link] = [Link];
try
catch
[Link]([Link]);
return;
..
[Link]();
Results:
See Also
[Link] Method
Fetch data for a single tag and return results in a single PHDataList structure. Optionally include “Outliers” of
the data set if there is not a value specifically on the specified start time / end time. The result set will include
an array indicating which values do not meet the specified “MinimumConfidence” threshold.
Overload List
Fetch a single tag of Data and return results in a single PHDataList structure. Operates as if calling this
function with includeOutliers = true, minimumConfidence=-1
Fetch a single tag of Data and return results in a single PHDataList structure. Specify whether outliers should
be returned, and the minimum confidence threshold
[Link](Tag tag)
Fetch a single tag of Data and return results in a single PHDataList structure. Operates as if calling this
function with includeOutliers=true, minimumConfidence=-1
[Visual Basic]
Public Sub FetchDataList ( _
ByVal tag As Tag,
) As PHDataList
[C#]
public PHDataList FetchDataList (
Tag tag
);
Parameters
tag
Used to supply the Tag that is to be returned
[Visual Basic]
Public Sub FetchDataList ( _
[C#]
public PHDataList FetchDataList (
Tag tag ,
bool includeOutliers,
short minimumConfidence
);
Parameters
tag
Used to supply the Tag that is to be returned
includeOutliers
Include the most recent value preceding the start time, and the closest value following the end time, if there
are not values actually on these specified times
minimumConfidence
Threshold of allowed confidence. Any value in the result set that has confidence lower than this threshold will
be included in an array FilterConfIndices in the result structure.
Example
[Link] = SERVERVERSION.API200;
[Link] = defaultServer;
[Link]="now-1h;
[Link]="now";
[Link] = [Link];
try
catch
[Link]([Link]);
return;
..
[Link]();
Results:
[Link][0]=37969.338021446762 [Link][0]=101.846
[Link][0]=100
[Link][1]=37969.341493668981 [Link][1]=198.474
[Link][1]=100
[Link][2]=37969.344965891207 [Link][2]=109.622
[Link][2]=100
[Link]=37969.338021446762
[Link]=37969.344965891207
[Link]=101.846
[Link]=109.622
See Also
[Link] Method
Fetch data for a single tag and return results in a single PHDataListNullable structure. Optionally include
“Outliers” of the data set if there is not a value specifically on the specified start time / end time. Any values
that have confidence less than the specified “MinimumConfidence” will be set to a value of “null” rather than
returning a numeric value.
Overload List
Fetch a single tag of Data and return results in a single PHDataListNullable structure. Operates as if calling
this function with includeOutliers = true, minimumConfidence=-1
Fetch a single tag of Data and return results in a single PHDataListNullable structure. Specify whether outliers
should be returned, and the minimum confidence threshold
[Link](Tag tag)
Fetch a single tag of Data and return results in a single PHDataListNullable structure. Operates as if calling
this function with includeOutliers=true, minimumConfidence=-1
[Visual Basic]
Public Sub FetchDataListNullable( _
ByVal tag As Tag,
) As PHDataListNullable
[C#]
public PHDataListNullable FetchDataListNullable(
Tag tag
);
Parameters
tag
Used to supply the Tag that is to be returned
[Visual Basic]
Public Sub FetchDataListNullable( _
ByVal tag As Tag,
ByVal includeOutliers As Boolean,
ByVal minimumConfidence As Short
) As PHDataListNullable
[C#]
public PHDataListNullable FetchDataListNullable(
Tag tag ,
bool includeOutliers,
short minimumConfidence
);
Parameters
tag
Used to supply the Tag that is to be returned
includeOutliers
Include the most recent value preceding the start time, and the closest value following the end time, if there
are not values actually on these specified times
minimumConfidence
Threshold of allowed confidence. Any value in the result set that has confidence lower than this threshold will
be returned as null
Example
[Link] = SERVERVERSION.API200;
[Link] = defaultServer;
[Link]="now-1h;
[Link]="now";
[Link] = [Link];
try
catch
[Link]([Link]);
return;
..
[Link]();
Results:
[Link][0]=37969.338021446762 [Link][0]=101.846
[Link][0]=100
[Link][1]=37969.341493668981 [Link][1]=198.474
[Link][1]=100
[Link][2]=37969.344965891207 [Link][2]=109.622
[Link][2]=100
[Link]=37969.338021446762
[Link]=37969.344965891207
[Link]=101.846
[Link]=109.622
See Also
[Link] Method
Fetch BestFit data for a single tag and return results in a single PHDataListNullable structure. Any values that
have less than the specified “MinimumConfidence” will be set to a value of “null” rather than returning a
numeric value.
Using this method to retrieve BestFit data will override any specified [Link].
The BestFit algorithm is designed to return a reduced data set that shows the overall representative shape of
the raw data, typically to be used in trending the data. On a screen with (for example) 2000 horizontal pixels,
it isn’t possible to accurately plot 100,000 data values, so instead BestFit can be used. It is the most efficient
way to fetch data over a longer period of time.
BestFit works by breaking up the query duration into smaller intervals, and then selecting specific points to
characterise those intervals. In each interval, the first, last, minimum and maximum data point will be
selected. If MinimumConfidence is specified, the First and Last values may be null if they do not meet the
confidence threshold.
The resulting data set will be filtered for duplicates, ordered by timestamp, then returned as a
PHDataListNullable structure.
The reduction frequency is calculated knowing that there will be up to 4 data points selected for each sub-
interval. Thus, the Number of Intervals needed is (Maximum Values / 4), and the reduction frequency is
calculated as (Query Duration / Number of Intervals).
If a ReductionFrequency larger than this calculated value is manually specified, it will be used instead of this
value.
Overload List
Fetch a single tag of Data and return BestFit results in a single PHDataListNullable structure. Operates as if
calling this function with maximumValues=2000, includeOutliers = true, minimumConfidence=-1
Fetch a single tag of Data and return results in a single PHDataListNullable structure. Specify the maximum
values, whether to include outliers, and the minimum confidence threshold.
[Link](Tag tag)
Fetch a single tag of Data and return results in a single PHDataListNullable structure. Operates as if calling
this function with maximumValues=2000, includeOutliers = true, minimumConfidence=-1
[Visual Basic]
Public Sub FetchBestFitDataListNullable( _
ByVal tag As Tag,
) As PHDataListNullable
[C#]
public PHDataListNullable FetchBestFitDataListNullable(
Tag tag
);
Parameters
tag
Used to supply the Tag that is to be returned
[Visual Basic]
Public Sub FetchBestFitDataListNullable( _
ByVal tag As Tag,
ByVal maximumValues As UInt32,
ByVal includeOutliers As Boolean,
ByVal minimumConfidence As Short
) As PHDataListNullable
[C#]
public PHDataListNullable FetchBestFitDataListNullable(
Tag tag ,
uint maximumValues,
bool includeOutliers,
short minimumConfidence
);
Parameters
tag
Used to supply the Tag that is to be returned
maximumValues
Set the maximum number of values that are desired in the result set
includeOutliers
Include the most recent value preceding the start time, and the closest value following the end time, if there
are not values actually on these specified times
minimumConfidence
Threshold of allowed confidence. Any value in the result set that has confidence lower than this threshold will
be returned as null
Example
[Link] = SERVERVERSION.API200;
[Link] = defaultServer;
[Link] = "now-90d”;
[Link] = "now";
try
catch
[Link]([Link]);
return;
..
[Link]();
Results:
[Link][0]=37969.338021446762 [Link][0]=101.846
[Link][0]=100
[Link][1]=37969.341493668981 [Link][1]=198.474
[Link][1]=100
[Link][2]=37969.344965891207 [Link][2]=109.622
[Link][2]=100
[Link]=37969.338021446762
[Link]=37969.344965891207
[Link]=101.846
[Link]=109.622
See Also
[Link] Method
Fetch a single tag of Data and return the data in a DataSet
Overload List
See Also
[Visual Basic]
Overloads Public Function FetchRowData( _
ByVal Tagname As String _
) As DataSet
[C#]
public DataSet FetchRowData(
string Tagname
);
Parameters
Tagname
Tag that is to be returned
Example
Retrieve and display in a row format time series data for tag kst20000
[Link] = SERVERVERSION.API200;
[Link] = defaultServer;
[Link]="now-15m;
[Link]="now";
[Link] = [Link];
[Link] = 300;
try
dsGrid = [Link]("kst20000");
[Link]([Link]);
return;
See Also
[Visual Basic]
Overloads Public Function FetchRowData( _
ByVal oTags As Tags _
) As DataSet
[C#]
public DataSet FetchRowData(
Tags oTags
);
Parameters
oTags
Used to supply the collection of Tags
Example
Retrieve and display in a row format time series data for collection of Tags
[Link] = SERVERVERSION.API200;
[Link] = defaultServer;
[Link]="now-15m;
[Link]="now";
[Link] = [Link];
[Link] = 300;
[Link]="now-1h;
[Link]="now";
_tags.Add(new Tag("kst20000");
_tags.Add(new Tag("kst20001");
try
dsGrid=[Link](_tags);
[Link]([Link]);
return;
...
See Also
[Link] Method
Return all tags from the Tags Collection
[Visual Basic]
Public Function FetchStructData( _
ByVal oTags As Tags _
) As ArrayList
[C#]
public ArrayList FetchStructData(
Tags oTags
);
Parameters
oTags
Used to supply the collection of Tags
See Also
[Visual Basic]
Public Function FetchReductionsSpecified (
ByVal oTags As Tags,
ByVal bOverallReductionOnly As Boolean,
ByVal Reductions as REDUCTIONTYPE( )
) As DataSet
[C#]
public DataSet FetchReductionsSpecified (
TagsoTags,
bool bOverallReductionOnly,
REDUCTIONTYPE[] Reductions
);
Parameters
oTags
Collection of Tag items
bOverallReductionOnly
Return all reduction data for the collection of Tags
Reductions
Array of reductions to retrieve
Return Value
Example
Example 1: Return the First, Last, Minimum, and Maximum Reduction data for a collection of Tags
[Link](new Tag("kst20000"));
[Link](new Tag("kst20001"));
Example 1:
try
[Link]([Link]);
return;
See Also
[Link] Method
destructor to clean up all managed and unmanaged code
[Visual Basic]
Overrides Protected Sub Finalize()
[C#]
protected override void Finalize();
See Also
[Link] Method
Get Database Information from default PHD server
Overload List
See Also
[Visual Basic]
Overloads Public Sub GetDBInfo( _
ByRef DBMProvider As String, _
ByRef DBMDataSource As String, _
ByRef UsingINTS As Integer _
)
[C#]
public void GetDBInfo(
ref string DBMProvider,
ref string DBMDataSource,
ref int UsingINTS
);
Parameters
DBMProvider
DBMProvider
DBMDataSource
DBMDataSource
UsingINTS
UsingINTS
See Also
[Visual Basic]
Overloads Public Sub GetDBInfo( _
ByVal Server As PHDServer, _
ByRef DBMProvider As String, _
ByRef DBMDataSource As String, _
ByRef UsingINTS As Integer _
)
[C#]
public void GetDBInfo(
PHDServer Server,
ref string DBMProvider,
ref string DBMDataSource,
ref int UsingINTS
);
Parameters
Server
PHDServer object
DBMProvider
DBMProvider
DBMDataSource
DBMDataSource
UsingINTS
UsingINTS
See Also
[Link] Method
Returns link list from the default server
Overload List
See Also
[Link] Method ()
Returns link list from the default server
[Visual Basic]
Overloads Public Function GetLinkList() As ArrayList
[C#]
public ArrayList GetLinkList();
Return Value
See Also
[Visual Basic]
Overloads Public Function GetLinkList( _
ByVal Server As PHDServer _
) As ArrayList
[C#]
public ArrayList GetLinkList(
PHDServer Server
);
Parameters
Server
Return Value
See Also
[Link] Method
Returns link list from the default server
Overload List
See Also
[Link] Method ()
Returns link list from the default server
[Visual Basic]
Overloads Public Function GetLinks() As DataSet
[C#]
public DataSet GetLinks();
Return Value
See Also
[Visual Basic]
Overloads Public Function GetLinks( _
ByVal Server As PHDServer _
) As DataSet
[C#]
public DataSet GetLinks(
PHDServer Server
);
Parameters
Server
Return Value
See Also
[Link] Method
Returns Parent Tag list from the default server
Overload List
See Also
[Link] Method ()
Returns Parent Tag list from the default server
[Visual Basic]
Overloads Public Function GetParentTagList() As ArrayList
[C#]
public ArrayList GetParentTagList();
Return Value
See Also
[Visual Basic]
Overloads Public Function GetParentTagList( _
ByVal Server As PHDServer _
) As ArrayList
[C#]
public ArrayList GetParentTagList(
PHDServer Server
);
Parameters
Server
Return Value
See Also
[Link] Method
Returns Parent Tag list from the default server
Overload List
See Also
[Link] Method ()
Returns Parent Tag list from the default server
[Visual Basic]
Overloads Public Function GetParentTags() As DataSet
[C#]
public DataSet GetParentTags();
Return Value
See Also
[Visual Basic]
Overloads Public Function GetParentTags( _
ByVal Server As PHDServer _
) As DataSet
[C#]
Parameters
Server
Return Value
See Also
[Link] Method
A 200 API function that will return the RDI info
Overload List
See Also
[Visual Basic]
Overloads Public Function GetRDIInfo( _
ByVal RDIName As String _
) As DataSet
[C#]
public DataSet GetRDIInfo(
string RDIName
);
Parameters
RDIName
The RDI Name to return Information for
Return Value
Exceptions
Example
Return a dataset of RDI information for the specified RDI. This example assumes that there is a datagrid on the
form named dgData
try
ds=[Link]([Link]);
[Link](ds,"TEST");
[Link]([Link]);
See Also
[Visual Basic]
Overloads Public Function GetRDIInfo( _
ByVal RDIName As String, _
ByVal Server As PHDServer _
) As DataSet
[C#]
public DataSet GetRDIInfo(
string RDIName,
PHDServer Server
);
Parameters
RDIName
RDI Name
Server
The PHDServer object
Return Value
See Also
[Link] Method
Returns RDI list from the default server
Overload List
See Also
[Link] Method ()
Returns RDI list from the default server
[Visual Basic]
Overloads Public Function GetRDIList() As ArrayList
[C#]
public ArrayList GetRDIList();
Return Value
See Also
[Visual Basic]
Overloads Public Function GetRDIList( _
ByVal Server As PHDServer _
) As ArrayList
[C#]
public ArrayList GetRDIList(
PHDServer Server
);
Parameters
Server
PHDServer object
Return Value
See Also
[Link] Method
Returns RDI list from the default server
Overload List
See Also
[Link] Method ()
Returns RDI list from the default server
[Visual Basic]
Overloads Public Function GetRDIs() As DataSet
[C#]
public DataSet GetRDIs();
Return Value
See Also
[Visual Basic]
Overloads Public Function GetRDIs( _
ByVal Server As PHDServer _
) As DataSet
[C#]
public DataSet GetRDIs(
PHDServer Server
);
Parameters
Server
Return Value
See Also
[Link] Method
Modify Tag Data
Overload List
See Also
[Visual Basic]
Overloads Public Sub ModifyTag( _
ByVal tag As Tag, _
ByVal Value As Object _
)
[C#]
public void ModifyTag(
Tag tag,
object Value
);
Parameters
tag
The Tag object
Value
The value to be inserted
Example
[Link]="KST20000";
if(istat!=0)
[Link]=istat;
[Link]([Link]);
See Also
[Visual Basic]
Overloads Public Sub ModifyTag( _
ByVal tag As Tag, _
ByVal Value As Object, _
ByVal TimeStamp As Date, _
ByVal Confidence As SByte, _
ByVal Units As String _
)
[C#]
public void ModifyTag(
Tag tag,
object Value,
DateTime TimeStamp,
sbyte Confidence,
string Units
);
Parameters
tag
The Tag object
Value
The Value to be inserted
TimeStamp
The UTC timestamp
Confidence
The Confidence
Units
The Engineering Units
See Also
[Visual Basic]
Overloads Public Sub ModifyTag( _
ByVal tag As Tag, _
ByVal Value As Object, _
ByVal TimeStamp As String _
)
[C#]
public void ModifyTag(
Tag tag,
object Value,
string TimeStamp
);
Parameters
tag
The Tag object
Value
The Value of type float, to be inserted
TimeStamp
The timestamp
See Also
[Visual Basic]
Overloads Public Sub ModifyTag( _
ByVal tag As Tag, _
ByVal Value As Object, _
ByVal TimeStamp As String, _
ByVal Confidence As SByte _
)
[C#]
public void ModifyTag(
Tag tag,
object Value,
string TimeStamp,
sbyte Confidence
);
Parameters
tag
The Tag object
Value
The value to be inserted
TimeStamp
The timestamp
Confidence
The Confidence
See Also
[Visual Basic]
Overloads Public Sub ModifyTag( _
ByVal tag As Tag, _
ByVal Value As Object, _
ByVal TimeStamp As String, _
ByVal Confidence As SByte, _
ByVal Units As String _
)
[C#]
public void ModifyTag(
Tag tag,
object Value,
string TimeStamp,
sbyte Confidence,
string Units
);
Parameters
tag
The Tag object
Value
The value to be inserted
TimeStamp
The timestamp
Confidence
The Confidence
Units
The Engineering Units
See Also
[Link] Method
Insert Tag Data into a DCS for a timestamp of Now
Overload List
See Also
[Visual Basic]
Overloads Public Sub PutData( _
ByVal tag As Tag, _
ByVal Value As Object _
)
[C#]
public void PutData(
Tag tag,
object Value
);
Parameters
tag
Tag object
Value
The value to be inserted
Example
Insert a value into a DCS for tag KST20000. The record will default to a timestamp of Now and Confidence of
100.
[Link]="KST20000";
try
[Link](oTag, floatValue);
catch(PHDErrorException ex)
[Link]([Link]);
return;
See Also
[Visual Basic]
Overloads Public Sub PutData( _
ByVal tag As Tag, _
ByVal Value As Object, _
ByVal TimeStamp As Date, _
ByVal Confidence As SByte, _
ByVal Units As String _
)
[C#]
public void PutData(
Tag tag,
object Value,
DateTime TimeStamp,
sbyte Confidence,
string Units
);
Parameters
tag
Tag object
Value
The Value to be inserted
TimeStamp
The UTC timestamp
Confidence
The Confidence
Units
The Engineering Units
See Also
[Visual Basic]
Overloads Public Sub PutData( _
ByVal tag As Tag, _
ByVal Value As Object, _
ByVal TimeStamp As String _
)
[C#]
public void PutData(
Tag tag,
object Value,
string TimeStamp
);
Parameters
tag
Tag object
Value
The value to be inserted
TimeStamp
The timestamp
Example
Insert a value into a DCS for tag KST20000. The record will have a timestamp of Now and Confidence of
100.
[Link]="KST20000";
try
catch(PHDErrorException ex)
[Link]([Link]);
return;
See Also
[Visual Basic]
Overloads Public Sub PutData( _
ByVal tag As Tag, _
ByVal Value As Object, _
ByVal TimeStamp As String, _
ByVal Confidence As SByte _
)
[C#]
public void PutData(
Tag tag,
object Value,
string TimeStamp,
sbyte Confidence
);
Parameters
tag
Tag object
Value
The value to be inserted
TimeStamp
The timestamp
Confidence
The Confidence
Example
[Link]="KST20000";
try
catch(PHDErrorException ex)
[Link]([Link]);
return;
See Also
[Visual Basic]
Overloads Public Sub PutData( _
ByVal tag As Tag, _
ByVal Value As Object, _
ByVal TimeStamp As String, _
ByVal Confidence As SByte, _
ByVal Units As String _
)
[C#]
public void PutData(
Tag tag,
object Value,
string TimeStamp,
sbyte Confidence,
string Units
);
Parameters
tag
Tag object
Value
The Value to be inserted
TimeStamp
The string timestamp
Confidence
The Confidence
Units
The Engineering Units
Example
[Link]="KST20000";
try
catch(PHDErrorException ex)
[Link]([Link]);
return;
See Also
[Link] Method
Overload List
PutList
Public void PutList(Tag[] TagList, ref DataSet ds, out int failed, out int pending);
PutList
Public void PutList(PHDServer Server, Tag[] TagList, ref DataSet ds, out int failed, out int pending);
[Link] Method (Tag[] TagList, ref DataSet ds, out int failed, out int
pending)
[Visual Basic]
Overloads Public Sub PutList( _
ByVal tags As Tag(), _
ByRef ds As DataSet, _
ByRef failed As Integer, _
ByRef pending As Integer_
)
[C#]
);
Parameters
[Link] Method (PHDServer Server, Tag[] TagList, ref DataSet ds, out int
failed, out int pending)
[Visual Basic]
Overloads Public Sub PutList( _
ByVal Server As PHDServer, _
ByVal tags As Tag(), _
ByRef ds As DataSet, _
ByRef failed As Integer, _
ByRef pending As Integer_
)
[C#]
public void PutList(
PHDServer Server,
Tag []tags,
ref DataSet ds,
out int failed,
out int pending
);
Parameters
[Link] Method
Convert a PHD relative time to the absolute UTC date and time on the client. An exception will be thrown for a
incorrect relative input.
Overload List
Convert a PHD relative time to the absolute UTC date and time on the client. An exception will be thrown for a
incorrect relative input.
See Also
[Visual Basic]
Overloads Public Sub RelativeToAbsolute( _
ByVal RelativeDate As String, _
ByRef AbsoluteDateTimeUTC As Date _
)
[C#]
public void RelativeToAbsolute(
string RelativeDate,
ref DateTime AbsoluteDateTimeUTC
);
Parameters
RelativeDate
The relative value (eq Now, Now-1D etc)
AbsoluteDateTimeUTC
The Absolute Value Returned
Example
...
[Link]([Link],ref dtAbsolute)
...
See Also
[Visual Basic]
Overloads Public Sub RelativeToAbsolute( _
ByVal RelativeDate As String, _
ByRef AbsoluteDateTimeUTC As Date, _
ByVal UsingServerTime As Boolean _
)
[C#]
public void RelativeToAbsolute(
string RelativeDate,
ref DateTime AbsoluteDateTimeUTC,
bool UsingServerTime
);
Parameters
RelativeDate
The relative value (eq Now, Now-1D etc)
AbsoluteDateTimeUTC
The Absolute Value Returned
UsingServerTime
A flag indicating whether or not the absolute time should be gotten from server or client.
Example
......
...
See Also
[Visual Basic]
Overloads Public Sub RelativeToAbsolute( _
ByVal RelativeDate As String, _
ByRef AbsoluteDateTimeUTC As Date, _
ByVal Server As PHDServer _
)
[C#]
public void RelativeToAbsolute(
string RelativeDate,
ref DateTime AbsoluteDateTimeUTC,
PHDServer Server
);
Parameters
RelativeDate
The relative value (eq Now, Now-1D etc)
AbsoluteDateTimeUTC
The Absolute Value Returned
Server
The PHDServer object that specifies the PHD Server
See Also
[Link] Method
Convert a PHD string/relative time to universal DateTime. The conversion will be performed on the default PHD
server if the string starts with "NOW"; otherwise the conversion will be performed on the local machine.
Overload List
Convert a PHD string/relative time to universal DateTime. The conversion will be performed on the default PHD
server if the string starts with "NOW"; otherwise the conversion will be performed on the local machine.
See Also
[Visual Basic]
Overloads Public Function StringToUniversalTime( _
ByVal StringTime As String _
) As Date
[C#]
public DateTime StringToUniversalTime(
string StringTime
);
Parameters
StringTime
Return Value
See Also
[Visual Basic]
Overloads Public Function StringToUniversalTime( _
ByVal StringTime As String, _
ByVal Server As PHDServer _
) As Date
[C#]
public DateTime StringToUniversalTime(
string StringTime,
PHDServer Server
);
Parameters
StringTime
PHD string/relative time
Server
PHDServer object
Return Value
See Also
[Link] Method
Fetch a single tag of Data
Overload List
See Also
[Visual Basic]
Overloads Public Function TagDfn( _
ByVal Tagname As String _
) As DataSet
[C#]
public DataSet TagDfn(
string Tagname
);
Parameters
Tagname
Used to supply the Tag that is to be returned
See Also
[Visual Basic]
Overloads Public Function TagDfn( _
ByVal oTags As Tags _
) As DataSet
[C#]
public DataSet TagDfn(
Tags oTags
);
Parameters
oTags
Used to supply the collection of Tags
See Also
[Link] Method
Specify call back function when PHD Tags have had data changed
Overload List
Specify call back function when PHD Tags have been updated
See Also
[Visual Basic]
Overloads Public Sub TagDataChangeHandler( _
ByVal TagDataChangeCallbackFunc As TagDataChangeNotify, _
ByVal lpData As IntPtr _
)
[C#]
public void TagDataChangeHandler(
TagDataChangeNotify TagDataChangeCallbackFunc,
IntPtr lpData
);
Parameters
TagDataChangeCallbackFunc
Tag Data Change callback function
lpData
Pointer that will be returned as an argument to the callback function
See Also
[Visual Basic]
Overloads Public Sub TagUpdateHandler( _
ByVal Server As PHDServer, _
ByVal TagDataChangeCallbackFunc As TagDataChangeNotify, _
ByVal lpData As IntPtr _
)
[C#]
public void TagUpdateHandler(
PHDServer Server,
TagDataChangeNotify TagDataChangeCallbackFunc,
IntPtr lpData
);
Parameters
Server
PHDServer object
TagDataChangeCallbackFunc
Tag Data Change callback function
lpData
Pointer that will be returned as an argument to the callback function
See Also
[Link] Method
Specify call back function when PHD Tags have been updated
Overload List
Specify call back function when PHD Tags have been updated
See Also
[Visual Basic]
Overloads Public Sub TagUpdateHandler( _
ByVal Server As PHDServer, _
ByVal TagUpdateCallbackFunc As TagUpdateNotify _
)
[C#]
public void TagUpdateHandler(
PHDServer Server,
TagUpdateNotify TagUpdateCallbackFunc
);
Parameters
Server
PHDServer object
TagUpdateCallbackFunc
Tag update callback function
See Also
[Visual Basic]
Overloads Public Sub TagUpdateHandler( _
ByVal TagUpdateCallbackFunc As TagUpdateNotify _
)
[C#]
public void TagUpdateHandler(
TagUpdateNotify TagUpdateCallbackFunc
);
Parameters
TagUpdateCallbackFunc
Tag update callback function
See Also
[Link] Method
Have the Default PHD Server Validate a function.
Overload List
See Also
[Visual Basic]
Overloads Public Sub ValidateCalc( _
ByVal sCalc As String _
)
[C#]
public void ValidateCalc(
string sCalc
);
Parameters
sCalc
The function to be validated as a string
Example
try
[Link]("Calculation Validated");
[Link] = [Link];
return;
See Also
[Visual Basic]
Overloads Public Sub ValidateCalc( _
ByVal Server As PHDServer, _
ByVal sCalc As String _
)
[C#]
public void ValidateCalc(
PHDServer Server,
string sCalc
);
Parameters
Server
The PHDServer object
sCalc
The function to be validated as a string
See Also
[Link] Method
Get the digital enumeration value definition for the digital value list ID specified from the default server
Overload List
Get the digital enumeration value definition for the digital value list ID specified from the default
server
[Link] (Int32, String, String, ref int[],
ref string[] DvValues)
Get the digital enumeration value definition for the digital value list ID specified from the server
specified
[Link] (Int32, String, String, ref int[],
ref string[] DvValues, PHDServer)
[C#]
int DvListID,
);
Parameters
DvListID
Digital value list ID
DvListName
A string to hold the digital value list name returned
DvDefaultValue
A string to hold the digital value list default value returned
DvOrdinals
An integer array to hold the digital value list ordinals returned
DvValues
A string array to hold the digital value list string values returned
[Visual Basic]
[C#]
int DvListID,
PHDServer Server
);
Parameters
DvListID
DvOrdinals
A string array to hold the digital value list string values returned
Server
PHDServer object
[Link] Method
Get PHD tagname for the tag number specified from the default PHD server
Overload List
Get PHD tagname for the tag number specified from the default PHD server
[Link](Int32)
Get PHD tagname for the tag number specified from the server specified
[Link](Int32, PHDServer)
Get PHD tagname for the [Link] or tagname specified from the default PHD server
[Link](String)
Get PHD tagname for the [Link] or tagname specified from the server specified
[Link](String, PHDServer)
[Link] Method(Int32)
Get PHD tagname for the tag number specified from the default PHD server.
[Visual Basic]
) As String
[C#]
int tagno
);
Parameters
tagno
Tag number
Return Value
Returns the tagname if the tag number is valid. Or returns [Link] if the tag number is invalid.
[Link] Method(Int32,PHDServer)
Get PHD tagname for the tag number specified from the server specified.
[Visual Basic]
) As String
[C#]
int tagno,
PHDServer Server
);
Parameters
tagno
Tag number
Server
PHDServer object
Return Value
Returns the tagname if the tag number is valid. Or returns [Link] if the tag number is invalid.
[Link] Method(String)
Get PHD tagname for the [Link] or tagname specified from the default PHD server.
[Visual Basic]
) As String
[C#]
string pointDotParameterOrTagname
);
Parameters
pointDotParameterOrTagname
Return Value
Returns the tagname if pointDotParameterOrTagname is valid. Otherwise returns [Link].
Get PHD tagname for the [Link] or tagname specified from the server specified
[Visual Basic]
) As String
[C#]
string pointDotParameterOrTagname,
PHDServer Server
);
Parameters
pointDotParameterOrTagname
PHDServer object
Return Value
Returns the tagname if pointDotParameterOrTagname is valid. Otherwise returns [Link].
PHDServer Class
PHDServer class describes a connection to a PHD Server
[Link]
[Link]
[Visual Basic]
Public Class PHDServer
Implements IDisposable
[C#]
public class PHDServer : IDisposable
Thread Safety
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance
members are not guaranteed to be thread-safe.
Example
Create a PHDServer and make it the default Server. The hostname of the server is stored in a text box labeled
[Link]
[Link] = [Link].API200;
[Link] = DefaultServer;
[Link]();
Requirements
Namespace: [Link]
See Also
PHDServer Members
PHDServer overview
Equals (inherited from Object) Determines whether the specified Object is equal
to the current Object.
GetType (inherited from Object) Gets the Type of the current instance.
Finalize Finalizer
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.
See Also
PHDServer Constructor
Create a PHD Server Object that defaults to the 150 API and uses the PHD_HOST environment variable as a
default host name
Overload List
Create a PHD Server Object that defaults to the 150 API and uses the PHD_HOST environment variable as a
default host name
public PHDServer();
Create a PHD Server Object that defaults to the 150 API
public PHDServer(string);
Create a PHD Server Object
public PHDServer(string,SERVERVERSION);
See Also
PHDServer Constructor ()
Create a PHD Server Object that defaults to the 150 API and uses the PHD_HOST environment variable as a
default host name
[Visual Basic]
Overloads Public Sub New()
[C#]
public PHDServer();
See Also
[Visual Basic]
Overloads Public Sub New( _
ByVal Hostname As String _
)
[C#]
public PHDServer(
string Hostname
);
Parameters
Hostname
PHD host that the server object will be assigned to
See Also
[Visual Basic]
Overloads Public Sub New( _
ByVal Hostname As String, _
ByVal APIVersion As SERVERVERSION _
)
[C#]
public PHDServer(
string Hostname,
SERVERVERSION APIVersion
);
Parameters
Hostname
PHD host that the server object will be assigned to
APIVersion
Enum API selection
See Also
PHDServer Properties
The properties of the PHDServer class are listed below. For a complete list of PHDServer class members, see
the PHDServer Members topic.
See Also
[Link] Property
PHD Server API Version used to communicate with the historian
[Visual Basic]
Public Property APIVersion As SERVERVERSION
[C#]
public SERVERVERSION APIVersion {get; set;}
See Also
[Link] Property
PHD Host Name.
[Visual Basic]
Public Property HostName As String
[C#]
public string HostName {get; set;}
See Also
[Link] Property
Limit how far back (in minutes) before the specified start time PHD will look for prior outliers when there is no
raw value exactly on the start time. The default is -1 which does not restrict how far back to look. Use a value
of 0 to prevent searching back before the start time. Use a non-zero positive number (e.g. 120 for 2 hours) to
specify how many minutes to search back. Note: This is a performance parameter, not a filter. Prior outliers
may still be returned if they are in the memory queues, or in an already retrieved archive record.
[Visual Basic]
Public Property MaxSearchBackTime As Integer
[C#]
public int MaxSearchBackTime {get; set;}
See Also
[Link] Property
Legacy property for PHD 2xx and earlier systems only. PHD R300 and later use integrated authentication when
connecting to APIServer.
[Visual Basic]
Public Property Password As String
[C#]
public string Password {get; set;}
See Also
[Link] Property
Version of the PHD Server that is being accessed by the client application
[Visual Basic]
Public Property PHDServerVersion as PHDVersionStruct
[C#]
public PHDVersionStruct PHDServerVersion {get; set;}
To fetch the PHDServerVersion details, you must connect to the PHD server or perform a query:
[Link]();
[Link]("[Link]: {0}" ,
[Link]());
[Link]("[Link]: {0}",
[Link]());
[Link]("[Link]: {0}",
[Link]());
[Link]("[Link]: {0}",
[Link]());
[Link]("[Link]: {0}",
[Link]());
Example Output
[Link]: [Link]
[Link]: 410
[Link]: 1
[Link]: 0
[Link]: 1
See Also
[Link] Property
PHD Port Number default is 3100.
[Visual Basic]
Public Property Port As Integer
[C#]
public int Port {get; set;}
See Also
[C#]
public DataTable PutListTable {get; set;}
[Link] Property
The RequestTimeout property identifies the maximum amount of time to wait for responses from APIServer or
RAPIServer. If not specified, the PHDMaxRequestTime registry setting on APIServer or RAPIServer is used. It
is in milliseconds.
[Visual Basic]
Public Property RequestTimeout As UInt32
[C#]
public uint RequestTimeout {get; set;}
See Also
[Link] Property
return a unique identifier for the Server GUID
[Visual Basic]
Public ReadOnly Property ServerID As String
[C#]
public string ServerID {get;}
See Also
[Link] Property
Legacy property for PHD 2xx and earlier systems only. PHD R300 and later use integrated authentication when
connecting to APIServer.
[Visual Basic]
Public Property UserName As String
[C#]
public string UserName {get; set;}
See Also
[Link] Property
A Windows user account password. It is only used by Remote API to make initial connection.
[Visual Basic]
Public Property WindowsPassword As String
[C#]
public string WindowsPassword {get; set;}
See Also
[Link] Property
A Windows user account name. It is only used by Remote API to make initial connection.
[Visual Basic]
Public Property WindowsUsername As String
[C#]
public string WindowsUsername {get; set;}
See Also
PHDServer Methods
The methods of the PHDServer class are listed below. For a complete list of PHDServer class members, see
the PHDServer Members topic.
Equals (inherited from Object) Determines whether the specified Object is equal
to the current Object.
GetType (inherited from Object) Gets the Type of the current instance.
ToString (inherited from Object) Returns a String that represents the current
Object.
Finalize Finalizer
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.
See Also
[Link] Method
Explicitly perform a connection to the PHD Server. This method can optionally be called to cause the calling
application to connect. If this method is not called, then a connection is performed on the first call to a method
querying or writing data to PHD.
[Visual Basic]
Public Sub ConnectToServer()
[C#]
public void ConnectToServer();
See Also
[Link] Method
Implement IDisposable. If there is an open connection to PHD then that connection is closed.
[Visual Basic]
NotOverridable Public Sub Dispose() _
Implements [Link]
[C#]
public void Dispose();
Implements
[Link]
See Also
[Link] Method
Finalizer
[Visual Basic]
Overrides Protected Sub Finalize()
[C#]
protected override void Finalize();
See Also
RDIListStruct Class
For a list of all members of this type, see RDIListStruct Members.
[Link]
[Link]
[Visual Basic]
Public Class RDIListStruct
[C#]
public class RDIListStruct
Thread Safety
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance
members are not guaranteed to be thread-safe.
Requirements
Namespace: [Link]
See Also
RDIListStruct Members
RDIListStruct overview
Equals (inherited from Object) Determines whether the specified Object is equal
to the current Object.
GetType (inherited from Object) Gets the Type of the current instance.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.
See Also
RDIListStruct Constructor
[Visual Basic]
Overloads Public Sub New()
[C#]
public RDIListStruct();
See Also
RDIListStruct Properties
The properties of the RDIListStruct class are listed below. For a complete list of RDIListStruct class
members, see the RDIListStruct Members topic.
See Also
[Link] Property
PHD Tagname
[Visual Basic]
Public ReadOnly Property RDIName As String
[C#]
public string RDIName {get;}
See Also
REDUCTIONOFFSET Enumeration
Identifies the offset applied when retrieving reductions for tags.
[Visual Basic]
Public Enum REDUCTIONOFFSET
[C#]
Members
Requirements
Namespace: [Link]
See Also
[Link] Namespace
REDUCTIONTYPE Enumeration
Identifies the type of reduction fetched for the tags..
[Visual Basic]
Public Enum REDUCTIONTYPE
[C#]
public enum REDUCTIONTYPE
Members
None No reduction
Delta The difference between the value and the end and
start of the reduction frequency.
Requirements
Namespace: [Link]
See Also
[Link] Namespace
SAMPLETYPE Enumeration
Sampling types supported.
[Visual Basic]
Public Enum SAMPLETYPE
[C#]
public enum SAMPLETYPE
Members
Snapshot Query interpolated data at the specified sample interval, using direct
sampling to calculate the interpolated values from the surrounding raw data,
and using the interpolation method specified on the tag (if not specified on
the tag, manual input tags use step interpolation, collected tags use linear
interpolation).
Average Query interpolated data at the specified sample interval, using "around"
resampling to calculate the interpolated value from the surrounding raw data,
and using the interpolation method specified on the tag (if not specified on
the tag, manual input tags use step interpolation, collected tags use linear
interpolation).
Resampled Query interpolated data at the specified sample interval, using the resample
method configured on the tag to calculate the interpolated values from the
surrounding raw data, and using the interpolation method specified on the
tag (if not specified on the tag, manual input tags use step interpolation,
collected tags use linear interpolation).
InterpolatedRaw Returns an interpolated value for each raw value within the requested
timespan, replacing -1 confidence values with an interpolated value, with a 0
confidence. It will interpolate and extrapolate the start and end ranges
accordingly.
Requirements
Namespace: [Link]
See Also
[Link] Namespace
SERVERVERSION Enumeration
Enum list if Server API Supported
[Visual Basic]
Public Enum SERVERVERSION
[C#]
public enum SERVERVERSION
Members
DEFAULT The default uses the 150 API as it can communicate with both 150 and 200
historians.
API150 The 150 API can communicate with both 150 and 200 PHD.
API200 The 200 API will only communicate with R200 PHD or newer historians.
RAPI200 The 200 RAPI will only communicate with 200 PHD historians.
Requirements
Namespace: [Link]
See Also
[Link] Namespace
Tag Class
Describes a single Tag
[Link]
[Link]
[Visual Basic]
Public Class Tag
[C#]
public class Tag
Thread Safety
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance
members are not guaranteed to be thread-safe.
Remarks
This class describes the properties and methods associated with a Tag
Example
Create a new instance of a Tag. Add the Tag to the Tags collection
[Link](_tag);
Requirements
Namespace: [Link]
See Also
Tag Members
Tag overview
GetHashCode (inherited from Object) Serves as a hash function for a particular type,
suitable for use in hashing algorithms and data
structures like a hash table.
GetType (inherited from Object) Gets the Type of the current instance.
ToString (inherited from Object) Returns a String that represents the current
Object.
Finalize (inherited from Object) Allows an Object to attempt to free resources and
perform other cleanup operations before the
Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.
See Also
Tag Constructor
Create a new instance of a Tag.
Overload List
public Tag();
Tag constructor with tagname as a parameter
public Tag(string);
See Also
Tag Constructor ()
Create a new instance of a Tag.
[Visual Basic]
Overloads Public Sub New()
[C#]
public Tag();
Example
_tag.TagName = "kst20000";
[Link](_tag);
See Also
[Visual Basic]
Overloads Public Sub New( _
ByVal tagname As String _
)
[C#]
public Tag(
string tagname
);
Parameters
tagname
Example
Create a new instance of a Tag. Add the Tag to the Tags collection
[Link](_tag);
See Also
Tag Properties
The properties of the Tag class are listed below. For a complete list of Tag class members, see the Tag
Members topic.
See Also
[Link] Property
The Tagname of the Tag.
[Visual Basic]
Public Property EnumEnable As Boolean
[C#]
public bool EnumEnable {get; set;}
See Also
[Link] Property
The Server Object that the tag is associated with. No Server object supplied the base Server is used
[Visual Basic]
Public Property Server As PHDServer
[C#]
public PHDServer Server {get; set;}
See Also
[Link] Property
The Tagname of the Tag.
[Visual Basic]
Public Property TagName As String
[C#]
public string TagName {get; set;}
See Also
[Link] Property
The Engineering Units to be converted to for the Tag.
[Visual Basic]
Public Property Units As String
[C#]
public string Units {get; set;}
See Also
TagFilter Class
A structure is used to specify tag filter conditions
[Link]
[Link]
[Visual Basic]
Public Class TagFilter
[C#]
public class TagFilter
Thread Safety
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance
members are not guaranteed to be thread-safe.
Requirements
Namespace: [Link]
See Also
TagFilter Members
TagFilter overview
Equals (inherited from Object) Determines whether the specified Object is equal
to the current Object.
GetType (inherited from Object) Gets the Type of the current instance.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.
See Also
TagFilter Constructor
Constructor
[Visual Basic]
Public Sub New()
[C#]
public TagFilter();
See Also
TagFilter Fields
The fields of the TagFilter class are listed below. For a complete list of TagFilter class members, see the
TagFilter Members topic.
See Also
[Link] Field
Collector Name Pattern
[Visual Basic]
Public Collector As String
[C#]
public string Collector;
See Also
[Link] Field
Data Type
[Visual Basic]
Public DataType As Char
[C#]
public char DataType;
See Also
[Link] Field
Tag description pattern
[Visual Basic]
Public Description As String
[C#]
public string Description;
See Also
[Link] Field
Parent Tag Name Pattern
[Visual Basic]
Public ParentTagname As String
[C#]
public string ParentTagname;
See Also
[Link] Field
Scan frequency in second
[Visual Basic]
Public ScanRate As Long
[C#]
public long ScanRate;
See Also
[Link] Field
Source Tag Name Pattern
[Visual Basic]
Public SourceTagname As String
[C#]
public string SourceTagname;
See Also
[Link] Field
Source Tag Engineering Unit Pattern
[Visual Basic]
Public SourceUnits As String
[C#]
public string SourceUnits;
See Also
[Link] Field
Tag Name Pattern
[Visual Basic]
Public Tagname As String
[C#]
public string Tagname;
See Also
[Link] Field
Engineering Unit Pattern
[Visual Basic]
Public TagUnits As String
[C#]
public string TagUnits;
See Also
TagFilter Methods
The methods of the TagFilter class are listed below. For a complete list of TagFilter class members, see the
TagFilter Members topic.
Equals (inherited from Object) Determines whether the specified Object is equal
to the current Object.
GetType (inherited from Object) Gets the Type of the current instance.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.
See Also
[Link] Method
Clear all data members
[Visual Basic]
Public Sub Clear()
[C#]
public void Clear();
See Also
TagListStruct Class
For a list of all members of this type, see TagListStruct Members.
[Link]
[Link]
[Visual Basic]
Public Class TagListStruct
[C#]
public class TagListStruct
Thread Safety
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance
members are not guaranteed to be thread-safe.
Requirements
Namespace: [Link]
See Also
TagListStruct Members
TagListStruct overview
Equals (inherited from Object) Determines whether the specified Object is equal
to the current Object.
GetType (inherited from Object) Gets the Type of the current instance.
ToString (inherited from Object) Returns a String that represents the current
Object.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.
See Also
TagListStruct Constructor
Create an instance of the class.
[Visual Basic]
Overloads Public Sub New()
[C#]
public TagListStruct();
See Also
TagListStruct Properties
The properties of the TagListStruct class are listed below. For a complete list of TagListStruct class
members, see the TagListStruct Members topic.
See Also
[Link] Property
Collector Name
[Visual Basic]
Public ReadOnly Property CollectorName As String
[C#]
public string CollectorName {get;}
See Also
[Link] Property
Data Length
[Visual Basic]
See Also
[Link] Property
Data Type
[Visual Basic]
Public ReadOnly Property DataType As Char
[C#]
public char DataType {get;}
See Also
[Link] Property
Parent Tag Name
[Visual Basic]
Public ReadOnly Property ParentTagname As String
[C#]
public string ParentTagname {get;}
See Also
[Link] Property
Parent Tag Number
[Visual Basic]
Public ReadOnly Property ParentTagno As Integer
[C#]
public int ParentTagno {get;}
See Also
[Link] Property
Source Tagname
[Visual Basic]
Public ReadOnly Property SourceTagname As String
[C#]
public string SourceTagname {get;}
See Also
[Link] Property
Source Units
[Visual Basic]
Public ReadOnly Property SourceUnits As String
[C#]
public string SourceUnits {get;}
See Also
[Link] Property
PHD Tagname
[Visual Basic]
Public ReadOnly Property Tagname As String
[C#]
public string Tagname {get;}
See Also
[Link] Property
PHD Tagno
[Visual Basic]
Public ReadOnly Property Tagno As Integer
[C#]
public int Tagno {get;}
See Also
[Link] Property
Engineering Units
[Visual Basic]
Public ReadOnly Property Units As String
[C#]
public string Units {get;}
See Also
Tags Class
The Tags class is used to hold a collection of Tag items
[Link]
[Link]
[Visual Basic]
Public Class Tags
[C#]
public class Tags
Thread Safety
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance
members are not guaranteed to be thread-safe.
Remarks
Example
Create a new instance of the Tags collection. Add 3 tags to the collection
vb
[Link](new Tag("kst20000"))
[Link](new Tag("kst20001"))
[Link](new Tag("kst20002"))
c#
[Link](new Tag("kst20000"));
[Link](new Tag("kst20001"));
[Link](new Tag("kst20002"));
Requirements
Namespace: [Link]
See Also
Tags Members
Tags overview
Equals (inherited from Object) Determines whether the specified Object is equal
to the current Object.
GetType (inherited from Object) Gets the Type of the current instance.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.
See Also
Tags Constructor
[Visual Basic]
Public Sub New()
[C#]
public Tags();
Example
Create a new instance of the Tags collection. Add 3 tags to the collection
vb
[Link](new Tag("kst20000"))
[Link](new Tag("kst20001"))
[Link](new Tag("kst20002"))
c#
[Link](new Tag("kst20000"));
[Link](new Tag("kst20001"));
[Link](new Tag("kst20002"));
See Also
Tags Properties
The properties of the Tags class are listed below. For a complete list of Tags class members, see the Tags
Members topic.
See Also
[Link] Property
return the number of Tag Items in the Tags Collection.
[Visual Basic]
Public ReadOnly Property Count As Integer
[C#]
public int Count {get;}
Example
Create a new instance of the Tags collection. Add a tag name to the collection return the count of the number
of items in the collection
vb
[Link](new Tag("kst20000"))
c#
[Link](new Tag("kst20000"));
See Also
[Link] Property
Indexer to provide read access to array list for the hashtable add a tagname and return the Tag object
reference
Overload List
Indexer to provide read access to array list for the hashtable add a tagname and return the Tag object
reference
See Also
[Visual Basic]
Overloads Public Default ReadOnly Property Item( _
ByVal index As Integer _
) As Tag
[C#]
public Tag this[
int index
] {get;}
Example
Create a new instance of the Tags collection. Add a tag name to the collection and assign that item in the
collection to a Tag
vb
[Link](new Tag("kst20000"))
c#
[Link](new Tag("kst20000"));
See Also
[Visual Basic]
Overloads Public Default ReadOnly Property Item( _
ByVal TagName As String _
) As Tag()
[C#]
public Tag[] this[
string TagName
] {get;}
Example
Create a new instance of the Tags collection. Add a tag name to the collection and assign that item in the
collection to a Tag[]
vb
[Link](new Tag("kst20000"))
c#
[Link](new Tag("kst20000"));
See Also
Tags Methods
The methods of the Tags class are listed below. For a complete list of Tags class members, see the Tags
Members topic.
GetType (inherited from Object) Gets the Type of the current instance.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.
See Also
[Link] Method
Add Tag to HashTable.
[Visual Basic]
Public Sub Add( _
ByVal oTag As Tag _
)
[C#]
public void Add(
Tag oTag
);
See Also
[Link] Method
Enumerates the elements in the Tag Collection
[Visual Basic]
Public Function GetEnumerator() As IEnumerator
[C#]
public IEnumerator GetEnumerator();
See Also
[Link] Method
Remove a Tag from the Tags Collection.
[Visual Basic]
Public Sub Remove( _
ByVal oTag As Tag _
)
[C#]
public void Remove(
Tag oTag
);
Example
Create a new instance of the Tags collection. Add a tag name to the collection then remove that tag from the
collection the collection
vb
[Link](_tag)
[Link](_tag)
c#
[Link](_tag);
[Link](_tag);
See Also
[Link] Method
Remove all Tag items from the Tags Collection.
[Visual Basic]
Public Sub RemoveAll()
[C#]
public void RemoveAll();
See Also
TagDataChangeNotify Delegate
Notification from PHD server when tag data is updated
[Visual Basic]
Public Delegate Sub TagDataChangeNotify( _
ByVal Mode Integer,
ByVal TagNumber Integer,
ByVal TagName String,
ByVal TagUnits String,
ByVal TimeStamp Long,
ByVal Confidence SByte,
ByVal Sequence Short,
Remarks
Example
c#
PHDHistorian oPhd;
try
[Link](callback, [Link]);
[Link](true);
catch(Exception ex)
[Link]( [Link]);
long TimeStamp, sbyte Confidence, short Sequence, char DataType, short DataLength, object
data, object lpData)
Requirements
Namespace: [Link]
See Also
[Link] Namespace
TagUpdateNotify Delegate
Notification from PHD server when tags are updated
[Visual Basic]
Public Delegate Sub TagUpdateNotify( _
ByVal TagCount As Integer, _
ByVal TagnoList As Integer() _
)
[C#]
public delegate void TagUpdateNotify(
int TagCount,
int[] TagnoList
);
Remarks
Example
c#
PHDHistorian oPhd;
try
[Link](callback);
catch(Exception ex)
[Link]( [Link]);
// Clear the TagUpdate list so that you only see new updates next time
[Link]();
Requirements
Namespace: [Link]
See Also
[Link] Namespace