SDK Reference
Object Summary
This section contains the Historian objects that are available in the Historian Software Development Kit.
Alarms Object
You can use Historian to store data for alarms and events. From the SDK, you can add and query these alarms and events. This class is slightly different from other SDK classes in that you will mostly be accessing lower level functionality to add and query alarms and events. By following the directions below, you should be able to perform these tasks fairly easily.
Add Historian Type Library to the Project
As previously mentioned, access to methods for alarms and events is lower level. You must add the Historian COM 1.1 Type library to your project. In Visual Basic, in the Project menu, select References, and then add the library. You can now access the lower level alarms and events methods.
Query by Alarms and Events
For instructions on querying alarms and events, see the documentation for the AlarmRecordSet function.
Add Alarms and Events
You can add alarms and events to Historian by using the AlarmInfo object. In general, adding alarms or events is easy; declare a new AlarmInfo object, fill it up with the required details, and then run the Add function on the AlarmInfo object. In practice, you must be aware of the lifecycle of your alarm.
Create a new AlarmInfo Object
To create a new AlarmInfo object, use the CreateObject method as follows:
Dim myAlarmInfo As AlarmInfo
Set myAlarmInfo = CreateObject("Historian_API.AlarmInfo")
Alarm or Event?
Historian distinguishes between alarms and events. Alarms follow a lifecycle as described below, while events are generally one-shot deals. Example events include Set Point Events, Login Events, or other audit trail events. Alarms are generally characterized by a tag going into and out of an abnormal condition. You must identify your AlarmInfo object as an alarm or event by setting the AlarmType field.
Alarm:myAlarmInfo.AlarmType = ihALARM_CONDITION
Event: myAlarmInfo.AlarmType = ihALARM_TRACKING
Alarm Life Cycle
myAlarmInfo.AddMyServer myAlarmInfo.Clear
New AlarmTo instantiate a new alarm, specify the start time in the AlarmInfo object.
myAlarmInfo.StartTime= Now
State Change
myAlarmInfo.SubConditionName= "HIHI"
Wrong:'myAlarmInfo.StartTime= Now
OK:'myAlarmInfo.StartTime=AlarmStartTime
Acknowledge an Alarm
To acknowledge an alarm, set the Acked field in the AlarmInfo to True, and also specify the time of the acknowledgement by populating the AckTime alarm field. In addition, you must populate the starttime field with the start time of the alarm (when it first went into an alarm condition, not the last state change).
myAlarmInfo.Acked= TRUE
myAlarmInfo.AckTime = Now
myAlarmInfo.StartTime = AlarmStartTime
Return to Normal
When your alarm condition has ended, specify the endtime in the AlarmInfo Object. Similar to the state change and acknowledgements, you can optionally specify the start time of the alarm in the starttime alarm field.
myAlarmInfo.EndTime= Now myAlarmInfo.StartTime = AlarmStartTime
Associating Alarms and Events with Tag Data
The easiest way to associate alarms and events with tag data is to specify the TagName in the AlarmInfo. Historian will sort out everything behind the scenes. However, if you are adding alarms before the associated tag actually exist in Historian, this avenue will not work. You must populate the ItemId field with the source address of the future tag, and populate the DataSourceName field with the collector name of the tag. When the tag is added to the system, the alarms will be correctly linked.
myAlarmInfo.Tagname = TheTagName
OrmyAlarmInfo.DataSourceName = MyCollector.Name myAlarmInfo.ItemId = TheSourceAddress
AlarmInfoFields
The following table lists the AlarmInfo fields. The fields that are marked as required must be filled in for every call to add. In addition, populate the correct fields based on the current state in the lifecycle of your alarm (see above).
FieldName | Data Type | Required for Alarms or Events? | Description |
---|---|---|---|
AlarmType | Long | Both | Classifies this AlarmInfo as an alarm or an event. Enter 1 for an event and 4 for an alarm. |
ItemID | String | None | The ItemID of the alarm or event. This contains the source address of the data access tag that the alarm is associated with. This can be NULL if the alarm is not associated with a tag. |
Source | String | Both | This is the unique identifier used for the alarm or event. |
DataSourceName | String | Both | The collector interface name associated with the alarm or event. |
Tagname | String | None | The Historian Tag Name associated with the alarm. |
EventCategory | String | None | The event category of the alarm or event. |
ConditionName | String | Alarms | The condition of the alarm. This does not apply to event data. This, combined with the source, comprises an alarm. |
SubConditionName | String | Alarms | The sub-condition of the alarm. This does not apply to event data. This is the state of the alarm. |
StartTime | Date | None | The start time or time stamp of the alarm or event. |
EndTime | Date | None | The end time of the alarm. This does not apply to event data. |
AckTime | Date | None | The time the alarm was acknowledged. This does not apply to event data. |
Timestamp | Date | Both | The time stamp of the alarm or event. |
Message | String | None | The message attached to the alarm or event. |
Acked | Boolean | None | Stores the acknowledgement status of the alarm. If the alarm is acknowledged, this will be set to TRUE. |
Severity | Long | None | The severity of the alarm or event. This is stored as an integer value with a range of 1-1000. |
Actor | String | The operator who acknowledged the alarm, or caused the tracking event. | |
Quality | Long | Alarms | The quality of the alarm or event. 0 for bad, 3 for good. |
Dim MyServer As iHistorian_SDK.Server
Set MyServer = GetServer
Dim myAlarmInfo As AlarmInfo
Set myAlarmInfo = CreateObject("iHistorian_API.AlarmInfo")
Dim AlarmStartTime As Date
AlarmStartTime = Now
' New Alarm myAlarmInfo.AlarmType = ihALARM_CONDITION
myAlarmInfo.ConditionName = "SampleCondition"
myAlarmInfo.DataSourceName = "SampleDataSource"
myAlarmInfo.Message = "Sample Alarm"
myAlarmInfo.Source = "SampleSource"
myAlarmInfo.StartTime = AlarmStartTime
myAlarmInfo.SubConditionName = "HI"
myAlarmInfo.Timestamp = Now
myAlarmInfo.Quality = 3
myAlarmInfo.Add MyServer
myAlarmInfo.Clear
' State Change myAlarmInfo.AlarmType = ihALARM_CONDITION
myAlarmInfo.ConditionName = "SampleCondition"
myAlarmInfo.DataSourceName = "SampleDataSource"
myAlarmInfo.Message = "Sample Alarm State II"
myAlarmInfo.Source = "SampleSource"
' Not required, but pointing out the start time of the alarm doesn't hurt
myAlarmInfo.StartTime = AlarmStartTime
myAlarmInfo.SubConditionName = "HIHI"
myAlarmInfo.Timestamp = Now
myAlarmInfo.Quality = 3
myAlarmInfo.Add MyServer
myAlarmInfo.Clear
' Ack the HIHI state
myAlarmInfo.Acked = True
myAlarmInfo.AckTime = Now
myAlarmInfo.AlarmType = ihALARM_CONDITION
myAlarmInfo.ConditionName = "SampleCondition"
myAlarmInfo.DataSourceName = "SampleDataSource"
myAlarmInfo.Source = "SampleSource"
myAlarmInfo.StartTime = AlarmStartTime
myAlarmInfo.SubConditionName = "HIHI"
myAlarmInfo.Timestamp = Now
myAlarmInfo.Quality = 3
myAlarmInfo.Add MyServer myAlarmInfo.Clear
' Return to Normal
myAlarmInfo.AlarmType = ihALARM_CONDITION
myAlarmInfo.ConditionName = "SampleCondition"
myAlarmInfo.DataSourceName = "SampleDataSource"
myAlarmInfo.EndTime = Now
myAlarmInfo.Source = "SampleSource"
' Not required, but pointing out the start time of the alarm doesn't hurt
myAlarmInfo.StartTime = AlarmStartTime
myAlarmInfo.Timestamp = Now
myAlarmInfo.Quality = 3
myAlarmInfo.Add MyServer
myAlarmInfo.Clear
Archive Object
The Archive object contains the configuration and status information for a single archive file on the Historian server.
Archives Object
The Archives object provides access to Historian archive configuration information and performance statistics. It also provides functionality to add, delete, and modify Historian archives.
Alarms.PurgeAlarmsById
Dim Alarms() As String
Dim AlarmIds() As Long
Dim i As Long
Dim numberOfAlarms As Long
Dim AlarmsObj As iHistorian_SDK.Alarms
Dim Status As Boolean
i = 0
numberOfAlarms = 0
Status = False
If CheckConnection = True Then
Set AlarmsObj = ConnectedServer.Alarms
If TextAlarmIds.Text = "" Then
MsgBox "Alarms cannot be empty", vbCritical, "Historian"
Exit Sub
End If
Trim (TextAlarmIds.Text)
'Multiple alarms are separated by semicolon
Alarms() = Split(TextAlarmIds.Text, ";")
numberOfAlarms = UBound(Alarms)
If numberOfAlarms <> 0 Then
ReDim AlarmIds(0 To numberOfAlarms) As Long
For i = 0 To numberOfAlarms
If Alarms(i) <> "" Then
AlarmIds(i) = CLng(Alarms(i))
End If
Next
Status = AlarmsObj.PurgeAlarmsById(AlarmIds())
If Status <> True Then
MsgBox "An error occurred while deleting the alarms. See the Historian Alerts for more details.", vbCritical, "Historian"
Else
MsgBox "Successfully deleted the alarms.", vbInformation, "Historian"
End If
TextAlarmIds.Text = ""
Else
MsgBox "Please enter Alarm Ids followed by ';'", vbCritical, "Historian"
End If
Else
MsgBox "Not connected", vbCritical, "Historian"
End If
Collector Object
The Collector object contains the configuration and status information for a single collector connected to the Historian Server.
Collectors Object
The Collectors Object provides access to the Historian Collector configuration information and performance statistics. It also provides functionality to add, delete, and modify Historian Collectors.
Data Objects
- Data Object
- The Data object provides access to Historian data and provides functionality to add, delete, and modify data samples in the Historian archives.
- DataComments Object
- The DataComments object contains a collection of comments attached to a specific DataValue record.
- DataCriteria Object
- The DataCriteria object sets the criteria for the retrieval of DataValue records into a DataRecordset Object. For example, you may want values between a certain start and end time.
- DataFields Object
- The DataFields object identifies which DataValue fields a DataRecordset query retrieves. For example, you may not want to retrieve comments with your data.
- DataRecordset Object
- The RecordSet contains a collection of DataValue records. Use the DataRecordset object to add, delete, or modify data samples.
- DataValue Object
- TheDataValue object contains data for a single tag and timestamp. It also contains a data quality and one or more comments attached to the specific data value. You can modify the Value, DataQuality, and Comments properties and commit them to the Historian server by using the WriteRecordset Method of the DataRecordsetObject. You cannot modify the timestamp.
Message Objects
- Message Object
- The Message object provides access to a single message retrieved from the Historian server.
- MessageCriteria Object
- The MessageCriteria object sets the criteria for retrieval of message records into a MessageRecordset object.
- MessageFields Object
- The MessageFields object identifies which message fields the MessageRecordset query retrieves.
- MessageRecordset Object
- The MessageRecordset contains a collection of messages from the Historian Server. Use the Mes- sageRecordset Object to add and retrieve messages. To add new messages, create a MessageRecordset, add the appropriate messages, and then perform the WriteRecordset operation to store the changes in the Historian archives.
- Messages Object
- The Messages object contains Historian messages and provides functionality for adding new messages to the Historian Server. For example, you may want only alerts or you may want messages associated with a certain user.
OPC Objects
- OPCBrowse Object
- The OPCBrowse object allows you to retrieve hierarchical areas from OPC AE servers.
- OPCFilters Object
- Returns whether Auto-Reconnect logic is Enabled/Disabled.
- Option Object
- This object acts a simple container for providing a name and values for a named parameter. The possible option values are found in Options.bas.
Server Objects
- Server Object
- Use the Server object to establish and maintain a connection to a specific Historian server. All other configuration and data access objects are subordinate to the Server object.
- ServerManager Object
- The ServerManager object permits you to browse the available servers registered on the client. The ServerManager object also provides functionality for adding new server connections and for setting the default login information.
Tag Objects
- Tag Object
- The Tag object contains configuration information for a single tag. You can modify properties of the Tag object and save them to the Historian server by using the WriteRecordset method of the TagRecordset object.
- TagCriteria Object
- The TagCriteria object sets the criteria for retrieval of Tag records into a TagRecordset object.
- TagDependencies Object
- TheTagDependencies object represents a list of Historian Tags which trigger a given calculation when their values change.
- TagFields Object
- TheTagFields object identifies which tag fields are retrieved in a TagRecordset query.
- TagRecordset Object
- The TagRecordset object is a collection of tag records that contain tag configuration information.
- Tags Object
- TheTags object contains Historian tag configuration information and provides functionality for adding, deleting, and modifying this configuration.
UserCalcFunction Object
The UserCalcFunction object contains the definition of a user function that can be stored in the Calculation library.
Property Reference A-B
The following list contains the Historian properties that are available in the Historian Software Development Kit in the alphabetical order.
A
- ActualDataStores Property (Server Object)
-
Returns the actual data stores currently configured on the Historian Server.
Syntax
object.ActualDataStores
Parameters
None
Remarks
ActualDataStores is a read-only property of type Long.
- ActualTags Property (Server Object)
-
Returns the number of tags currently configured on the Server. This number is less than or equal to the number of licensed tags.
Syntax
object.ActualTags
Parameters
None
Remarks
ActualTags is a read-only property of type Long.
- ActualUsers Property (Server Object)
-
Returns the number of users currently connected to the Server. This number is less than or equal to the number of licensed users.
Syntax
object.ActualUsers
Parameters
None
Remarks
ActualUsers is a read-only property of type Long.
- AdministratorSecurityGroup Property (Tag Object)
-
Returns or sets the name of the security group controlling configuration changes for the Tag. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.AdministratorSecurityGroup[ = String]
Parameters
None
- AdministratorSecurityGroup Property (TagCriteria Object)
-
Sets the administrator security group for which the TagRecordset query searches.
Syntax
object.AdministratorSecurityGroup[ = String]
Parameters
None
- AdministratorSecurityGroup Property (TagFields Object)
-
Determines whether the TagRecordset query returns the AdministratorSecurityGroup field.
Parameters
object.AdministratorSecurityGroup[ = Boolean]
Parameters
None
- AdministratorSecurityGroup Property (UserDefinedType Object)
-
Returns or sets the name of the Administrator Security Group that controls the definition of a User Defined Type. You can create, modify or delete types if you have Administration Security Group permission to do so. If there is no assigned group then the name will be empty.
Syntax
object.MyAdministratorSecurityGroup
Parameters
None
Returns
String
- AdministratorSecurityGroupSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.AdministratorSecurityGroupSet[ = Boolean]
Parameters
None
- AdministratorSecurityGroupUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.AdministratorSecurityGroupUpdated[ = Boolean]
Parameters
None
- Alarms Property (Server Object)
-
Returns the Alarms object for the current server. Use the Alarms object to query Alarms and Events data of the server.
Syntax
object.Alarms
Parameters
None
Remarks
Alarms is a read-only property of type Alarms.
- AllAlerts Property (MessageCriteria Object)
-
Causes the MessageRecordset query to include all alert topic messages.
Syntax
object.AllAlerts[ = Boolean]
Parameters
None.
Example
MyMessages.Criteria.AllAlerts = True
- AllMessages Property (MessageCriteria Object)
-
Specifies that all message topic messages (non-alerts) should be returned by the MessageRecordset query.
Syntax
object.AllMessages[ = Boolean]
Parameters
None
Example
MyMessages.Criteria.AllMessages = True
- ArchiveAbsoluteDeadband Property (Tag Object)
-
Returns or sets the Absolute Deadband value for this tag to be used in the Archiver.
Syntax
object.ArchiveAbsoluteDeadband[ = Double]
Parameters
None
- ArchiveAbsoluteDeadband Property (TagCriteria Object)
-
Sets the ArchiveAbsoluteDeadband to search for in the TagRecordset query.
Syntax
object.ArchiveAbsoluteDeadband[ = Double]
Parameters
None
- ArchiveAbsoluteDeadband Property (TagFields Object)
-
Determines whether the ArchiveAbsoluteDeadband field should be returned in the TagRecordset query.
Syntax
object.ArchiveAbsoluteDeadband[ = Boolean]
Parameters
None
- ArchiveAbsoluteDeadbandSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.ArchiveAbsoluteDeadbandSet[ = Boolean]
Parameters
None
- ArchiveAbsoluteDeadbandUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.ArchiveAbsoluteDeadbandUpdatedSet[ = Boolean]
Parameters
None
- ArchiveAbsoluteDeadbanding Property (Tag Object)
-
Returns or sets whether this tag is using Absolute Deadbanding in the Archiver or not.
Syntax
object.ArchiveAbsoluteDeadbandingSet[ = Boolean]
Parameters
None
- ArchiveAbsoluteDeadbanding Property (TagCriteria Object)
-
Sets the ArchiveAbsoluteDeadbanding to search for in the TagRecordset query.
Syntax
object.ArchiveAbsoluteDeadbandingSet[ = Boolean]
Parameters
None
- ArchiveAbsoluteDeadbandSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.ArchiveAbsoluteDeadbandsetSet[ = Boolean]
Parameters
None
- ArchiveAbsoluteDeadbandUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.ArchiveAbsoluteDeadbandupdated[ = Boolean]
Parameters
None
- ArchiveAbsoluteDeadbanding Property (Tag Object)
-
Returns or sets whether this tag is using Absolute Deadbanding in the Archiver or not.
Syntax
object.ArchiveAbsoluteDeadbanding[ = Boolean]
Parameters
None
- ArchiveAbsoluteDeadbanding Property (TagCriteria Object)
-
Sets the ArchiveAbsoluteDeadbanding to search for in the TagRecordset query.
Syntax
object.ArchiveAbsoluteDeadbanding[ = Boolean]
Parameters
None
- ArchiveAbsoluteDeadbanding Property (TagFields Object)
-
Determines whether the ArchiveAbsoluteDeadbanding field should be returned in the TagRecordset query.
Syntax
object.ArchiveAbsoluteDeadbanding[ = Boolean]
Parameters
None
- ArchiveAbsoluteDeadbandingSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.ArchiveAbsoluteDeadbandingSet[ = Boolean]
Parameters
None
- ArchiveAbsoluteDeadbandingUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.ArchiveAbsoluteDeadbandingUpdated[ = Boolean]
Parameters
None
- ArchiveAllowDataOverwrites Property (Archives Object)
-
Returns whether or not a Data Archiver should allow overwriting of an existing data.
- ArchiveBaseFileName Property (Archives Object)
-
Returns a default string that an archive file names must be based on.
- ArchiveCompression Property (Tag Object)
-
Returns or sets the archive compression for the Tag. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.ArchiveCompression[ = Boolean]
Parameters
None
- ArchiveCompression Property (TagCriteria Object)
-
Sets the archive compression value for which the TagRecordset query searches.
Syntax
object.ArchiveCompression[ = Byte]
Parameters
None
- ArchiveCompression Property (TagFields Object)
-
Determines whether the TagRecordset query returns the ArchiveCompression field.
Syntax
object.ArchiveCompression[ = Boolean]
Parameters
None
- ArchiveCompressionSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.ArchiveCompressionSet[ = Boolean]
Parameters
None
- ArchiveCompressionTimeout Property (Tag Object)
-
Gets or sets the value of the Archive Compression Timeout. This is the amount of time after which a value will be written to the archive regardless of compression.
Syntax
object.ArchiveCompressionTimeout[ = Long]
Parameters
None
- ArchiveCompressionTimeout Property (TagCriteria Object)
-
Sets the Archive Compression Timeout value to search for in the TagRecordset query.
Syntax
object.ArchiveCompressionTimeout[ = Long]
Parameters
None
- ArchiveCompressionTimeout Property (TagFields Object)
-
Determines whether the TagRecordset query returns the ArchiveCompressionTimeout field.
Syntax
object.ArchiveCompressionTimeout[ = Boolean]
Parameters
None
- ArchiveCompressionTimeoutSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.ArchiveCompressionTimeoutSet[ = Boolean]
Parameters
None
- ArchiveCompressionTimeoutUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.ArchiveCompressionTimeoutUpdated[ = Boolean]
Parameters
None
- ArchiveCompressionUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.ArchiveCompressionUpdated[ = Boolean]
Parameters
None
- ArchiveCreateOfflineArchives Property (Archives Object)
-
Returns whether a Data Archiver should accept data before starting an old archive.
- ArchiveDeadbandPercentRange Property (Tag Object)
-
Returns or sets the deadband in percent of engineering unit range for archive compression for the Tag. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.ArchiveDeadbandPercentRange[ = Single]
Parameters
None
- ArchiveDeadbandPercentRange Property (TagCriteria Object)
-
Sets the archive compression deadband for which the TagRecordset query searches.
Syntax
object.ArchiveDeadbandPercentRange[ = Single]
Parameters
None
- ArchiveDeadbandPercentRange Property (TagFields Object)
-
Determines whether the TagRecordset query returns the ArchiveDeadbandPercentRange field.
Syntax
object.ArchiveDeadbandPercentRange[ = Boolean]
Parameters
None
- ArchiveDeadbandPercentRangeSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.ArchiveDeadbandPercentRangeSet[ = Boolean]
Parameters
None
- ArchiveDeadbandPercentRangeUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.ArchiveDeadbandPercentRangeUpdated[ = Boolean]
Parameters
None
- ArchiveMaxMemoryBufferSize Property (Archives Object)
-
Returns memory size of Data Archiver queues.
- ArchiveUseClientLoginUser Property (Archives Object)
-
Returns whether a Data Archiver requires users to enter a user name and password details in the client application.
Remarks
Set to FALSE to require a username and password.
- ArchiverClustered Property (Server Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.ArchiverClustered
Parameters
None
Remarks
ArchiverClustered is a read-only property of type Boolean.
- ArchiverDemoMode Property (Server Object)
-
Returns whether the server is currently running in demo-license mode. Demo mode is restricted to 100 tags and a single user connection.
Syntax
object.ArchiverDemoMode
Parameters
None
Remarks
ArchiverDemoMode is a read-only property of type Boolean.
- Archives Property (Server Object)
-
Returns the Archives Object for the current server. The Archives Property does not return the Archives Object unless the authenticated user is a member of the Historian archive Administrators group.
Syntax
object.Archives
Parameters
None
Remarks
Archives is a read-only property of type Archives.
ExampleDim MyServer As New iHistorian_SDK.Server Dim MyArchives As iHistorian_SDK.Archives ' Connect to the local server If Not MyServer.Connect("", "", "") Then err.Raise 1, , "Failed to connect to the local server" End If ' We are connected, try to instantiate the Archives object Set MyArchives = MyServer.Archives If MyArchives Is Nothing Then err.Raise 1, , "User is not able to manage archives" End If
- Archiving Property (Archives Object)
-
Returns the Archiving status of the current archive.
Syntax
object.Archiving[ = Boolean]
Parameters
None
- ArchivingOptions Property (Archives Object)
-
Exposes the ArchivingOptions collection to control the behavior of the Historian Archiver.
Table 1. Archiving Options Option Description ArchiveSizeIncrement Sets the size increments of the archive file (Default=100MB). This option is specific to a data store. ArchiveDefaultPath Specifies the default path that the archives are created in. This option is specific to a data store. ArchiveActiveHours Specifies the hours before now that the data becomes Read-Only. This option is specific to data store. ArchiveDefaultSize Specifies the create archive default size in MB. This option is specific to a data store. ArchiveAutomaticCreate Specifies whether the system automatically creates archives when all empty archives are filled. This option is specific to a data store. ArchiveAutomaticFreeSpace The amount of free space required on the drive of the default path after creating an archive of default size. This option is specific to a data store. ArchiveOverwriteOld Determines whether or not old archives are cleared and re-used when no other empty space is available. This option is specific to a data store. ArchiveBackupPath Specifies the default path for backup archives. This option is specific to a data store. ArchiveBaseName Specifies the default string archive names should be based on. This option is specific only to a data store. ArchiveBaseFileName Returns a default string that an archive file names must be based on. This option is specific to a data store. ArchiveCreateOfflineArchives Returns whether a Data Archiver should accept data before starting an old archive. This option is specific to a data store. ArchiveUseClientLoginUser Returns whether a Data Archiver requires users to enter a user name and password details in the client application. This option is specific to a data store. ArchiveAllowDataOverwrites Returns whether or not a Data Archiver should allow overwriting of an existing data. This option is specific to a data store. ArchiveDuration Number of Units of time an archive can hold. Defined by ArchiveDurationType. This option is specific to a data store. ArchiveTotalDuration Number of Hours that the archives for a DataStore can span. (This is only meaningful for ScadaBuffer DataStores) This option is specific to a data store. ArchiveDurationType The type of archive duration. - ArchiveDurationBySize
- ArchiveDurationDaily
- ArchiveDurationHourly
ArchiveUseCaching Indicates whether the archive should use caching or not. Set it to 1 to use caching and to 0 if you do not want to use caching. This option is specific to a data store. ArchiveCacheSize This is for internal use. ArchiverServerMemoryLoad How much server memory the Historian Data Archive is consuming. This option is specific to the data archiver. ArchiverEquipmentDelimiter This is for internal use. ArchiverServerMemoryLoad How much server memory the Historian Data Archive is consuming. This option is specific to the data archiver. ArchiverEquipmentDelimiter This is for internal use. MessageOnDataUpdate How much server memory the Historian Data Archive is consuming. This option is specific to the data archiver. ArchiveMaxMemoryBufferSize The maximum buffer memory (MB). This option is specific to the data archiver. ArchiverTargetPrivateBytes The memory size of the archiver. If it is 0, it means that it is managed by server. Otherwise, enter a number in megabytes of memory. This option is specific to the data archiver. CollectorIdleTime The number of seconds before a collector is considered idle. If this number is set to 270 seconds and no data for any tags is received for 270 seconds then the collector is considered idle. This option is specific to the data archiver. MaximumQueryIntervals Specifies the maximum number of samples per tag that Historian can return from a non-raw data query. Use this setting to throttle query results for non-raw data queries. This setting does not apply to filtered data queries or raw data queries. This option is specific to the data archiver. MaximumQueryTime Specifies the maximum time that a data or message query can take before it is terminated. Use this setting to limit query time and provide balanced read access to the archiver. This applies to all query types. This option is specific to the data archiver. Syntax
object.ArchivingOptions(OptionName) [ = Variant]
Parameters
Name OptionName Data type String Description The name of an archiving option.
ExampleMyServer.DataStores.DataStoreUpdate("MYDATASTORE", True, "", "") Then maintain auto recovery files MyServer.MaintainAutoRecoveryFiles =TRUE
- AreaCount Property (OPCBrowse Object)
-
Returns the number of Areas under a browse position. When a browse operation occurs, the server returns all areas and sources under the BrowsePosition. AreaCount gives you the number of Areas, which you can use to iterate the AreaNames and FullAreaNames arrays.
Syntax
object.AreaCount
Parameters
None
Remarks
AreaCount is a read-only property returned as type Long.
- AreaNames Property (OPCBrowse Object)
-
Returns an area name for an AE server. See FullAreanames property for details.
Syntax
object.AreaNames(Index)
Parameters
Index. Integer. The index into the area nae array
Remarks
AreaNames is a read-only String property returned as a variant for script compatibility.
- Areas Property (OPCFilters Object)
-
Returns a list of the Areas selected for collection. This list is only applied when isAreaFiltering (true) has been called.
Syntax
object.Areas
Parameters
None
- AuditMessage Property (Server Object)
-
Returns or sets the E-signature audit message. Setting the audit message to an empty string will use the system default message.
Syntax
object.AuditMessage[ = String]
Parameters
None
- AutoReconnectRateSeconds Property (OPCFilters Object)
-
If AutoReconnect logic is enabled (isAutoReconnectOn(true)) this property represents the rate in seconds that the Alarm Collector with attempt to determine if the server is still alive.
Syntax
object.AutoReconnectRateSeconds[ = Long]
Parameters
None
B
- BrowsePosition Property (OPCBrowse Object)
-
Returns the current value of the browse position in the hierarchy.
Syntax
object.BrowsePosition[ = Variant]
Parameters
None
Remarks
This is used for subsequent browse calls to get the leaf under the current position.
- BrowseRoot Property (OPCBrowse Object)
-
Returns the root name of the OPC area hierarchy.
Syntax
object.BrowseRoot
Parameters
None
Remarks
BrowseRoot is a read-only property of type String.
Property Reference C-D
- CalcType Property (Tag Object)
Returns or sets the CalcType for the tag. The CalcType is used to determine whether the tag is a Python Expression tag or a Raw tag.
SyntaxName Description Value RawTag A tag is not a Python Expression Tag 0 PythonExprTag A tag that uses a Python Expression to transform raw data into derived values. 2 object.CalcType [=ihTagCalcType]
Parameters
None
- CalcType Property (TagCriteria Object)
Returns or sets the CalcType for the tag. The CalcType is used to determine whether the tag is a Python Expression tag or a Raw tag.
SyntaxName Description Value RawTag A tag is not a Python Expression Tag 0 PythonExprTag A tag that uses a Python Expression to transform raw data into derived values. 2 object.CalcType [=ihTagCalcType]
Parameters
None
- CalcType Property (TagFields Object)
-
Determines whether the CalcType field should be returned in the TagRecordset query.
Syntax
object.CalcType [ = Boolean]
Parameters
None
- CalcTypeList Property (Tags Object)
-
Returns a list of valid calculation types available on a tag in Historian.
Syntax
object.CalcType
Parameters
None
- CalcTypeSet Property (TagCriteria Object)
-
A flag to indicate whether or not the CalcType property has been set or not.
Syntax
object.
CalcTypeSet [ = Boolean]Parameters
None
- CalcTypeUpdated Property (Tag Object)
-
A flag to indicate whether or not the CalcType property has been set.
Syntax
object.
CalcTypeUpdated [ = Boolean]Parameters
None
- Calculation Property (Tag Object)
-
Returns or sets the calculation for the Tag. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.
Calculation[ = String]Parameters
None
- Calculation Property (TagCriteria Object)
-
Sets the calculation to search for in the TagRecordset query.
Syntax
object.
Calculation[ = String]Parameters
None
- Calculation Property (TagFields Object)
-
Determines whether the TagRecordset query returns the Calculation field.
Syntax
object.
Calculation[ = Boolean]Parameters
None
- CalculationDependencies Property (Tag Object)
-
Returns a collection of tagnames that the calculation is dependent upon. Use the CalculationDependencies property with unsolicited tags only.
Syntax
object.
CalculationDependenciesParameters
None
Remarks
CalculationDependencies is a read-only property of type TagDependencies.
- CalculationDependencies Property (TagFields Object)
-
Determines whether the CalculationDependencies field should be returned in the TagRecordset query.
Syntax
object.
CalculationDependencies[ = Boolean]Parameters
None
- CalculationDependenciesUpdated Property (Tag Object)
-
Returns whether or not the Calculation Dependencies have been updated. & Boolean true if the dependencies have been updated, false otherwise.
Syntax
object.
CalculationDependenciesUpdatedParameters
None
- CalculationExecutionTime Property (Tag Object)
-
Returns the average time, in milliseconds, it takes to execute a calculation formula for the tag.
Syntax
object.CalculationExecutionTime
Parameters
None
Remarks
CalculationExecutionTime is a read-only property of type Long.
- CalculationExecutionTime Property (TagFields Object)
-
Determines whether the CalculationExecutionTime field should be returned in the TagRecordset query.
Syntax
object.
CalculationExecutionTime[ = Boolean]Parameters
None
- CalculationMode Property (DataCriteria Object)
-
Returns or sets the type of calculation to perform on archive data retrieved in the DataRecordset query. CalculationMode only applies to a Calculated SamplingMode.
The table below defines the available Calculation Modes:
Name Description Value Average Retrieves the time-weighted average for each calculation interval. 1 StandardDeviation Retrieves the time-weighted standard deviation for each calculation interval. 2 Total Retrieves the time- weighted rate total for each calculation interval. A rate total would be appropriate for totalizing a continuous measurement. Time weighting is necessary due to the fact that compressed data is not evenly spaced in time. A factor must be applied to the totalized value to convert into the appropriate engineering units. Given the fact that this is a rate total, a base rate of Units/Day is assumed. If the actual units of the continuous measurement were Units/Minute, it would be necessary to multiply the results by 1440 Minutes / Day to convert the totalized number into the appropriate engineering units.
3 Minimum Retrieves the minimum value for each calculation interval. 4 Maximum Retrieves the maximum value for each calculation interval. 5 Count Retrieves the count of archive values found within each calculation interval. 6 RawAverage Retrieves the arithmetic average of archive values for each calculation interval. 7 RawStandardDeviation Retrieves the arithmetic standard deviation of archive values for each calculation interval. 8 RawTotal Retrieves the arithmetic total of archive values for each calculation interval. 9 MinimumTime Retrieves the timestamp of the minimum value found within each calculation interval. It may be a raw or an interpolated value. The minimum must be a good data quality sample. 10 MaximumTime Retrieves the timestamp of the maximum value found within each calculation interval. It may be a raw or an interpolated value. The maximum must be a good data quality sample. 11 TimeGood Retrieves the amount of time (in milliseconds) during the interval when the data is of good quality and the filter condition is met. 12 StateCount Retrieves the amount of time a tag has transitioned to another state from a previous state during a time interval. 13 OPCAnd Retrieves the OROPCQAND, bit-wise AND operation of all the 16-bit OPC qualities of the raw samples stored in the specified interval. 16 OPCOr Retrieves the OPCQOR, bit-wise OR operation of all the 16-bit OPC qualities of the raw samples stored in the specified interval. 16 Syntax
object.CalculationMode[ = iHistorian_SDK.ihCalculationMode]
Parameters
None
- CalculationModeList Property (Data Object)
-
This function returns a list of the available Calculation modes for a data request.
Syntax
object.CalculationModeList
Parameters
None
- CalculationModeSet Property (DataCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CalculationModeSet[ = Boolean]
Parameters
None
- CalculationSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CalculationSet[ = Boolean]
Parameters
None
- CalculationUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CalculationUpdated[ = Boolean]
Parameters
None
- CanAdministerConfiguration Property (Archives Object)
-
Returns whether the current user is authorized to perform configuration changes to Archives or Archiving options.
Syntax
object.CanAdministerConfiguration
Parameters
None
Remarks
CanAdministerConfiguration is a read-only property of type Boolean.
Example
' Check Security If Not MyServer.Archives.CanAdministerConfiguration Then err.Raise 1, "Security", "You Are Not Authorized To Make Configuration Changes" End If
- CanAdministerConfiguration Property (Collectors Object)
-
Returns whether the current user is authorized to perform configuration changes to Collectors.
Syntax
object.CanAdministerConfiguration
Parameters
None
Remarks
CanAdministerConfiguration is a read-only property of type Boolean.
Example
' Check Security If Not MyServer.Archives.CanAdministerConfiguration Then err.Raise 1, "Security", "You Are Not Authorized To Make Configuration Changes" End If
- CanAdministerSecurity Property (Server Object)
-
Returns whether the current user is authorized to perform tag security changes.
Syntax
object.CanAdministerSecurity
Parameters
None
Remarks
CanAdministerSecurity is a read-only property of type Boolean.
Example
Dim MyServer As New iHistorian_SDK.Server ' Connect to the local server If Not MyServer.Connect("", "", "") Then err.Raise 1, , "Failed to connect to local server" End If If Not MyServer.Tags.CanAdministerConfiguration Then err.Raise 1, , "Cannot administer security" End If
- CanAdministerSecurity Property (Tags Object)
-
Returns whether the current user is authorized to security configuration changes.
Syntax
object.CanAdministerSecurity
Parameters
None
Remarks
CanAdministerSecurity is a read-only property of type Boolean.
- CanAudit Property (Server Object)
-
Returns whether E-signatures are enabled on the hardware key.
Syntax
object.CanAudit
Parameters
None
Remarks
CanAudit is a read-only property of type Boolean.
- CanCalculate Property (Server Object)
-
Returns whether the Calculation collector is enabled on the hardware key.
Syntax
object.CanCalculate
Parameters
None
Remarks
CanCalute is a read-only property of type Boolean.
- CanRead Property (Data Object)
-
Returns whether the current user is authorized to read data from the server.
Syntax
object.CanRead
Parameters
None
Remarks
CanRead is a read-only property of type Boolean.
Example
' Check Security If Not MyData.CanRead Then err.Raise 1, , "You are not authorized to read data from this server" End If
- CanRead Property (Messages Object)
-
Returns whether the current user is authorized to read messages from the server.
Syntax
object.CanRead
Parameters
None
Remarks
CanRead is a read-only property of type Boolean.
Example
' Check Security If Not MyData.CanRead Then err.Raise 1, , "You are not authorized to read messages from this server" End If
- CanReplicate Property (Server Object)
-
Returns whether ServerToServer collector is enabled on the hardware key.
Syntax
object.CanRelpicate
Parameters
None
Remarks
CanReplicate is a read-only property of type Boolean.
- CanSupportRedundantCollectors Property (Server Object)
-
Returns whether Collector Redundancy is enabled on the hardware key.
Syntax
object.CanSupportRedundantCollectors
Parameters
None
Remarks
CanSupportRedundantCollectors is a read-only property of type Boolean.
- CanWrite Property (Data Object)
-
Returns whether the current user is authorized to write data to the server.
Syntax
object.CanWrite
Parameters
None
Remarks
CanWrite is a read-only property of type Boolean.
Example
' Check Security If Not MyData.CanWrite Then err.Raise 1, , "You are not authorized to write data to this server" End If
- CanWrite Property (Messages Object)
-
Returns whether the current user is authorized to write messages to the Server.
Syntax
object.CanWrite
Parameters
None
Remarks
CanWrite is a read-only property of type Boolean.
Example
' Check Security If Not MyMessages.CanWrite Then err.Raise 1, , "You are not authorized to write data to this server" End If
- CollectionDisabled Property (Tag Object)
-
Gets or sets whether the collection status of this tag.
Syntax
object.CollectionDisabled[ = Boolean]
Parameters
None
- CollectionDisabled Property (TagFields Object)
-
Determines whether the CollectionDisabled field should be returned in the TagRecordset query.
Syntax
object.CollectionDisabled[ = Boolean]
Parameters
None
- CollectionDisabledUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectionDisabledUpdated[ = Boolean]
Parameters
None
- CollectionInterval Property (Tag Object)
-
Returns or sets the collection interval (in milliseconds) for a Tag. For polled collection, the interval schedules evenly spaced samples of the data from the data source. For unsolicited collection, the collection interval establishes the MINIMUM time allowed in between reports of unsolicited values from the data source. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.CollectionInterval[ = Long]
Parameters
None
- CollectionInterval Property (TagCriteria Object)
-
Sets the collection interval to search for in the TagRecordset Query.
Syntax
object.CollectionInterval[ = Long]
Parameters
None
- CollectionInterval Property (TagFields Object)
-
Determines whether the TagRecordset query returns the CollectionInterval field.
Syntax
object.CollectionInterval[ = Boolean]
Parameters
None
- CollectionIntervalSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectionIntervalSet[ = Boolean]
Parameters
None
- CollectionIntervalUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectionIntervalUpdated[ = Boolean]
Parameters
None
- CollectionOffset Property (Tag Object)
-
Returns or sets the collection offset (in milliseconds) for a tag. The collection offset only applies to polled type collection as used to schedule sampling of data at a specific time of day. The collection offset is applied from midnight to determine the time of the first sample. The collection interval is then used to schedule subsequent samples.
For example, with a collection interval of 60,000ms and a collection offset of 30,000ms, data would be collected one per minute on the half minute. To collect data once per day at a specific time, the collection interval should be set to one day, 1440 * 60 * 1000 = 86,400,000ms, and the collection offset should be set to the time in milliseconds from midnight (for example, 6am = 6 * 3600 * 1000 = 21,600,000 ms).
Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
[ = Long]object.CollectionOffset
Parameters
None
- CollectionOffset Property (TagCriteria Object)
-
Sets the collection offset to search for in the TagRecordset query.
Syntax
object.CollectionOffset[ = Long]
Parameters
None
- CollectionOffset Property (TagFields Object)
-
Sets Determines whether the TagRecordset query returns the CollectionOffset field.
Syntax
object.CollectionOffset[ = Boolean]
Parameters
None
- CollectionOffsetSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectionOffset[ = Boolean]
Parameters
None
- CollectionOffsetUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectionOffsetupdated[ = Boolean]
Parameters
None
- CollectionType Property (Tag Object)
-
Returns or sets the type of collection used to acquire data for the Tag. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
The following table lists the available types of collection:Name Description Value Unsolicited New values are reported by the source. 1 Polled New values are polled from the source. 2 Syntax
object.CollectionType[ = ihCollectionType]
Parameters
None
- CollectionType Property (TagCriteria Object)
-
Sets the collection type to search for in the TagRecordset query.
Syntax
object.CollectionType[ = ihCollectionType]
Parameters
None
- CollectionType Property (TagFields Object)
-
Determines whether the TagRecordset query returns the CollectionType field.
Syntax
object.CollectionType[ = Boolean]
Parameters
None
- CollectionTypeList Property (Tags Object)
-
Returns a list of the valid Collection types available in Historian.
Syntax
object.CollectionTypeList
Parameters
None
- CollectionTypeSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectionTypeSet[ = Boolean]
Parameters
None
- CollectionTypeUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectionTypeUpdated[ = Boolean]
Parameters
None
- CollectorCompression Property (Tag Object)
-
Returns or sets whether collector compression is enabled for the Tag. Specify the deadband in the CollectorDeadbandPercentRange property.
Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.CollectorCompression[ = Boolean]
Parameters
None
- CollectorCompression Property (TagCriteria Object)
-
Sets the collector compression status to search for in the TagRecordset query.
Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.CollectorCompression[ = Boolean]
Parameters
None
- CollectorCompression Property (TagFields Object)
-
Determines whether the TagRecordset query returns the CollectorCompression field.
Syntax
object.CollectorCompression[ = Boolean]
Parameters
None
- CollectorCompressionSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectorCompressionSet[ = Boolean]
Parameters
None
- CollectorCompressionTimeout Property (Tag Object)
-
Gets or sets the value of the Collector Compression Timeout. This is the amount of time after which a value will be sent to the Archiver regardless of compression.
Syntax
object.CollectorCompressionTimeout[ = Long]
Parameters
None
- CollectorCompressionTimeout Property (TagCriteria Object)
-
Sets the Collector Compression Timeout value to search for in the TagRecordset query.
Syntax
object.CollectorCompressionTimeout[ = Long]
Parameters
None
- CollectorCompressionTimeout Property (TagFields Object)
-
Determines whether the TagRecordset query returns the CollectorCompressionTimeout field.
Syntax
object.CollectorCompressionTimeout[ = Boolean]
Parameters
None
- CollectorCompressionTimeoutSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectorCompressionTimeoutSet[ = Boolean]
Parameters
None
- CollectorCompressionTimeoutUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectorCompressionTimeoutUpdated[ = Boolean]
Parameters
None
- CollectorCompressionUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectorCompressionTimeoutUpdated[ = Boolean]
Parameters
None
- CollectorCompressionUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectorCompressionTimeoutUpdated[ = Boolean]
Parameters
None
- CollectorConditionEventList Property (OPCFilters Object)
-
Returns a list of the Condition Event Categories available for filtering on the Alarm Collector.
Syntax
object.CollectorConditionEventList
Parameters
None
- CollectorDeadbandPercentRange Property (Tag Object)
-
Returns or sets the deadband in percent of engineering unit range for collector compression for the Tag. You must enable CollectorCompression before setting the CollectorDeadbandPercentRange.
Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.CollectorDeadbandPercentRange[ = Single]
Parameters
None
- CollectorDeadbandPercentRange Property (TagCriteria Object)
-
Sets the collector compression deadband to search for in the TagRecordset query.
Syntax
object.CollectorDeadbandPercentRange[ = Single]
Parameters
None
- CollectorDeadbandPercentRange Property (TagFields Object)
-
Determines whether the TagRecordset query returns the CollectorDeadbandPercentRange field.
Syntax
object.CollectorDeadbandPercentRange[ = Boolean]
Parameters
None
- CollectorDeadbandPercentRangeSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectorDeadbandPercentRangeSet[ = Boolean]
Parameters
None
- CollectorDeadbandPercentRangeUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectorDeadbandPercentRangeUpdated[ = Boolean]
Parameters
None
- CollectorGeneral1 Property (Tag Object)
-
Returns or sets the general1 (or spare) configuration field for the tag. Changes to tag properties are not committed until the WriteRecordset method of the TagRecordset object is called.
Syntax
object.CollectorGeneral1[ = String]
Parameters
None
Example
MyTag.CollectorGeneral1 = "Model2:123"
- CollectorGeneral1 Property (TagCriteria Object)
-
Sets the general1 (spare) field value to search for in the TagRecordset query.
Syntax
object.CollectorGeneral1[ = String]
Parameters
None
Example
With MyRecordset.Criteria .TagName = "*.F_CV" .CollectorGeneral1 = "Model" End With
- CollectorGeneral1 Property (TagFields Object)
-
Determines whether the CollectorGeneral1 field should be returned in the TagRecordset query.
Syntax
object.CollectorGeneral1[ = Boolean]
Parameters
None
Example
With MyRecordset.Fields .Clear .TagName = True .Description = True .CollectorGeneral1 = True .CollectorGeneral2 = True .CollectorGeneral3 = True .CollectorGeneral4 = True .CollectorGeneral5 = True End With
- CollectorGeneral1Set Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectorGeneral1Set[ = Boolean]
Parameters
None
- CollectorGeneral1Updated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectorGeneral1Updated[ = Boolean]
Parameters
None
- CollectorGeneral2 Property (Tag Object)
-
Returns or sets the general2 (or spare) configuration field for the tag. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.CollectorGeneral2[ = String]
Parameters
None
- CollectorGeneral2 Property (Tagcriteria Object)
-
Sets the general2 (spare) field value to search for in the TagRecordset query.
Syntax
object.CollectorGeneral2[ = String]
Parameters
None
- CollectorGeneral2 Property (TagFields Object)
-
Determines whether the CollectorGeneral2 field should be returned in the TagRecordset query.
Syntax
object.CollectorGeneral2[ = Boolean]
Parameters
None
Example
With MyRecordset.Fields .Clear .TagName = True .Description = True .CollectorGeneral1 = True .CollectorGeneral2 = True .CollectorGeneral3 = True .CollectorGeneral4 = True .CollectorGeneral5 = True End With
- CollectorGeneral2Set Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectorGeneral2[ = Boolean]
Parameters
None
- CollectorGeneral2Updated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectorGeneral2Updated[ = Boolean]
Parameters
None
- CollectorGeneral3Updated Property (Tag Object)
-
Returns or sets the general3 (or spare) configuration field for the tag. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.CollectorGeneral3[ = String]
Parameters
None
- CollectorGeneral3 Property (TagCriteria Object)
-
Sets the general3 (spare) field value to search for in the TagRecordset query.
Syntax
object.CollectorGeneral3[ = String]
Parameters
None
- CollectorGeneral3 Property (TagFields Object)
-
Determines whether the CollectorGeneral3 field should be returned in the TagRecordset query.
Syntax
object.CollectorGeneral3[ = Boolean]
Parameters
None
Example
With MyRecordset.Fields .Clear .TagName = True .Description = True .CollectorGeneral1 = True .CollectorGeneral2 = True .CollectorGeneral3 = True .CollectorGeneral4 = True .CollectorGeneral5 = True End With
- CollectorGeneral3Set Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectorGeneral3Set[ = Boolean]
Parameters
None
- CollectorGeneral3Updated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectorGeneral3Updated[ = Boolean]
Parameters
None
- CollectorGeneral4 Property (Tag Object)
-
Returns or sets the general4 (or spare) configuration field for the tag. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.CollectorGeneral4[ = String]
Parameters
None
- CollectorGeneral4 Property (TagCriteria Object)
-
Sets the general4 (spare) field value to search for in the TagRecordset query.
Syntax
object.CollectorGeneral4[ = String]
Parameters
None
- CollectorGeneral4 Property (TagFields Object)
-
Determines whether the CollectorGeneral4 field should be returned in the TagRecordset query.
Syntax
object.CollectorGeneral4[ = Boolean]
Parameters
None
ExampleWith MyRecordset.Fields .Clear .TagName = True .Description = True .CollectorGeneral1 = True .CollectorGeneral2 = True .CollectorGeneral3 = True .CollectorGeneral4 = True .CollectorGeneral5 = True End With
- CollectorGeneral4Set Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectorGeneral4Set[ = Boolean]
Parameters
None
- CollectorGeneral4Updated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectorGeneral4Updated[ = Boolean]
Parameters
None
- CollectorGeneral5 Property (Tag Object)
-
Returns or sets the general5 (or spare) configuration field for the tag. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.CollectorGeneral5[ = String]
Parameters
None
- CollectorGeneral5 Property (TagCriteria Object)
-
Sets the general5 (spare) field value to search for in the TagRecordset query.
Syntax
object.CollectorGeneral5[ = String]
Parameters
None
- CollectorGeneral5 Property (TagFields Object)
-
Determines whether the CollectorGeneral5 field should be returned in the TagRecordset query.
Syntax
object.CollectorGeneral5[ = Boolean]
Parameters
None
- CollectorGeneral5Set Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectorGeneral5Set[ = Boolean]
Parameters
None
- CollectorName Property (Tag Object)
-
Returns or sets the name of the Collector responsible for collecting data for the Tag. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.CollectorName[ = String]
Parameters
None
- CollectorName Property (TagFields Object)
-
Determines whether the CollectorName field should be returned in the TagRecordset query.
Syntax
object.CollectorName[ = Boolean]
Parameters
None
- CollectorNameSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectorNameSet[ = Boolean]
Parameters
None
- CollectorNameUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectorNameUpdated[ = Boolean]
Parameters
None
- CollectorOptions Property (Collector Object)
Exposes the CollectorOptions collection to control the behavior of a specific collector.
The following table describes each of the options:
SyntaxTable 2. Options Option Capability CollectorCanBrowseSource TRUE if the collector supports browse. CollectorMaxMemoryBufferSize Specifies the size in megabytes of the memory buffer assigned to the store and forward function. Source Address Yes CollectorMaxDiskBufferSize Specifies the minimum free disk space that must be available on the computer and cannot be used for store and forward function. CollectorRateOutputAddress Specifies the address in the source database into which the collector will write the current value of the events per minute output. CollectorStatusOutputAddress Specifies the address in the source database into which the collector will write the current value of the collector status (running, stopped, unknown, etc.). CollectorAdjustForTimeDifference TRUE if you want to adjust collector timestamps to match the server clock. CollectorStartDelay A delay, in seconds, after collector startup before collection starts. CollectorSourceTimesLocal If you are using source timestamps, set this to TRUE if the source timestamps are in local time. CollectorMakeTagChangesOnline Set to TRUE if you want tag changes to take effect without restarting collector. object.CollectorOptions(OptionName) [ = Variant]
Parameters
OptionName - Variant - The name of a collection
- CollectorSimpleEventList Property (OPCFilters Object)
-
Returns a list of the Simple Event Categories available for filtering on the Alarm Collector.
Syntax
object.CollectorSimpleEventList
Parameters
None
- CollectorSupportsAreaFiltering Property (OPCFilters Object)
-
Returns whether or not Area Filtering is supported by the Alarm Collector. This can only be determined if the collector is connected to the Alarm Server.
Syntax
object.CollectorSupportsAreaFiltering
Parameters
None
- CollectorSupportsCategoryFiltering Property (OPCFilters Object)
-
Returns whether or not Category Filtering is supported by the Alarm Collector. This can only be determined if the collector is connected to the Alarm Server.
Syntax
object.CollectorSupportsCategoryFiltering
Parameters
None
- CollectorSupportsCategoryFiltering Property (OPCFilters Object)
-
Returns whether or not Category Filtering is supported by the Alarm Collector. This can only be determined if the collector is connected to the Alarm Server.
Syntax
object.CollectorSupportsCategoryFiltering
Parameters
None
- CollectorSupportsEventFiltering Property (OPCFilters Object)
-
Returns whether or not Event Filtering is supported by the Alarm Collector. This can only be determined if the collector is connected to the Alarm Server.
Syntax
object.CollectorSupportsEventFiltering
Parameters
None
- CollectorSupportsSeverityFiltering Property (OPCFilters Object)
-
Returns whether or not Severity Filtering is supported by the Alarm Collector. This can only be determined if the collector is connected to the Alarm Server.
Syntax
object.CollectorSupportsSeverityFiltering
Parameters
None
- CollectorSupportsSourceFiltering Property (OPCFilters Object)
-
Returns whether or not Source Filtering is supported by the Alarm Collector. This can only be determined if the collector is connected to the Alarm Server.
Syntax
object.CollectorSupportsSourceFiltering
Parameters
None
- CollectorTrackingEventList Property (OPCFilters Object)
-
Returns a list of the Tracking Event Categories available for filtering on the Alarm Collector.
Syntax
object.CollectorTrackingEventList
Parameters
None
- CollectorType Property (Collector Object)
-
Returns or sets Collector Type property for the Collector.
Syntax
object.CollectorType[ = String]
Parameters
None
Example' Print Out The CollectorType configured for the collector Debug.Print MyCollector.CollectorType
- CollectorType Property (Tag Object)
-
Returns or sets the type of Collector responsible for collecting data for the Tag. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.CollectorType[ = String]
Parameters
None
- CollectorType Property (TagCriteria Object)
-
Sets the collector type to search for in the TagRecordset query.
Syntax
object.CollectorType[ = String]
Parameters
None
- CollectorType Property (TagFields Object)
-
Determines whether the CollectorType field should be returned in the TagRecordset query.
Syntax
object.CollectorType[ = Boolean]
Parameters
None
- CollectorTypeList Property (Collectors Object)
-
Returns a list of Collector Types available. These types may be used in other SDK functions.
Syntax
object.CollectorTypeList
Parameters
None
Example
'Get a List of the Available Collector Types Dim ListArray As Variant Dim I As Integer ListArray = MyCollectors.CollectorTypeList For I = LBound(ListArray) To UBound(ListArray) Debug.Print "Historian has a " + ListArray(I, 2) + " collector" Next I
- CollectorTypeSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object..CollectorTypeSet[ = Boolean]
Parameters
None
- CollectorTypeUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CollectorTypeUpdated[ = Boolean]
Parameters
None
- Examples
-
Body text goes here.
Column Header Column Header Table text Table text Table text Press Tab to add rows. - CollectorVersion Property (Collector Object)
-
Returns the collector version. This version information is available for collectors of version 5.0 and later
Syntax
Object.CollectorVersion
Parameters
None
Sample CodePublic ConnectedServer As iHistorian_SDK.Server Dim MyCollector As iHistorian_SDK.Collector Dim CollectorName As String Dim ServerName As String Private Sub BTNGetVersion_Click() On Error GoTo errc If Not ConnectedServer Is Nothing Then ConnectedServer.Disconnect Set ConnectedServer = Nothing Set ConnectedServer = CreateObject("iHistorian_SDK.Server") Else Set ConnectedServer = CreateObject("iHistorian_SDK.Server") End If If Not ConnectedServer.Connect(ServerName, "", "") Then MsgBox "Connect To Server: " + ServerName + " Failed." Else Set MyCollector = ConnectedServer.Collectors.Item(CollectorName) If MyCollector.Running = True Then MsgBox "Collector version: " + MyCollector.CollectorVersion Else MsgBox "Collector version: Unknown" End If End If Exit Sub errc: MsgBox Err.Number End Sub
- Comment Property (Collector Object)
-
Returns or sets the Comment property for this collector.
Syntax
object.Comment[ = String]
Parameters
None
- Comment Property (DataComments Object)
-
Returns the comment associated with the DataValue.
Syntax
object.Comment
Parameters
None
Remarks
Comment is a read-only property of type Variant.
- Comment Property (Tag Object)
-
Returns or sets the comment associated with the Tag. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.Comment[ = String]
Parameters
None
- Comment Property (TagCriteria Object)
-
Sets the comment to search for in the TagRecordset query.
Syntax
object.Comment[ = String]
Parameters
None
- Comment Property (TagFields Object)
-
Determines whether the Comment field should be returned in the TagRecordset query.
Syntax
object.Comment[ = Boolean]
Parameters
None
- CommentSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CommentSet[ = Boolean]
Parameters
None
- CommentTimestamp Property (DataComments Object)
-
Returns the time that the comment was added to the archive.
Syntax
object.CommentTimestamp
Parameters
None
Remarks
CommentTimestamp is a read-only property of type Date.
Example
Debug.Print "Comment added at: " + _ Format$(MyValue.Comme
- CommentSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CommentSet[ = Boolean]
Parameters
None
- CommentUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.CommentUpdated[ = Boolean]
Parameters
None
- Comments Property (DataFields Object)
-
Determines whether the Comments field should be returned in the DataRecordset query.
Syntax
object.Comments[ = Boolean]
Parameters
None
- Comments Property (DataValue Object)
-
Returns the collection of comments that applies to the DataValue.
Syntax
object.Comments
Parameters
None
Remarks
Comments is a read-only property of type Collection.
- CommentsUpdated Property (DataValue Object)
-
This property is for internal use only.
Syntax
object.CommentsUpdated
Parameters
None
- ComputerName Property (Collector Object)
-
Returns or sets the name of the computer that the collector executes on.
Syntax
object.ComputerName[ = String]
Parameters
None
Remarks
ComputerName is a read-only property of type String.
- ConditionCollectionCompareValue Property
-
Returns or Contains compare value against the value of the triggertag.
Syntax
object.ConditionCollectionCompareValue [ = String]
Parameters
None
- ConditionCollectionCompareValue Property
-
Returns or Contains compare value against the value of the triggertag.
Syntax
object.ConditionCollectionCompareValue [ = String]
Parameters
None
- ConditionCollectionComparison Property
-
Contains the condition collection for a tag.
Syntax
object.ConditionCollectionComparison [ = Enum]
Parameters
None
- ConditionCollectionEnabled Property
-
Sets the condition collection for a tag.
Syntax
object.ConditionCollectionEnabled [ = Boolean]
Parameters
None
- ConditionCollectionMarkers Property
-
Returns or Sets if the end of the markers to be stored when the condition becomes FALSE. If FALSE, a bad data marker is not inserted when the condition becomes false.
Syntax
object.ConditionCollectionMarkers [ = Boolean]
Parameters
None
- ConditionCollectionTriggertag Property
-
Contains a trigger tag from the list of tags associated with the collector.
Syntax
object.ConditionCollectionTriggertag [ = String]
Parameters
None
- Connected Property (Server Object)
-
Returns the authentication status of the current server connection. True means you are connected to the server.
Syntax
object.Connected
Parameters
None
Remarks
Connected is a read-only property of type Boolean.
- ConnectionOptions Property (Server Object)
-
Returns the collection of options for the current connection. To set individual options refer to the following table.
TimeOption Converts timestamps to and from the local time zone String = Local Converts timestamps to and from the server time zone. String = Server Converts Timestamps To/From Explicit. The timezone is specified in the TimeZoneBias option. String = Explicit TimeZoneBias Converts timestamps to and from a specific offset from GMT (minutes) Long AdjustDayLightSavings Converts timestamps by adjusting for daylight savings Boolean Syntax
object.ConnectionOptions(OptionName) [ = Variant]
ParametersName Data Type Description OptionName Variant The name of a connection option None
Remarks
ConnectionOptions is a read-only property of type Collection of Options.
- Count Property (TagDependencies Object)
-
This function returns the current number of Dependent Tags configured.
Syntax
object.Count
Parameters
None
- Count Property (DataStores Object)
-
Gets the number of items in the collection.
Syntax
object.Count
Parameters
None
Remarks
Count is a read-only property of type Collection.
- Count Property (EnumeratedStates Object)
Returns the number of items in the EnumeratedStates collection.
Syntax
object.Count
Parameters
None
Remarks
Long- Criteria Property (DataRecordset Object)
Returns the Criteria object used to identify which DataValues the Historian server returns when a DataRecordset query is executed.
The following procedure describes the steps involved in specifying criteria of a DataRecordset Query.- Specify the sampling mode.A sampling mode must be set to determine how values are retrieved from the Historian archive. Depending on the sampling mode, you may also need to modify the Direction and NumberOfSamples. The following table lists the available Sampling Modes and their explanations.
Name Description Value CurrentValue Retrieves the current value. The time frame criteria are ignored. 1 Interpolated Retrieves evenly spaced interpolated values based on NumberOfSamples and the time frame criteria. 2 Trend Retrieves the raw minimum and raw maximum value for each specified interval. Use the Trend sampling mode to maximize performance when retrieving data points for plotting. A start time, end time, and an interval or number of samples must be specified. 3 RawByTime Retrieves raw archive values (compressed) based on time frame criteria. 4 RawByNumber Retrieves raw archive values (compressed) based on the StartTime criteria, the NumberOfSamples, and Direction criteria.
NOTE: The EndTime criteria is ignored for this Sampling mode.
5 Calculated Retrieves evenly spaced calculated values based on NumberOfSamples, the time frame criteria, and the CalculationMode criteria. 6 - Supply tags for query. You can specify tags in one of two ways:
- Supply a Tagmask that searches for all tags that match the mask and apply the remaining criteria to retrieve data. The mask can include wildcards.
- Supply an array of strings representing the list of tags to retrieve data for by using the Tags() property of the DataCriteria object.
- Supply time frame for query.
To supply a time frame for the query, set the StartTime and EndTime properties or set the StartTimeShortcut and EndTimeShortcut properties.
- Specify the Calculation Mode.
For the calculated SamplingMode, you must also specify the Calculation Mode.
The following table describes the available calculation modes.Table 3. Enumeration: ihCalculationMode Name Description Value Equal Filter condition is True, when the FilterTag is equal to the comparison value. 1 NotEqual Filter condition is True, when the FilterTag is NOT equal to the comparison value. 2 LessThan Filter condition is True, when the FilterTag is less than the comparison value. 3 GreaterThan Filter condition is True, when the FilterTag is greater than the comparison value. 4 LessThanEqual Filter condition is True, when the FilterTag is less than or equal to the comparison value. 5 GreaterThanEqual Filter condition is True, when the FilterTag is greater than or equal to the comparison value. 6 The filter eliminates archive data from retrieval or calculations that occur within the time period that the specified filter criterion is True. FilterMode determines exactly how changes in state of the FilterTag are interpreted for retrieval of data.
Name Description Value ExactTime Retrieves data for the exact times that the filter condition is True. 1 BeforeTime Retrieves data from the time of the last False filter condition up to the time of the True condition. 2 AfterTime Retrieves data from the time of the True filter condition up to the time of next False condition. 3 BeforeAndAfterTime Retrieves data from the time of the last False filter condition up to the time of next False condition. 4 Syntax
object.Count
Parameters
None
Remarks
Criteria is a read-only property of type DataCriteria.
- Specify the sampling mode.
- Criteria Property (MessageRecordset Object)
-
Use this property to specify which Messages to return from the Historian server when a MessageRecordset query executes.
A Topic may be optionally supplied to limit the Message queries to specific message topics. The following table provides a list of message topics.Name Description Value Connections Provides messages about client connections. 1 Security Provides messages and alerts about login attempts and attempts to access restricted resources. 2 ConfigurationAudit Provides messages about configuration changes and audit trail. 3 ServiceControl Provides messages and alerts regarding startup and shutdown of the system and specific services. 4 Performance Provides messages and alerts regarding system and archive performance. 5 You can also optionally supply a time frame for the query. To do this, either set the StartTime and EndTime properties or set the StartTimeShortcut and EndTimeShortcut properties, or a combination of both.
All other fields of the MessageCriteria are evaluated by exact match if set.
Syntax
object.Criteria
Parameters
None
Remarks
Criteria is a read-only property of type MessageCriteria.
- Criteria Property (TagRecordset Object)
-
Use this property to specify which Tags to return from the Historian server when a TagRecordset query is executed.
You can supply the Tagname and Description as a mask including wildcards to return all matching tags. All other fields of the TagCriteria object are tested for exact match if they are supplied or set.
Syntax
object.Criteria
Parameters
None
Remarks
Criteria is a read-only property of type TagCriteria.
- CurrentValue Property (Tag Object)
-
Returns the current value of the Tag as a DataValue object. The DataValue object contains properties for the Value, TimeStamp, and DataQuality of the current value.
Syntax
object.CurrentValue
Parameters
None
Remarks
CurrentValue is a read-only property of type DataValue.
D
- Data Property (Server Object)
-
Returns the Data object for the current server. Use the Data object to build queries for collected data.
Syntax
object.Data
Parameters
None
- DataStores Property (Server Object)
-
Returns the collection of the available data stores.
Syntax
object.DataStores
Parameters
None
Remarks
DataStores
- DataQuality Property (DataFields Object)
-
Determines whether the DataQuality field should be returned in the DataRecordset query.
Syntax
object.DataQuality[ = Boolean]
Parameters
None
- DataQuality Property (DataValue Object)
-
Returns or sets the quality of the DataValue.
The table below defines the possible values for DataQuality:Name Data Type Description Good The quality of the value is GOOD. 1 Bad The quality of the value is BAD. 2 Unknown The quality of the value is UNKNOWN. 3 - DataQualityUpdated Property (DataValue Object)
-
This property is for internal use only.
Syntax
object.DataQualityUpdated[ = Boolean]
Parameters
None
- DataStore Property (Archive Object)
-
Returns the data store name of the specified Archive.
Syntax
object.DataStore
Parameters
None
Remarks
String
- DataQualityUpdated Property (DataValue Object)
-
This property is for internal use only.
Syntax
object.DataQualityUpdated[ = Boolean]
Parameters
None
- DataTimestamp Property (DataComments Object)
-
Returns the timestamp of the DataValue the comment is associated with.
Syntax
object.DataTimestamp
Parameters
None
Remarks
DataTimeStamp is a read-only property of type Date.
Example
Debug.Print "Commented point at: " + _ Format$(MyValue.Com
- DataType Property (DataComments Object)
-
Returns the data type of the associated data.
Syntax
object.DataType
Parameters
None
- DataType Property (Tag Object)
-
Returns or sets the data type of the Tag. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
The table below lists the available data types.Name Description Value Scaled Tag scaled between high engineering units and low engineering units. 1 Float Tag stored as single precision floating point. 2 DoubleFloat Tag stored as double precision floating point. 3 Integer Tag stored as 2-byte integer. 4 DoubleInteger Tag stored as 4-byte integer. 5 FixedString Tag stored as fixed length UNICODE string. 6 VariableString Tag stored as variable length UNICODE string. 7 Blob Tag stored as binary large object. 8 - DataType Property (DataComments Object)
-
Sets the data type to search for in the TagRecordset query.
Syntax
object.DataType[ = ihDataType]
Parameters
None
- DataType Property (TagFields Object)
-
Determines whether the DataType field should be returned in the TagRecordset query.
Syntax
object.DataType = Boolean]
Parameters
None
- DataTypeList Property (Tags Object)
-
Returns the list of Historian data types.
Syntax
object.DataTypeList
Parameters
None
Remarks
DataTypeList is a read-only property of type Variant.
- DataTypeSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.DataTypeSet[ = Boolean]
Parameters
None
- DataTypeUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.DataTypeUpdated[ = Boolean]
Parameters
None
- DefaultCollectionInterval Property (Collector Object)
-
Returns or sets the Default Collection Interval property for the Collector.
Syntax
object.DefaultCollectionInterval[ = Long]
Parameters
None
Example' Print Out The DefaultCollectionInterval configured for the collector Debug.Print
- DefaultCollectionInterval Property (Collector Object)
-
Returns or sets the Default Collection Interval property for the Collector.
Syntax
object.DefaultCollectionInterval[ = Long]
Parameters
None
Example' Print Out The DefaultCollectionInterval configured for the collector Debug.Print
- DefaultCollectionType Property (Collector Object)
Returns or sets the Default Collection Type for the given collector. This can be either Polled or Solicited.
Syntaxobject.DefaultCollectionType[ = iHistorian_SDK.ihCollectionType]
ParametersNone
Example' Print Out The DefaultCollectionType configured for the collectorDebug.Print MyCollector.DefaultCollectorAbsoluteDeadband
- DefaultCollectorAbsoluteDeadbanding Property (Collector Object)
Returns or sets the Default Collector Absolute Deadbanding for the Collector. This specifies if the compression applied to newly added tags from the collector use absolute or relative compression.
Syntaxobject.DefaultCollectorAbsoluteDeadbanding[ = Boolean]
ParametersNone
Example' Print Out The DefaultCollectorAbsoluteDeadbanding configured for the collector DebugPr
- DefaultCollectorCompression Property (Collector Object)
Returns or sets whether the collector uses Compression by default.
Syntaxobject.DefaultCollectorCompression[ = Boolean]
ParametersNone
Example' Print Out The DefaultCollectorCompression configured for the collector Debug.Print MyColl
- DefaultCollectorCompressionDeadband Property (Collector Object)
Returns or sets the Default Collector Compression Deadband for the given collector. This is default compression value to be applied to newly added tags from the collector.
Syntaxobject.DefaultCollectorCompressionDeadband[ = Single]
ParametersNone
Example' Print Out The DefaultCollectorCompressionDeadband configured for the collector Debug.Print MyC
- DefaultCollectorCompressionTimeout Property (Collector Object)
Returns or sets the Default Collector Compression Timeout for the Collector. This specifies the amount of time after which a value will be sent to the archiver by the collector even if it would have been compressed.
Syntaxobject.DefaultCollectorCompressionTimeout[ = Long]
ParametersNone
Example' Print Out The DefaultCollectorCompressionTimeout configured for the collector Debug
- DefaultLoadBalancing Property (Collector Object)
Returns or sets whether the collector uses Load Balancing by default.
Syntaxobject.DefaultLoadBalancing[ = Boolean]
ParametersNone
Example' Print Out The DefaultLoadBalancing configured for the collector Debug.Print MyCo
- DefaultServer Property (ServerManager Object)
Returns or sets a reference to the default Server Object.
Syntaxobject.DefaultServer
ParametersNone
- DefaultSpikeInterval Property (Collector Object)
Returns or sets the Default Spike Interval property for the Collector.
Syntaxobject.DefaultSpikeInterval[ = Long]
ParametersNone
Example' Print Out The DefaultSpikeInterval configured for the collector Debug.Print MyCollector.DefaultSpikeInter
- DefaultSpikeLogic Property (Collector Object)
Returns or sets the Default Collector Spike Logic property for the Collector.
Syntaxobject.DefaultSpikeLogic[ = Boolean]
ParametersNone
Example' Print Out The DefaultSpikeLogic configured for the collector Debug.Print MyCollector.DefaultSpikeLogic
- DefaultSpikeMultiplier Property (Collector Object)
Returns or sets the Default Spike Multiplier property for the Collector.
Syntaxobject.DefaultSpikeMultiplier[ = Double]
ParametersNone
Example' Print Out The DefaultSpikeMultiplier configured for the collector Debug.Pri
- DefaultTagPrefix Property (Collector Object)
Returns or sets the Default Tag Prefix property for the Collector.
Syntaxobject.DefaultTagPrefix[ = String]
ParametersNone
Example' Print Out The DefaultTagPrefix configured for the collector Debug
- DefaultTimestampType Property (Collector Object)
Returns or sets the Default Timestamp Type for the given collector. The Timestamps may be assigned by either the Data Source or the Collector itself.
Syntaxobject.DefaultTimestampType[ = iHistorian_SDK.ihTimeStampType]
ParametersNone
Example' Print Out The DefaultTimestampType configured for the collector Debug.Print MyCollector.DefaultTimestampType
- Definition Property (UserCalcFunction Object)
Returns the definition of the specified UserCalcFunction.
Syntaxobject.Definition[ = String]
ParametersNone
- Description Property (Collector Object)
Returns or sets the description for the given collector.
Syntaxobject.Description[ = String]
ParametersNone
Example' Print Out The Description configured for the collector Debug.P
- Description Property (EnumeratedSets Object)
Returns or sets the description or comments for an enumerated set.
Syntaxobject.Description
ParametersNone
Returns
String
- Description Property (EnumeratedState Object)
Returns or defines the description or comments for a state.
Syntaxobject.Description
ParametersNone
Remarks
String. Returns the description or comments for each state.
- Description Property (Tag Object)
Returns or sets the description of the Tag. Changes to tag Properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntaxobject.Description[ = String]
ParametersNone
- Description Property (TagCriteria Object)
Sets the description or description mask to search for in the TagRecordset query. The description may include wildcard characters.
Syntaxobject.Description[ = String]
ParametersNone
- Description Property (TagFields Object)
Determines whether the Description field should be returned in the TagRecordset query.
Syntaxobject.Description[= Boolean]
ParametersNone
- Description Property (UserDefinedTypeFields Object)
Returns or sets the description or comments for a field in a User Defined Type.
Syntaxobject.Description
ParametersNone
Returns
String
- DescriptionSet Property (TagCriteria Object)
A flag to indicate whether this property has been set or not.
Syntaxobject.DescriptionSet[ = Boolean]
ParametersNone
- DescriptionUpdated Property (Tag Object)
A flag to indicate whether this property has been set or not.
Syntaxobject.DescriptionUpdated[ = Boolean]
ParametersNone
- Direction Property (DataCriteria Object))
Sets the direction (forward or backward) of sampling data from the archive by the DataRecordset query. This parameter is only used for "RawByNumber" Sampling Mode.
The following table details the available sampling directions.SyntaxName Description Value Forward Data sampled from the start time forward in time. 1 Backward Data sampled from the start time backwards in time. 2 object.Direction[ = iHistorian_SDK.ihSamplingDirection]
ParametersNone
- DirectionSet Property (DataCriteria Object)
A flag to indicate whether this property has been set or not.
Syntaxobject.DescriptionSet[ = Boolean]
ParametersNone
Property Reference E-F
- EndTime Property (Archive Object)
-
Returns the end time of the specified archive. This represents the latest timestamp for any tag contained in the archive.
Syntax
object.EndTime
Parameters
None
Remarks
EndTime is a read-only property of type Date.
- EndTime Property (DataCriteria Object)
-
Returns or sets the end of the time range to retrieve data for in the DataRecordset query.
Syntax
object.EndTime[ = Date]
Parameters
None
- EndTime Property (MessageCriteria Object)
-
Establishes the end time of the MessageRecordset query.
Syntax
object.EndTime[ = Date]
Parameters
None
- EndTimeSet Property (DataCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.EndTimeSet[ = Boolean]
Parameters
None
- EndTimeSet Property (MessageCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.EndTimeSet[ = Boolean]
Parameters
None
- EndTimeShortcut Property (DataCriteria Object)
-
Returns or sets the end of the time range to retrieve data for in the DataRecordset query. Shortcuts are strings that define absolute or relative times. The time shortcuts are the following:
SyntaxValue Description (N)ow The current time (absolute). (T)oday Today at midnight (absolute). (Y)esterday Yesterday at midnight (absolute). (D)ays Number of Days (relative). (M)in Number of Minutes (relative). (H)our Number of Hours (relative). (W)eek Number of Weeks (relative). (BOM) Beginning of this month at Midnight (absolute). (EOM) Last Day of this month at Midnight (absolute). (BOY) First Day of this year at Midnight (absolute). (EOY) Last Day of this year at Midnight (absolute). object.EndTimeShortcut[ = String]
Parameters
None
Example
With MyRecordset.Criteria .Tagmask = "*.F_CV" ' Start two days Ago at 8am in the morning .StartTimeShortcut = "Today-2d+8h" ' End this morning at 8am .EndTimeShortcut = "Today+8h" End With
- EndTimeShortcut Property (MessageCriteria Object)
-
Establishes the end time of the MessageRecordset query by specifying a time shortcut string versus a date. The time shortcuts are the following:
SyntaxValue Description (N)ow The current time (absolute). (T)oday Today at midnight (absolute). (Y)esterday Yesterday at midnight (absolute). (D)ays Number of Days (relative). (M)in Number of Minutes (relative). (H)our Number of Hours (relative). (W)eek Number of Weeks (relative). (BOM) Beginning of this month at Midnight (absolute). (EOM) Last Day of this month at Midnight (absolute). (BOY) First Day of this year at Midnight (absolute). (EOY) Last Day of this year at Midnight (absolute). object.EndTimeShortcut[ = String]
Parameters
None
Example
' Set A End Time For Now MyMessages.Criteria.EndTimeShortcut = "Now"
- EndTimeShortcutSet Property (MessageCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.EndTimeShortcutSet[ = Boolean]
Parameters
None
- EngineeringUnits Property (Tag Object)>
-
Returns or sets the engineering unit description of the Tag. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.EngineeringUnits[ = String]
Parameters
None
- EngineeringUnits Property (TagCriteria Object)
-
Sets the engineering unit description to search for in the TagRecordset query.
Syntax
object.EngineeringUnits[ = String]
Parameters
None
- EngineeringUnits Property (TagFields Object)
-
Determines whether the EngineeeringUnits field should be returned in the TagRecordset query.
Syntax
object.EngineeringUnits[ = Boolean]
Parameters
None
- EngineeringUnitsSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.EngineeringUnits[ = Boolean]
Parameters
None
- EngineeringUnitsUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.EngineeringUnitsUpdated[ = Boolean]
Parameters
None
- ErrorList Property (Server Object)
-
Returns a collection of error messages accumulated during the current session of the Server object. Each message includes a timestamp indicating the time the error was generated and each includes an error message translated into the locale of the client, when possible.
Syntax
object.ErrorList
Parameters
None
Remarks
ErrorList is a read-only property of type Collection of String.
Example
ErrorTrap: Dim I As Long ' Loop through the ErrorList and print to the debug window For I = 1 To MyServer.ErrorList.count Debug.Print MyServer.ErrorList(I) Next I
F
- FailoverOnBadQuality Property (Collector Object)
-
Returns or sets whether the collector should automatically failover when the watchdog tag quality goes to BAD.
Syntax
object.FailoverOnBadQuality[ = Boolean]
Parameters
None
- FailoverOnCollectorStatus Property (Collector Object)
-
Returns or sets whether the collector should automatically failover when the currently active collector status goes to UNKNOWN.
Syntax
object.FailoverOnCollectorStatus[ = Boolean]
Parameters
None
- FailoverOnNonZeroValue Property (Collector Object)
-
Returns or sets whether the collector should automatically failover when the watchdog tag value goes to non-zero.
Syntax
object.FailoverOnNonZeroValue[ = Boolean]
Parameters
None
- FailoverOnValue Property (Collector Object)
-
Returns or sets whether the collector should automatically failover based on the value of the watchdog tag. Set the FailoverOnNonZeroValue property or FailoverOnValueUnchanged property to indicate the exact criteria.
Syntax
object.FailoverOnValue[ = Boolean]
Parameters
None
- FailoverOnValueUnchanged Property (Collector Object)
-
Returns or sets whether the collector should automatically failover when the watchdog tag value remains unchanged. Use the WatchdogValueMaxUnchangedPeriod property to specify the time period.
Syntax
object.FailoverOnValueUnchanged[ = Boolean]
Parameters
None
- Fields Property (DataRecordset Object)
-
Returns the DataFields object which contains the information on which fields are returned in the DataRecordSet
Syntax
object.Fields
Parameters
None
- Fields Property (MessageRecordset Object)
-
Returns the Fields object that is used to identify which Message fields to return from the Historian server when a MessageRecordset query executes.
Syntax
object.Fields
Parameters
None
Remarks
Fields is a read-only property of type MessageFields.
- Fields Property (TagRecordset Object)
-
Returns the Fields object that is used to identify which Tag fields to return from the Historian server when a TagRecordset query executes.
Syntax
object.Fields
Parameters
None
Remarks
Fields is a read-only property of type TagFields.
- FileName Property (Archive Object)
-
Returns or sets the file name of the specified archive. The filename must be specified in the context of the Historian server drives and directories.
Changing the file name of an archive moves the archive from one file location to another.
Syntax
object.FileName[ = String]
Parameters
None
Example
Dim I As Long ' List The FileName and FileSize Of Each Archive With MyArchives For I = 1 To .Item.count Debug.Print .Item(I).Name, .Item(I).FileName, .Item(I).FileSizeCurrent Next I End With ' Move The Archive To A New Directory, Path Context Of Server On Error GoTo ErrorTrap MyArchive.FileName = NewArchiveFilename ErrorTrap: Debug.Print "
- FileSizeCurrent Property (Archive Object)
-
Returns the number of MB used in the specified archive file. This number is less than or equal to the file size on disk.
Changing the file name of an archive moves the archive from one file location to another.
Syntax
object.FileSizeCurrent
Parameters
None
Remarks
FileSizeCurrent is a read-only property of type Long.
Example
Dim I As Long ' List The FileName and FileSizeCurrent Of Each Archive With MyArchives For I = 1 To .Item.count Debug.Print .Item(I).Name, .Item(I).FileName, .Item(I).FileSizeCurrent Next I End With
- FileSizeTarget Property (Archive Object)
-
Returns or sets the target file size for the specified archive file in MB.
Syntax
object.FileSizeTarget[ = Long]
Parameters
None
Remarks
FileSizeCurrent is a read-only property of type Long.
Example
Debug.Print "Target File Size for archive " & MyArchive.FileSizeTarget
- FilterComparisonMode Property (DataCriteria Object)
-
Returns or sets the type of comparison to be made on the FilterComparisonValue to apply appropriate filter to the DataRecordset query. If a FilterTag and FilterComparisonValue are supplied the query attempts to filter out time periods from the results where the filter condition is False. The FilterComparisonMode defines how archive values for the FilterTag should be compared to the FilterComparisonValue to establish the state of the filter condition.
The table below defines the available Filter Comparison Modes:
SyntaxValue Description Value Equal Filter condition is True when the FilterTag is equal to the comparison value. 1 NotEqual Filter condition is True when the FilterTag is NOT equal to the comparison value. 2 LessThan Filter condition is True when the FilterTag is less than the comparison value. 3 GreaterThan Filter condition is True when the FilterTag is greater than the comparison value. 4 LessThanEqual Filter condition is True when the FilterTag is less than or equal to the comparison value. 5 GreaterThanEqual Filter condition is True when the FilterTag is greater than or equal to the comparison value. 6 object.FilterComparisonMode[ = iHistorian_SDK.ihFilterComparisonMode]
Parameters
None
- FilterComparisonModeList Property (Data Object)
-
This function returns a list of the available Filter Comparison modes for a data request.
Syntax
object.FilterComparisonModeList
Parameters
None
- FilterComparisonModeSet Property (DataCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.FilterComparisonModeSet[ = Boolean]
Parameters
None
- FilterComparisonValue Property (DataCriteria Object)
-
Sets the value to compare the filter tag with when applying the appropriate filter to the DataRecordset query.
Syntax
object.FilterComparisonValue[ = Variant]
Parameters
None
- FilterComparisonValue Property (DataCriteria Object)
-
Sets the value to compare the filter tag with when applying the appropriate filter to the DataRecordset query.
Syntax
object.FilterComparisonValue[ = Variant]
Parameters
None
- FilterComparisonValueSet Property (DataCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.FilterComparisonValueSet[ = Boolean]
Parameters
None
- FilterMode Property (DataCriteria Object)
-
Returns or sets the type of time filter applied to the DataRecordset query. If a FilterTag and FilterComparisonValue are supplied the query attempts to filter time periods from the results where the filter condition equals False. The FilterMode defines how time periods before and after transitions in the filter condition should be handled. For example, "AfterTime" indicates that the filter condition should be True starting at the timestamp of the archive value that triggered the True condition and leading up to the timestamp of the archive value that triggered the False condition.
Use the filter query to directly retrieve data for a particular lot number or batch of material. In this scenario, you must know whether the batch number was written into the archive at the beginning of the batch or at the end of the batch. If the batch number is written at the beginning of the batch, use the "AfterTime" filter mode. If the batch number is written at the end of the batch, use the "BeforeTime" filter mode.
The table below defines the available Filter Modes:
Name Description Value ExactTime Retrieves data for the exact times that the filter condition is True. 1 BeforeTime Retrieves data from the time of the last False filter condition up until the time of the True condition. 2 AfterTime Retrieves data from the time of the True filter condition up until the time of next False condition 3 BeforeAndAfterTime Retrieves data from the time of the last False filter condition up until the time of next False condition. 4 Syntax
object.FilterMode[ = iHistorian_SDK.ihFilterMode]
Parameters
None
- FilterModeList Property (Data Object)
-
This function returns a list of the available Filtering modes for a data request.
Syntax
object.FilterModeList
Parameters
None
- FilterModeSet Property (DataCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.FilterModeSet[ = Boolean]
Parameters
None
- FilterTag Property (DataCriteria Object)
-
Returns or sets the tagname used to define the filter applied to the DataRecordset query. You can only specify a single tag (no wildcards).
Syntax
object.FilterTag[ = String]
Parameters
None
- FilterTagSet Property (DataCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.FilterTagSet[ = Boolean]
Parameters
None
- FullAreaNames Property (OPCBrowse Object)
-
Returns the fully-qualified area name for an AE server. When a browse operation occurs, the server returns all areas and sources under the BrowsePosition. The areas are akin to nodes (they can be set to the next browse position to traverse the tree). Sources are like leaves, and do not have children.
After a browse, the areas and leaves are populated in arrays, and the LeafName and AreaName properties allow you to access those arrays by index. The fully-qualified area name should be used to set the Browse Position. The Areanames property is used to display the individual areas.
Syntax
object.FullAreaNames(Index)
Parameters
Index - Integer - The index into the full area name array.
Remarks
FullAreaNames is a read-only String property returned as a variant for script compatibility.
- FullLeafNames Property (OPCBrowse Object)
-
Returns the fully-qualified leaf name (source) for an AE server. When a browse operation occurs, the server returns all areas and sources under the BrowsePosition. The areas are akin to nodes (they can be set to the next browse position to traverse the tree). Sources are like leaves, and do not have children.
After a browse, the areas and leaves are populated in arrays, and the LeafName and AreaName properties allow you to access those arrays by index.
Syntax
object.FullLeafNames(Index)
Parameters
Index - Integer - The index into the full leaf name array.
Remarks
FullLeafNames is a read-only String property returned as a variant for script compatibility.
Property Reference G-H
G
- General1 Property (Collector Object)
Returns or sets the general fields of the specified collector. The general fields control the behavior of specific collector types. Refer to the documentation of a specific collector type to interpret the meaning of the general collector fields for that collector type.
Syntax
object.General1[ = String]
Parameters
NoneExample
MyCollector.General1 = "CanUseOPCTime=True"
- General2 Property (Collector Object)
Returns or sets the general fields of the specified collector. The general fields control the behavior of specific collector types. Refer to the documentation of a specific collector type to interpret the meaning of the general collector fields for that collector type.
Syntax
object.General2[ = String]
Parameters
None- General3 Property (Collector Object)
-
Returns or sets the general fields of the specified collector. The general fields control the behavior of specific collector types. Refer to the documentation of a specific collector type to interpret the meaning of the general collector fields for that collector type.
Syntax
object.General3[ = String]
Parameters
None - General4 Property (Collector Object)
-
Returns or sets the general fields of the specified collector. The general fields control the behavior of specific collector types. Refer to the documentation of a specific collector type to interpret the meaning of the general collector fields for that collector type.
Syntax
object.General4[ = String]
Parameters
None - General5 Property (Collector Object)
-
Returns or sets the general fields of the specified collector. The general fields control the behavior of specific collector types. Refer to the documentation of a specific collector type to interpret the meaning of the general collector fields for that collector type.
Syntaxobject.General4[ = String]
Parameters
None
H
- Handle Property (Server Object)
-
Returns the internal identifier for the current server.
Syntax
object.Handle
Parameters
None
Remarks
Handle is a read-only property of type Long.
- HeartbeatOutputAddress Property (Collector Object)
-
Returns or sets the address in the data source that the collector sends heartbeat information to. The collector will write a 1 to this address once per minute.
Syntax
object.HeartbeatOutputAddress[ = String]
Parameters
None
Example
'Print Out The Heartbeat Output Address configured for the collector DebugPrint MyCollector.HeartbeatOutputAddress
- HiEngineeringUnits Property (Tag Object)
-
Returns or sets the high engineering unit range of the Tag. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.HiEngineeringUnits[ = Double]
Parameters
None
- HiEngineeringUnits Property (TagCriteria Object)
-
Sets the high engineering unit range to search for in the TagRecordset query.
Syntax
object.HiEngineeringUnits[ = Double]
Parameters
None
- HiEngineeringUnits Property (TagFields Object)
-
Determines whether the HiEngineeringUnits field should be returned in the TagRecordset query.
Syntax
object.HiEngineeringUnits[ = Boolean]
Parameters
None
- HiEngineeringUnitsSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.HiEngineeringUnitsSet[ = Boolean]
Parameters
None
- HiEngineeringUnitsUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.HiEngineeringUnitsUpdated[ = Boolean]
Parameters
None
- HiScale Property (Tag Object)
-
Sets the high scale value used for input scaling on the Tag. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.HiScale[ = String]
Parameters
None
- HiScale Property (TagCriteria Object)
-
Sets the high input scale range value to search for in the TagRecordset query.
Syntax
object.HiScale[ = String]
Parameters
None
- HiScale Property (TagFields Object)
-
Determines whether the HiScale field should be returned in the TagRecordset query.
Syntax
object.HiScale[ = Boolean]
Parameters
None
- HiScaleSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.HiScaleSet[ = Boolean]
Parameters
None
- HiScaleUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.HiScaleUpdated[ = Boolean]
Parameters
None
- HighPart Property (QueryModifiers Object)
-
Returns or sets the HighPart of the query modifier. Use the Server.CriteriaFromStrings method to determine the HighPart and LowPart of a query modifier.
Syntax
object.HighPart
Parameters
None
Remarks
Long
- HighSeverity Property (OPCFilters Object)
-
Gets/Sets the High Severity filter in the Alarm Collector. Only events with a severity less than or equal to HighSeverity will be collected.
Syntax
object.HighSeverity[ = Long]
Parameters
None
Property Reference I-J
I
- Id Property (DataStore Object)
-
Returns or sets the ID (GUID) of a data store. This is a read-only property.
Syntax
object.Id
Parameters
None
Remarks
String. This is a read-only property.
- ImportErrors Property (Alarms Object)
-
Returns a list of Import Error messages.
Syntax
object.ImportErrors
Parameters
None
- ImportErrors Property (DataRecordset Object)
-
Returns a list of Import Error messages.
Syntax
object.ImportErrors
Parameters
None
- ImportErrors Property (MessageRecordset Object)
-
Returns a list of Import Errors.
Syntax
object.ImportErrors
Parameters
None
- ImportErrors Property (TagRecordset Object)
-
Returns a list of tag import errors.
Syntax
object.ImportErrors
Parameters
None
- InputScaling Property (Tag Object)
-
Returns or sets whether input scaling is enabled for the Tag. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.InputScaling[ = Boolean]
Parameters
None
- InputScaling Property (TagCriteria Object)
-
Sets the input scaling to search for in the TagRecordset query.
Syntax
object.InputScaling[ = Boolean]
Parameters
None
- InputScaling Property (TagFields Object)
-
Determines whether the InputScaling field should be returned in the TagRecordset query.
Syntax
object.InputScaling[ = Boolean]
Parameters
None
- InputScalingSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.InputScalingSet[ = Boolean]
Parameters
None
- InputScalingUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.InputScalingUpdated[ = Boolean]
Parameters
None
- IsSystem Property (DataStore Object)
-
Indicates or sets that data store is the single-system data store and therefore, cannot be modified.
Syntax
object.IsSystem
Parameters
None
- InterfaceAbsoluteDeadband Property (Tag Object)
-
Returns or sets the Absolute Deadband value for this tag to be used in the Collector.
Syntax
object.InterfaceAbsoluteDeadband[ = Double]
Parameters
None
- InterfaceAbsoluteDeadband Property (TagCriteria Object)
-
Sets the InterfaceAbsoluteDeadband to search for in the TagRecordset query.
Syntax
object.InterfaceAbsoluteDeadband[ = Double]
Parameters
None
- InterfaceAbsoluteDeadband Property (TagFields Object)
-
Determines whether the InterfaceAbsoluteDeadband field should be returned in the TagRecordset query.
Syntax
object.InterfaceAbsoluteDeadband[ = Double]
Parameters
None
- InterfaceAbsoluteDeadbandSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.InterfaceAbsoluteDeadbandSet[ = Boolean]
Parameters
None
- InterfaceAbsoluteDeadbandUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.InterfaceAbsoluteDeadbandUpdated[ = Boolean]
Parameters
None
- InterfaceAbsoluteDeadbanding Property (Tag Object)
-
Returns or sets whether this tag is using Absolute Deadbanding in the Collector or not.
Syntax
object.InterfaceAbsoluteDeadbanding[ = Boolean]
Parameters
None
- InterfaceAbsoluteDeadbanding Property (TagCriteria Object)
-
Sets the InterfaceAbsoluteDeadbanding to search for in the TagRecordset query.
Syntax
object.InterfaceAbsoluteDeadbanding[ = Boolean]
Parameters
None
- InterfaceAbsoluteDeadbanding Property (TagFields Object)
-
Determines whether the InterfaceAbsoluteDeadbanding field should be returned in the TagRecordset query.
Syntax
object.InterfaceAbsoluteDeadbanding[ = Boolean]
Parameters
None
- InterfaceAbsoluteDeadbandingSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.InterfaceAbsoluteDeadbandingSet[ = Boolean]
Parameters
None
- InterfaceAbsoluteDeadbandingUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.InterfaceAbsoluteDeadbandingUpdated[ = Boolean]
Parameters
None
- IsActiveRedundantCollector Property (Collector Object)
-
Returns whether this collector is currently the active collector in a redundant set of collectors.
Syntax
object.IsActiveRedundantCollector
Parameters
None
Remarks
IsActiveRedundantCollector is a read-only property of type Boolean.
- IsAudited Property (Data Object)
-
Returns whether or not this data has an Audit Trail associated with it.
Syntax
object.IsAudited
Parameters
None
- IsAudited Property (Server Object)
-
Returns or sets whether the point verification feature is enabled. With point verification enabled, the system will prompt for a username and password upon any request to change data or configuration.
Syntax
object.IsAudited[ = Boolean]
Parameters
None
- IsCurrent Property (Archive Object)
-
Returns whether or not the specified archive is the newest archive where new data currently flows into.
Syntax
object.IsCurrent
Parameters
None
Remarks
IsCurrent is a read-only property of type Boolean.
Example
'Find The Current Archive, Then Initiate A Backup With MyArchives For I = 1 To .Item.count If .Item(I).IsCurrent Then If Not .Item(I).Backup(BackupFilename) Then err.Raise 1, "Backup", "Backup Failed" End If End If Next I End With
- IsDefaultServer Property (Server Object)
-
Returns and/or determines if the current server is the default server. You can create an instance of the Server object and connect it without supplying a server name, username, or password. In this case, the default server and associated user information establishes the default connection.
Syntax
object.IsDefaultServer
Parameters
None
- IsDeleted Property (DataValue Object)
-
This function returns a Boolean which indicates whether or not this DataValue has been deleted or not.
Syntax
object.IsDeleted
Parameters
None
- IsDeleted Property (Tag Object)
-
Returns whether or not this tag has been deleted.
Syntax
object.IsDeleted
Parameters
None
- Modified Property (DataValue Object)
-
This function returns Boolean which indicates whether or not any of this DataValue's fields have been modified.
Syntax
object.IsModified
Parameters
None
- IsModified Property (Tag Object)
-
Returns whether or not this tag has been modified.
Syntax
object.IsModified
Parameters
None
- IsNew Property (DataComments Object)
-
Returns whether or not this Comment is new or not.
Syntax
object.IsNew
Parameters
None
- IsNew Property (DataValue Object)
-
This function returns a Boolean which indicates whether or not this DataValue is new.
Syntax
object.IsNew
Parameters
None
- IsNew Property (Message Object)
-
Returns whether this is a new message or not.
Syntax
object.IsNew
Parameters
None
- IsNew Property (Tag Object)
-
Tag.IsNew indicates whether this is a newly created tag. Returns true if the tag???s name does not exist in the server.
Syntax
object.IsNew
Parameters
None
- Item Property (Archives Object)
-
Returns a specific Archive object contained in the Archives object. The Item collection can loop through all Archives, or reference a specific Archive object directly by archive name.
The Archive Item collection automatically populates when the Archives object is instantiated.
Syntax
object.Item
Parameters
None
Remarks
Item is a read-only property of type Collection of Archives.
- Item Property (Collectors Object)
-
Returns a specific Collector object contained in the Collectors Object collection. The Item collection can loop through all Collectors, or reference a specific Collector object directly by Collector name.
The Collector Item collection automatically populates when the Collectors object is instantiated.
Syntax
object.Item
Parameters
None
Remarks
Item is a read-only property of type Collection.
- Item Property (DataRecordset Object)
-
Returns a specific DataValue object contained in the DataRecordset object. The Item collection can loop through all DataValues, or reference a specific DataValue object directly by Tagname and Timestamp.
The DataRecordset (and thus the Item collection) is populated with DataValues in three ways. The first is to set up query criteria and call the QueryRecordset method. The second is to import a list of DataValues using the Import method. The last way is to use the Add method to add new DataValues.
Syntax
object.Item(Tagname)
Parameters
Tagname - Variant - The name of the tag whose values to retrieve.
Remarks
Item is a read-only property of type Collection of DataValue.
- Item Property (DataStores Object)
Returns a specific data store object contained in the DataStores Object collection. The Item collection can loop through all DataStores, or reference a specific DataStore object directly by DataStore name.
Syntax
object.Item() As Collection
Parameters
NoneRemarks
Item is a read-only property of type Collection.
- Item Property (EnumeratedStates Object)
-
Returns an individual item from the EnumeratedStates collection.
Parameters
NoneRemarks
Enumerated State.
- Item Property (MessageRecordset Object)
-
Returns a specific Message object contained in the MessageRecordset object. The Item collection can loop through all Messages or reference a specific Message object directly by the timestamp.
The MessageRecordset (and thus the Item collection) populates with the Message in two ways: set up query criteria and call the QueryRecordset method, or use the Add method to add new Messages. Item is a read-only property of type Collection of Message.
Syntax
object.Item
Parameters
None
- Item Property (TagDependencies Object)
-
This function attempts to find the given Tagname within the collection of currently configured tags.
Syntax
object.Item(Tagname)
Parameters
Tagname - Variant - Name of the tag to locate.
- Item Property (TagRecordset Object)
-
Returns a specific Tag object contained in the TagRecordset object. The Item collection can loop through all Tags, or reference a specific Tag object directly by the tag name.
The TagRecordset (and thus the Item collection) populates with Tags in three ways:
The first is to set up query criteria and call the QueryRecordset method. The second is to import a list of Tags using the Import method. The last way is to use the Add method to add new Tags.
Syntax
object.Item
Parameters
None
Remarks
Item is a read-only property of type Collection of Tag.
- Item Property (UserDefinedTypeFields Object)
-
Returns an individual item from the multiple fields of the User Defined Type.
Syntax
object.item(Index)
Parameters
Index - Variant - The index has to be returned.
Remarks
UserDefinedTypeField.
Property Reference K-L
L
- LastBackup Property (Archive Object)
-
Returns the date and time of the last archive backup.
Syntax
object.LastBackup
Parameters
None
Remarks
LastBackup
is a read-only property of the type Date.Example
Dim I As Long ' List The Start and End Time Of Each Archive With MyArchives For I = 1 To .Item.count Debug.Print .Item(I).Name, .Item(I).StartTime, .Item(I).LastBackup Next I End With
- LastBackupUser Property (Archive Object)
-
Returns username of the person who performed the last backup of the archive.
Syntax
object.LastBackupUser
Parameters
None
Remarks
LastBackupUser is a read-only property of type String.
Example
Debug.Print "Modified By: " + MyArchive.LastBackupUser
- LastError Property (Archive Object)
-
Returns the last error message encountered by the Archive object. To see a complete list of messages, refer to the ErrorList property. When possible, the system translates messages into the locale of the client.
Syntax
object.LastError
Parameters
None
Remarks
LastError is a read-only property of type String.
- LastError Property (Archives Object)
-
Returns the last error message encountered by the Archives object. To see a complete list of messages, refer to the ErrorList property. When possible, the system translates messages into the locale of the client.
Syntax
object.LastError
Parameters
None
Remarks
LastError is a read-only property of type String.
- LastError Property (Collector Object)
-
Returns the last error message encountered by the Collector object. To see a complete list of messages, refer to the ErrorList property. When possible, the system translates messages into the locale of the client.
Syntax
object.LastError
Parameters
None
Remarks
LastError is a read-only property of type String.
- LastError Property (Collectors Object)
-
Returns the last error message encountered by the Collectors Object. To see a complete list of messages, refer to the ErrorList property. When possible, the system translates messages into the locale of the client.
Syntax
object.LastError
Parameters
None
Remarks
LastError is a read-only property of type String.
- LastError Property (DataRecordset Object)
-
Returns the last error message encountered by the DataRecordset object. To see a complete list of messages, refer to the ErrorList property. When possible, the system translates messages into the locale of the client.
Syntax
object.LastError
Parameters
None
Remarks
LastError is a read-only property of type String.
- LastError Property (DataStores Object)
-
Returns the last error message encountered by the Collectors Object.
Syntax
object.LastError
Parameters
None
Remarks
LastError is a read-only property of type String.
- LastError Property (EnumeratedSets Object)
-
Returns the last error message encountered by the EnumeratedSets object. To see a complete list of messages, refer to the ErrorList Property. When possible, the system translates messages into the locale of the client.
Syntax
object.LastError()
Parameters
None
Remarks
String. Indicates whether the string contains an error or not. This is a read-only property.
- LastError Property (EnumeratedSets Object)
-
Returns the last error message encountered by the EnumeratedSets object. To see a complete list of messages, refer to the ErrorList Property. When possible, the system translates messages into the locale of the client.
Syntax
object.LastError()
Parameters
None
Remarks
String. Indicates whether the string contains an error or not. This is a read-only property.
- LastError Property (Messages Object)
-
Returns the last error message encountered by the EnumeratedSets object. To see a complete list of messages, refer to the ErrorList Property. When possible, the system translates messages into the locale of the client.
Syntax
object.LastError()
Parameters
None
Remarks
LastError
is a read-only property of type String. - LastError Property (Messages Object)
-
Returns the last error message encountered by the EnumeratedSets object. To see a complete list of messages, refer to the ErrorList Property. When possible, the system translates messages into the locale of the client.
Syntax
object.LastError
Parameters
None
Remarks
LastError
is a read-only property of type String. - LastError Property (Server Object)
-
Returns the last error message encountered by the Server object. To see a complete list of messages, refer to the ErrorList property. When possible, the system translates messages into the locale of the client.
Syntax
object.LastError[ = String]
Parameters
None
- LastError Property (ServerManager Object)
-
Returns a text description of the last error encountered by the ServerManager object.
Syntax
object.LastError
Parameters
None
Remarks
LastError
is a read-only property of type String. - LastError Property (Tag Object)
-
Contains the last error string generated.
Syntax
object.LastError[ = String]
Parameters
None
- LastError Property (TagRecordset Object)
-
Returns the last error message encountered by the TagRecordset object. To see a complete list of messages, refer to the ErrorList property. When possible, the system translates messages into the locale of the client.
Syntax
object.LastError
Parameters
None
Remarks
LastError
is a read-only property of type String. - LastError Property (Tags Object)
-
Returns the last error message encountered by the Tags Object. To see a complete list of messages, refer to the ErrorList property. When possible, the system translates messages into the locale of the client.
Syntax
object.LastError
Parameters
None
Remarks
LastError
is a read-only property of type String. - LastModified Property (Tag Object)
-
Returns the time the tag configuration of this Tag was last modified.
Syntax
object.LastModified
Parameters
None
Remarks
LastModified
is a read-only property of type Date. - LastModified Property (TagCriteria Object)
-
Sets the last modified time to search for in the TagRecordset query.
Syntax
object.LastModified[ = Date]
Parameters
None
- LastModified Property (TagFields Object)
-
Determines whether the LastModified field should be returned in the TagRecordset query.
Syntax
object.LastModified[ = Boolean]
Parameters
None
- LastModified Property (UserDefinedTypes Object)
-
Returns the time when the User Defined Type was last modified.
Syntax
object.LastModified
Parameters
None
Returns
LastModified
is a read-only property of type Date. - LastModifiedSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.LastModified[ = Boolean]
Parameters
None
- LastModifiedUser Property (Tag Object)
-
Returns the user who last modified this Tag configuration.
Syntax
object.LastModifiedUser
Parameters
None
Remarks
LastModifiedUser
is a read-only property of type Date. - LastModifiedUser Property (TagCriteria Object)
-
Sets the last modified user to search for in the TagRecordset query.
Syntax
object.LastModifiedUser[=string]
Parameters
None
- LastModifiedUser Property (TagFields Object)
-
Determines whether the LastModifiedUser field should be returned in the TagRecordset query.
Syntax
object.LastModifiedUser[=Boolean]
Parameters
None
- LastModifiedUser Property (UserDefinedType Object)
-
Returns the last user that modified the User Defined Type.
Syntax
object.LastModifiedUser
Parameters
None
Returns
LastModifiedUser
is a read-only property of type String. - LastModifiedUserSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.LastModifiedUser[=Boolean]
Parameters
None
- LeafCount Property (OPCBrowse Object)
-
Returns the number of leaves under a browse position. When a browse operation occurs, the server returns all areas and sources under the BrowsePosition. LeafCount gives you the number of leaves, which you can use to iterate the LeafNames and FullLeafNames arrays.
Syntax
object.LeafCount
Parameters
None
Returns
LeafCount
is a read-only property of type String. - LeafNames Property (OPCBrowse Object)
-
Returns the display leaf name (source) for an AE server. See "FullLeafnames" property for more information.
Syntax
object.LeafNames(Index)
Parameters
Index - Integer - The index into the leaf name array.
Returns
LeafNames
is a read-only String property returned as a variant for script compatibility. - LicensedTags Property (Server Object)
-
Returns the maximum number of tags that you can configure on the Server.
Syntax
object.LicensedTags(Index)
Parameters
None
Remarks
LicensedTags
is a read-only property of type Long. - LicensedUsers Property (Server Object)
-
Returns the maximum number of users that may be connected to the Server at one time.
Syntax
object.LicensedUsers
Parameters
None
Remarks
LicensedUser
is a read-only property of type Long. - LoEngineeringUnits Property (Tag Object)
-
Returns or sets the low engineering unit range of the Tag. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.LoEngineeringUnits[ = Double]
Parameters
None
- LoEngineeringUnits Property (TagCriteria Object)
-
Sets the low engineering unit range to search for in the TagRecordset query.
Syntax
object.LoEngineeringUnits[ = Double]
Parameters
None
- LoEngineeringUnits Property (TagFields Object)
-
Determines whether the LoEngineeringUnits field should be returned in the TagRecordset query.
Syntax
object.LoEngineeringUnits[ = Boolean]
Parameters
None
- LoEngineeringUnitsSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.LoEngineeringUnitsSet[ = Boolean]
Parameters
None
- LoEngineeringUnitsUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.LoEngineeringUnitsUpdated[ = Boolean]
Parameters
None
- LoScale Property (Tag Object)
-
Returns or sets the low scale value used for input scaling on the Tag. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.LoScale[ = String]
Parameters
None
- LoScale Property (TagCriteria Object)
-
Sets the low input scale range value to search for in the TagRecordset query.
Syntax
object.LoScale[ = String]
Parameters
None
- LoScale Property (TagFields Object)
-
Determines whether the LoScale field should be returned in the TagRecordset query.
Syntax
object.LoScale[ = Boolean]
Parameters
None
- LoScale Property (TagCriteria Object)
-
Determines whether the LoScale field should be returned in the TagRecordset query.
Syntax
object.LoScaleSet[ = Boolean]
Parameters
None
- LoScaleUpdated (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.LoScaleUpdated[ = Boolean]
Parameters
None
- LoadBalancing Property (Tag Object)
-
Returns or sets the status of data collection load balancing for the Tag. Load balancing is used for polled type collection to evenly distribute data collection load over available sampling times. This is sometimes called "Phase Shifting". Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.LoadBalancing[ = Boolean]
Parameters
None
- LoadBalancing Property (TagCriteria Object)
-
Sets the load balancing to search for in the TagRecordset query.
Syntax
object.LoadBalancing[ = Boolean]
Parameters
None
- LoadBalancing Property (TagFields Object)
-
Determines whether the LoadBalancing field should be returned in the TagRecordset query.
Syntax
object.LoadBalancing[ = Boolean]
Parameters
None
- LoadBalancingSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.LoadBalancingSet[ = Boolean]
Parameters
None
- LoadBalancingUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.LoadBalancingUpdated[ = Boolean]
Parameters
None
- LowPart Property (QueryModifiers Object)
-
Returns or sets the LowPart of query modifier. Use the Server.CriteriaFromStrings method to determine the HighPart and LowPart of a query modifier.
Syntax
object.LowPart
Parameters
None
Remarks
Long
- LowSeverity Property (OPCFilters Object)
-
Gets/Sets the Low Severity filter in the Alarm Collector. Only events with a severity higher than or equal to LowSeverity will be collected.
Syntax
object.LowSeverity[ = Long]
Parameters
None
Property Reference M-N
- M
- MaintainAutoRecoveryFiles Property (Server Object)
-
Returns or sets whether auto recovery files are maintained by the server. Auto recovery files are periodic backups of the current .IHA and .IHC and protect against data loss due to ungraceful server shutdown.
Syntax
object.MaintainAutoRecoveryFiles[ = Boolean]
Parameters
None
- MajorVersion Property (Server Object)
-
Returns the server or client major version number (1, 2, 3, and so on).
Syntax
object.MajorVersion([API])
Parameters
Name Data Type Description API Boolean When True, the server version is returned. When False, the client version is returned. The default is False. Remarks
MajorVersion
is a read-only property of type Long. - Master Property (TagRecordset Object)
-
Returns the Master tag upon which bulk changes to tag configuration may be performed. When calling the WriteRecordset method, and supplying the "UserMasterTag" parameter, all changes made to the Master tag will be replicated to each tag in the TagRecordset whose Selected property is set to True.
Syntax
object.Master([ClearUpdates])
Parameters
Name Data Type Description ClearUpdates Boolean Whether to clear all pending updates in the master tag (optional, default = False). Remarks
Master
is a read-only property of type Tag.Example
Dim Recordset As TagRecordset Dim Master As Tag ' Get a new TagRecordset Set Recordset = MyServer.Tags.NewRecordset ' Fill in criteria, get all tags with collector compression on With Recordset.Criteria .Tagname = "*" .CollectorCompression = True End With Recordset.QueryRecordset Set Master = Recordset.Master ' Set Compression Percent to 0.5% Master.CollectorDeadbandPercentRange = 0.5 ' Select all tags in the recordset Recordset.SelectAll ' Commit Changes If Not Recordset.WriteRecordset(True) Then MsgBox "Failed To Commit Tag Changes" End If
- MaxReturnCells Property (DataRecordset Object)
-
Sets the Maximum number of cells to return in the DataRecordSet.
Syntax
object.MaxReturnCells([size])
Parameters
Name Data Type Description Size Long Number of cells to return. - MaximumQueryIntervals Property (Server Object)
-
Returns or sets the maximum query intervals enforced by the server. This property restricts the maximum number of samples per tag that the server can return for non-raw data queries. Filtered and raw data queries are not throttled.
Syntax
object.MaximumQueryIntervals([Long])
Parameters
None
- MaximumQueryTime Property (Server Object)
-
Returns or sets the maximum query time enforced by the server. The property restrict query times and provides balanced access to the server.
Syntax
object.MaximumQueryTime([Long])
Parameters
None
- MessageNumber Property (Message Object)
-
Returns the message number of the Message. A message number is a unique identifier for each Message required for national language support.
Syntax
object.MessageNumber[Long]
Parameters
None
Remarks
MessageNumber is a read-only property of type Long.
- MessageNumber Property (MessageCriteria Object)
-
Establishes which message number the MessageRecordset query will filter by. A message number is a unique identifier for each Message required for national language support.
Syntax
object.MessageNumber[Long]
Parameters
None
- MessageNumber Property (MessageFields Object)
-
Determines whether the MessageNumber field should be returned in the MessageRecordset query.
Syntax
object.MessageNumber[=Boolean]
Parameters
None
- MessageNumberSet Property (MessageCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.MessageNumberSet[=Boolean]
Parameters
Option Description MessageOnDataUpdate Determines whether data updates generate a message. - MessageOptions Property (Messages Object)
-
Exposes the MessageOptions collection to control the behavior of the Historian message generation and archiving.
If the property is set to True, all applications connected to the archiver will cause the archiver to generate a message on a data update, not just the application that set the property. For instance, if you set the property with the SDK and the File collector updates data (a single value) a message will be generated by the archiver.
An example of a message that appears in Historian Administrator after you change a specified tag property through the SDK would be:bsmith(MY_DOMAIN\bsmith) wrote 96 to tag aa at 01/10/2003 04:13:49.861 PM, Replaced 94.000
The message topic type would be Security.
The following table describes each of the messaging options:
Syntax
object.MessageOptions(OptionName)[=Variant]
Parameters
Name Data Type Description OptionName String The name of the message option. Remarks
MessageOptions is a read-only property of type Collection of options.
Example
ConnectedServer.Messages.MessageOptions("MessageOnDataUpdate") = True
- MessageString Property (Message Object)
-
Returns the translated text of the message, including any substitutions. Messages generally include translated fixed text and variable substitutions such as timestamps, usernames, and tagnames.
Syntax
object.MessageString[String]
Parameters
None
- MessageString Property (MessageCriteria Object)
-
Establishes text search criteria the MessageRecordset query filters by. The MessageString may be any sub-string of the message. You should not include wildcard characters.
Syntax
object.MessageString[=String]
Parameters
None
- MessageString Property (MessageFields Object)
-
Determines whether the MessageString field should be returned in the MessageRecordset query.
Syntax
object.MessageString[=Boolean]
Parameters
None
- MessageStringSet Property (MessageCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.MessageStringSet[=Boolean]
Parameters
None
- Messages Property (Server Object)
-
Returns the Messages Object for the current Server. Use the Messages Object to build queries for message data.
Syntax
object.Messages
Parameters
None
- MessageOptions Property (Server Object)
-
Returns the server or client minor version number (0, 1, 2, and so on).
Syntax
object.MessageVersion([API])
Parameters
Name Data Type Description API Boolean When True, the server version is returned. When False, the client version is returned. The default is False. Remarks
MinorVersion is a read-only property of type Long.
N
- Name Property (Archive Object)
-
Returns the name of the specified Archive.
Syntax
object.Name
Parameters
None
- Name Property (Collector Object)
-
Returns the name of the specified Collector.
Syntax
object.Name
Parameters
None
Remarks
Name is a read-only property of type String.
- Name Property (DataStore Object)
-
Returns the name of data store.
Syntax
object.Name
Parameters
None
Remarks
String.
- Name Property (Option Object)
-
The name parameter of this option.
Syntax
object.Name[ = String]
Parameters
None
- Name Property (UserCalcFunction Object)
-
Returns the name of the specified UserCalcFunction.
Syntax
object.Name[ = String]
Parameters
None
- NodeFilter Property (OPCBrowse Object)
-
Some OPCAE Servers allow you to set a filter for the browse. The Areas Returned by the Browse operation will be only those that match the filter criterion. If this property is not set, no filtering takes place.
Syntax
object.NodeFilter[ = Variant]
Parameters
None
Remarks
Nodefilter is a read/write property of type Variant for script compatibility.
- NumberOfElements Property (Tag Object)
-
Returns or sets the number of elements of a tag to specify if it is an array. If the value of the NumberOfElements is -1 then it is an array tag. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.NumberOfElements[ = Long]
Parameters
None
- NumberOfElements Property (TagCriteria Object)
-
Sets the NumberOfElements property to search for in the TagRecordset query. For example you can set to -1 if you want only array tags to be returned or set to 0 if you want non-array tags.
Syntax
object.NumberOfElements[ = Long]
Parameters
None
- NumberOfElements Property (TagFields Object)
-
Determines whether the NumberOfElements field should be returned in the TagRecordset query.
Syntax
object.NumberOfElements[ = Boolean]
Parameters
None
- NumberOfFields Property (UserDefinedType Object)
-
Returns the number of fields in the User Defined Type.
Syntax
object.NumberOfFields
Parameters
Integer
- NumberOfSamples Property (DataCriteria Object)
-
Returns or sets the number of samples to retrieve from the archive in the DataRecordset query. Samples will be evenly spaced within the time range defined by start time and end time for most sampling modes. For the "RawByNumber" sampling mode the NumberOfSamples determines the maximum number of values to retrieve. For the "RawByTime" sampling mode, the NumberOfSamples is ignored.
Syntax
object.NumberOfFields[ = Long]
Parameters
None
- NumberOfSamplesSet Property (DataCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.NumberOfSamplesSet[ = Long]
Parameters
None
- NumStateNames Property (EnumeratedState Object)
-
Returns the number of states in the set.
Syntax
object.NumStateNames
Parameters
None
Remarks
Long
Property Reference O-P
P
- PercentGood Property (DataValue Object)
-
Returns the percentage of time the value was of good quality during the interval the DataValue applies to. Does not apply to RawByNumber and RawByTime sampling modes.
Syntax
object.PercentGood
Parameters
None
Remarks
PercentGood is a read-only property of type Single.
Example
If MyValue.PercentGood < 50 Then err.Raise 1,, "We do not have enough good data" End If
- PerformanceDSStatistics (Archives Object)
-
Exposes performance statistics for the data store. These statistics are updated periodically.
The Product server and new current values are automatically reported to the client and updated in the PerformanceDSStatistics collection.
Syntax
object.PerformanceDSStatistics
Parameters
None
Remarks
PerformanceDSStatistics is a read-only property of type Collection of Variant.
- PerformanceDSStatistics (Archives Object)
-
Exposes performance statistics for the data stores. These statistics are updated periodically.
The server and new current values are automatically reported to the client and updated in the PerformanceDSStatistics collection.
The following table describes each of the performance statistics and their purpose.
DataStores Performance Statistics
Statistic Description ArchiveTotalEvents Total number of data points received by the data store.
This option is specific only to data stores.
ArchiveTotalOutOfOrder Total number of data points received by the server out of time order with the current value.
This option is specific only to data stores.
ArchiveAverageEventRate Average events processed per minute.
This option is specific only to data stores.
ArchiveMinimumEventRate Minimum events processed per minute.
This option is specific only to data stores.
ArchiveMaximumEventRate Maximum events processed per minute.
This option is specific only to data stores.
ArchiveWriteCacheHitRatio Hit Ratio To Write Cache.
This option is specific only to data stores.
ArchiveAverageCompressionRatio Average compression ratio for all tags.
This option is specific only to data stores.
ArchiveMinimumCompressionRatio Minimum compression ratio for any tag.
This option is specific only to data stores.
ArchiveTotalFailedWrites Total number of refused write attempts by any connection.
This option is specific only to data stores.
ArchiveTotalMessages Total number of non-alert messages generated.
This option is specific only to data stores.
ArchiveTotalAlerts Total number of alert messages generated.
This option is specific only to data stores.
ArchiveFreeSpace Amount of free space (MB) in the current archive.
This option is specific only to data stores.
ArchiveSpaceConsumptionRate Current free space consumption rate (MB/Day).
This option is specific only to data stores.
ArchivePredictedDaysToFull Predicted days to archive full.
This option is specific only to data stores.
ArchiveSpaceEfficiency Efficiency of archive space utilization.
This option is specific only to data stores.
ArchiveAverageEventRateArray An array of archiver received rates used to make the trend.
This option is specific only to data stores.
ArchiveAverageAlarmRate Displays the rate at which Historian is receiving alarms and events data.
This option is specific only to data stores.
ArchiveTotalAlarm The rate at which Historian is receiving data.
This option is specific only to data stores.
Syntax
object.PerformanceDSStatistics
Parameters
None
Remarks
PerformanceDSStatistics is a read-only property of type Collection of Variant.
- PerformanceStatistics (Archives Object)
-
Exposes performance statistics for the Product Archiver. These statistics are updated periodically.
The Product server and new current values are automatically reported to the client and updated in the PerformanceStatistics collection.
Syntax
object.PerformanceStatistics
Parameters
None
Remarks
PerformanceStatistics is a read-only property of type Collection of Variant.
- PerformanceStatistics Property (Archives Object)
-
Exposes performance statistics for the Historian Archiver. These statistics are updated periodically. The Historian server and new current values are automatically reported to the client and updated in the PerformanceStatistics collection.
The following table describes each of the performance statistics and their purpose.
Archives Performance Statistics
Statistic Description ArchiveTotalOutOfOrder Total number of data points received by the server out of time order with the current value.
This option is specific only to data stores.
ArchiveAverageEventRate Average events processed per minute.
This option is specific only to data stores.
ArchiveMinimumEventRate Minimum events processed per minute.
This option is specific only to data stores.
ArchiveMaximumEventRate Maximum events processed per minute.
This option is specific only to data stores.
ArchiveWriteCacheHitRatio Hit Ratio To Write Cache.
This option is specific only to data stores.
ArchiveAverageCompressionRatio Average compression ratio for all tags.
This option is specific only to data stores.
ArchiveMinimumCompressionRatio Minimum compression ratio for any tag.
This option is specific only to data stores.
ArchiveTotalFailedWrites Total number of refused write attempts by any connection.
This option is specific only to data stores.
ArchiveTotalMessages Total number of non-alert messages generated.
This option is specific only to data stores.
ArchiveTotalAlerts Total number of alert messages generated.
This option is specific only to data stores.
ArchiveFreeSpace Amount of free space (MB) in the current archive.
This option is specific only to data stores.
ArchiveSpaceConsumptionRate Current free space consumption rate (MB/Day).
This option is specific only to data stores.
ArchivePredictedDaysToFull Predicted days to archive full.
This option is specific only to data stores.
ArchiveSpaceEfficiency Efficiency of archive space utilization.
This option is specific only to data stores.
ArchiveAverageEventRateArray An array of archiver received rates used to make the trend.
This option is specific only to data stores.
ArchiveAverageAlarmRate Displays the rate at which Historian is receiving alarms and events data.
This option is specific only to data stores.
ArchiveTotalAlarm The rate at which Historian is receiving data.
This option is specific only to data stores.
Syntax
object.PerformanceStatistics[AsLocalizedString])
Parameters
Name Data Type Description StatisticName String Name of the statistic to retrieve (read-only). AsLocalizedString Boolean Whether to return the statistic value(s) as a localized string (optional, default = True, read-only). Remarks
PerformanceStatistics is a read-only property of type Collection of Variant.
Example
Dim TheStatistic As Variant ' Get The Overall Compression Performance Statistic TheStatistic = MyArchives.PerformanceStatistics("ArchiveAverageCompressionRatio")
- PerformanceStatistics Property (Collector Object)
-
Exposes performance statistics for the selected collector.
The following table describes each of the performance statistics and their purpose.
Collector Performance Statistics
Statistic Description
CollectorTotalEventsCollected Total Values Collected CollectorTotalEventsReported Total Values Reported To Server. CollectorOutOfOrderEvents Total Events Out Of Timestamp Order. CollectorAverageEventRate Average Events Reported / Minute. CollectorMinimumEventRate Minimum Events Reported / Minute. CollectorMaximumEventRate Maximum Events Reported / Minute. CollectorReportRatio Ratio Of Events Collected To Events Reported. CollectorCompressionPercent The percent of data compressed by the collector. CollectorMisses The data that are missed by the collector due to missing scheduled collection times. Also called Overruns. Syntax
object.PerformanceStatistics(StatisticName,[AsLocalizedString])
Parameters
Name Data Type Description StatisticName Variant Name of the statistic to retrieve (read-only). AsLocalizedString Boolean Whether to return the statistic value(s) as a localized string (optional, default = True, read-only). Example
Dim TheStatistic As Variant ' Get The Overall Compression Performance Statistic TheStatistic = MyCollector.PerformanceStatistics("CollectorEventRate")
- PrimaryUsername Property (DataComments Object)
-
Returns the user who added the comment to the archive.
Syntax
object.PrimaryUsername
Parameters
None
Remarks
PrimaryUsername is a read-only property of type String.
Example
Debug.Print "Comment added by: " + MyValue.Comments(1).PrimaryUsername
- PrincipalCollector Property (Collector Object)
-
The name of the collector this collector is backing up. If the principal collector is not responding this collector is next in line to become active.
Syntax
object.PrincipalCollector[ = String]
Parameters
None
- PropertyList Property (Archives Object)
-
This function returns a list of the supported Archive properties.
Syntax
object.PropertyList
Parameters
None
- PropertyList Property (Collectors Object)
-
Returns a list of the available collector properties. This is a complete list across all collector types. A given collector may ignore certain properties if they do not apply.
Syntax
object.PropertyList
Parameters
None
- PropertyList Property (Data Object)
-
This function returns a list of the available Properties of a Data value.
Syntax
object.PropertyList([ExcludeRaw], [ExcludeAlarms])
Parameters
Name Data Type Description ExcludeRaw Boolean Whether to exclude the PercentGood property (optional, default = False). ExcludeAlarms Boolean Whether to exclude the Alarm Message and Alarm ID properties (optional, default = False). - PropertyList Property (Messages Object)
-
Returns a list of available Properties for a message.
Syntax
object.PropertyList
Parameters
None
- PropertyList Property (Tags Object)
-
Returns a list of valid Properties for a Tag.
Syntax
object.PropertyList
Parameters
None
- QueryModifiers Property (QueryModifiers Object)
-
Returns or sets the QueryModifiers to be used during the DataRecordset query.
Syntax
object.QueryModifiers
Set resQueryModifiers ConnectedServer.CriteriaFromStrings(txtQueryModifier.Text) .Criteria.QueryModifiers = resQueryModifiers.QueryModifiers
Property Reference Q-R
- R
- RawValue Property (Option Object)
-
The raw numeric value of this option.
Syntax
object.RawValue[ = Double]
Parameters
None
- ReadOnly Property (Archive Object)
-
Returns or sets the ReadOnly status of the specified archive. If you attempt to set the current archive to ReadOnly (the archive receiving newest data), an error is generated.
Syntaxobject.ReadOnly[ = Boolean]
ParametersNone
Example' Set Archive To ReadOnly MyArchive.ReadOnly = True ' Reset Archive ReadOnly Status MyArchive.ReadOnly = False
- ReadSecurityGroup Property (Tag Object)
-
RReturns or sets the name of the security group controlling the reading of data for the Tag. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntaxobject.ReadSecurityGroup[ = String]
ParametersNone
- ReadSecurityGroup Property (TagCriteria Object)
-
Returns or sets the ReadOnly status of the specified archive. If you attempt to set the current archive to ReadOnly (the archive receiving newest data), an error is generated.
Syntaxobject.ReadSecurityGroup[ = String]
ParametersNone
ExampleWith MyRecordset.Criteria .TagName = "*.F_CV" .ReadSecurityGroup = "Power Users" End With
- ReadSecurityGroup Property (TagFields Object)
-
Determines whether the ReadSecurityGroup field should be returned in the TagRecordset query.
Syntaxobject.ReadSecurityGroup[ = Boolean]
ParametersNone
ExampleWith MyRecordset.Fields .Clear .TagName = True .Description = True .ReadSecurityGroup = True .WriteSecurityGroup = True .AdministratorSecurityGroup = True End With
- ReadSecurityGroupSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntaxobject.ReadSecurityGroup[ = Boolean]
ParametersNone
- ReadSecurityGroupUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntaxobject.ReadSecurityGroupUpdated[ = Boolean]
ParametersNone
- RedundancyEnabled Property (Collector Object)
-
Returns or sets whether the collector is part of a redundant configuration.
Syntaxobject.RedundancyEnabled[ = Boolean]
ParametersNone
- Running Property (Collector Object)
-
Returns or sets the running state of the specified Collector. Use this property to pause and resume collection without restarting and stopping the collector.
Syntaxobject.Running[ = Boolean]
ParametersNone
Example
' Resume the collector MyCollector.Running = True ' Pause the collector MyCollector.Running = False
Property Reference S-T
S
- SamplingDirectionList Property (Data Object)
-
This function returns a list of the available Sampling directions for a data request.
Syntax
object.SamplingDirectionList
Parameters
None
- SamplingInterval Property (DataCriteria Object)
-
Returns or sets the interval (in milliseconds) between samples from the archive in the DataRecordset query. For the "RawByNumber" and "RawByTime" sampling modes, the SamplingInterval is ignored. This property can be used in place of the NumberofSamples property.
Syntax
object.SamplingInterval[=Long]
Parameters
None
- SamplingIntervalSet Property (DataCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.SamplingIntervalSet[=Boolean]
Parameters
None
- SamplingMode Property (DataCriteria Object)
-
Returns or sets the mode of sampling data from the archive by the DataRecordset query.
The following table details the available sampling modes:
Name Description Value CurrentValue Retrieves the current value, the time frame criteria are ignored. 1 Interpolated Retrieves evenly spaced interpolated values based on NumberOfSamples and the time frame criteria. 2 Trend Retrieves the raw minimum and raw maximum value for each specified interval. Use the Trend sampling mode to maximize performance when retrieving data points for plotting. A start time, end time, and an interval or number of samples must be specified. 3 RawByTime Retrieves raw archive values (compressed) based on time frame criteria. 4 RawByNumber Retrieves raw archive values (compressed) based on the StartTime criteria, the NumberOfSamples, and Direction criteria. Note the EndTime criteria is ignored for this Sampling mode. 5 Calculated Retrieves evenly spaced calculated values based on NumberOfSamples, the time frame criteria, and the CalculationMode criteria. 6 Lab The Lab sampling mode only returns the collected values, without any interpolation of the value. The collected value is repeated for each interval until there is a change in the raw data sample's value.
Lab sampling is most often used to create a step chart rather than a smooth curve.
Use Lab sampling instead of interpolated if you only want true collected values returned. The Lab sampling mode is generally not useful on highly compressed data. Use interpolated sampling instead.
7 InterpolatedtoRaw When you request interpolated data, you specify an interval or number of samples. If the actual stored number of raw samples is greater than required, you will get interpolated data as described above. If the actual number of stored samples are less than the required, then you will get the raw samples. In this way, the needs of trending detail and application load are balanced.
This mode is best used when querying compressed data because the Data Archiver can switch to the more efficient raw data query.
8 TrendtoRaw TrendtoRaw retrieves raw data between a given intervals when the actual data samples are fewer than the requested number of samples. 9 LabtoRaw LabtoRaw is an extension to Lab mode of sampling and similar to InterpolatedtoRaw mode where you will be switched to raw data or lab when the actual data samples are fewer than the requested samples. 10 RawByFilterToggle RawByFilterToggle returns filtered time ranges. The values returned are 0 and 1. If the value is 1, then the condition is true and 0 means false.
This sampling mode is used with the time range and filter tag condition. The result starts with a starting time stamp and ends with an ending timestamp.
11 Syntax
object.SamplingMode[=iHistorian_SDK.ihSamplingMode]
Parameters
None
- SamplingModeList Property (Data Object)
-
This function returns a list of the available Sampling Modes for Data.
Syntax
object.SamplingModeList([ExcludeRaw])
Parameters
Name Data Type Description ExcludeRaw Boolean Whether to exclude raw sampling modes (optional, default = False). - SamplingModeSet Property (DataCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.SamplingModeSet[ = Boolean]
Parameters
None
- SecondaryUsername Property (DataComments Object)
-
Returns the user who signed the comment when it was added to the archive.
Syntax
object.SecondaryUsername
Parameters
None
Remarks
SecondaryUserName is a read-only property of type String.
Example
Debug.Print "Comment signed by:"+MyValue.Comments(1).SecondaryUsername
- SecurityGroupList Property (Server Object)
-
Returns the list of security groups from the current server. Security groups determine the system functions permitted by users within the group.
Syntax
object.SecurityGroupList
Parameters
None
Remarks
SecurityGroupList is a read-only property of type Variant.
- SecurityGroupLocation Property (Server Object)
-
Returns or sets the location of the security groups used by the server. The Historian server can either use security groups assigned to the local server computer ("Local" location) or groups configured for the domain ("Domain" location). Note, changing the SecurityGroupLocation requires a server restart to take effect.
Syntax
object.SecurityGroupLocation[ = String]
Parameters
None
- Selected Property (Tag Object)
-
Returns whether or not this tag is selected.
Syntax
object.Selected[ = Boolean]
Parameters
None
- Server Property (Archive Object)
-
Returns the server associated with the Archive object.
Syntax
object.Server
Parameters
None
Remarks
Server is a read-only property of type Server.
Example
Dim ServerName As String ' Get The Name Of The Server ServerName = MyArchive.Server.ServerName
- Server Property (Archives Object)
-
Returns the Server associated with the Archives object.
Syntax
object.Server
Parameters
None
Remarks
Server is a read-only property of type Server.
Example
Dim ServerName As String ' Get The Name Of The Server ServerName = MyArchives.Server.ServerName
- Server Property (Collector Object)
-
Returns the Server associated with the Collector Object.
Syntax
object.Server
Parameters
None
Remarks
Server is a read-only property of type Server.
Example
Dim ServerName As String ' Get The Name Of The Server ServerName = MyCollector.Server.ServerName
- Server Property (Collectors Object)
-
Returns the Server associated with the Collectors object.
Syntax
object.Server
Parameters
None
Remarks
Server is a read-only property of type Server.
Example
Dim ServerName As String ' Get The Name Of The Server ServerName = MyCollectors.Server.ServerName
- Server Property (Data Object)
-
Returns the server associated with the Data object.
Syntax
object.Server
Parameters
None
Remarks
Server is a read-only property of type Server.
Example
Dim ServerName As String ' Get The Name Of The Server ServerName = MyDataServer.Server.ServerName
- Server Property (DataRecordset Object)
-
Returns the Server associated with the DataRecordset object.
Syntax
object.Server
Parameters
None
Remarks
Server is a read-only property of type Server.
Example
Dim ServerName As String ' Get The Name Of The Server ServerName = MyRecordset.Server.ServerName
- Server Property (DataStores Object)
-
Returns the Server associated with the DataRecordset object.
Syntax
object.Server() As Server
Parameters
None
Remarks
Server is a read-only property of type Server.
- Server Property (MessageRecordset Object)
-
Returns the Server associated with the DataRecordset object.
Syntax
object.Server
Parameters
None
Remarks
Server is a read-only property of type Server.
Example
Dim ServerName As String ' Get the name of the server ServerName = MyRecordset.Server.ServerName
- Server Property (Messages Object)
-
Returns the Server associated with the Messages object.
Syntax
object.Server
Parameters
None
Remarks
Server is a read-only property of type Server.
Example
Dim ServerName As String ' Get The Name Of The Server ServerName = MyMessages.Server.ServerName
- Server Property (TagRecordset Object)
-
Returns the Server associated with the TagRecordset object.
Syntax
object.Server
Parameters
None
Remarks
Server is a read-only property of type Server.
Example
Dim ServerName As String ' Get the name of the server ServerName = MyRecordset.Server.ServerName
- Server Property (Tags Object)
-
Returns the Server associated with the Tags Object.
Syntax
object.Server
Parameters
None
Remarks
Server is a read-only property of type Server.
Example
Dim ServerName As String ' Get the name of the server ServerName = MyTags.Server.ServerName
- ServerName Property (Server Object)
-
Returns the name of the computer that the server is running on.
Syntax
object.ServerName[ = String]
Parameters
None
Remarks
Server is a read-only property of type String.
- ServerName Property (Server Object)
-
Returns the name of the computer that the server is running on.
Syntax
object.ServerName[ = String]
Parameters
None
Remarks
Server is a read-only property of type String.
- ServerTime Property (Server Object)
-
Returns the current time on the connected server. The system then converts the time from UTC into formatted time based on the ConnectionOptions (TimeOption) setting.
Syntax
object.ServerTime
Parameters
None
- Servers Property (ServerManager Object)
-
Maintains a list of registered servers on the client. To connect a listed server, use the Connect Method of a selected Server Object.
Syntax
object.Servers
Parameters
None
- SetName Property (EnumeratedSets Object)
-
Returns or defines the name of an Enumerated Set.
Syntax
object.SetName
Parameters
None
Returns
String
- SimpleEvents Property (OPCFilters Object)
-
Returns the list of Simple Event Categories being filtered on the Alarm Collector. This list is only applied if isSimpleEventsOn(true) has been called.
Syntax
object.SimpleEvents
Parameters
None
- SourceAddress Property (Tag Object)
-
Returns or sets the address used to identify the Tag in the data source. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.SourceAddress[ = String]
Parameters
None
- SourceAddress Property (TagCriteria Object)
-
Sets the tag source address to search for in the TagRecordset query.
Syntax
object.SourceAddress[ = String]
Parameters
None
- SourceAddress Property (TagFields Object)
-
Determines whether the SourceAddress field should be returned in the TagRecordset query.
Syntax
object.SourceAddress[ = Boolean]
Parameters
None
- SourceAddressSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.SourceAddressSet[ = Boolean]
Parameters
None
- SourceAddressUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.SourceAddressUpdated[ = Boolean]
Parameters
None
- Sources Property (OPCFilters Object)
-
Returns a list of the Sources selected for collection. This list is only applied when isSourceFiltering (true) has been called.
Syntax
object.Sources[ = Boolean]
Parameters
None
- SpikeLogic Property (Tag Object)
-
Returns or sets whether this tag uses the spike logic compression algorithm.
Syntax
object.SpikeLogic[ = Boolean]
Parameters
None
- SpikeLogic Property (TagCriteria Object)
-
Sets the spike logic to search for in the TagRecordset query.
Syntax
object.SpikeLogic[ = Boolean]
Parameters
None
- SpikeLogic Property (TagFields Object)
-
Determines whether the SpikeLogic field should be returned in the TagRecordset query.
Syntax
object.SpikeLogic[ = Boolean]
Parameters
None
- SpikeLogicOverride Property (Tag Object)
-
Returns or sets whether this tag should use the its own Spike Logic setting or the default Collectors setting.
Syntax
object.SpikeLogicOverride[ = Boolean]
Parameters
None
- SpikeLogicOverride Property (TagCriteria Object)
-
Sets the spike logic override to search for in the TagRecordset query.
Syntax
object.SpikeLogicOverride[ = Boolean]
Parameters
None
- SpikeLogicOverride Property (TagFields Object)
-
Determines whether the SpikeLogicOverride field should be returned in the TagRecordset query.
Syntax
object.SpikeLogicOverride[ = Boolean]
Parameters
None
- SpikeLogicOverrideSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.SpikeLogicOverrideSet[ = Boolean]
Parameters
None
- SpikeLogicOverrideUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.SpikeLogicOverrideUpdated[ = Boolean]
Parameters
None
- SpikeLogicSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.SpikeLogicSet[ = Boolean]
Parameters
None
- SpikeLogicUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.SpikeLogicUpdated[ = Boolean]
Parameters
None
- StartTime Property (Archive Object)
-
Returns the start time of the specified archive. This represents the earliest timestamp for any sample contained in the archive.
Syntax
object.StartTime
Parameters
None
- StartTime Property (DataCriteria Object)
-
Returns or sets the start of the time range to retrieve data for in the DataRecordset query.
Syntax
object.StartTime[ = Date]
Parameters
None
- StartTime Property (MessageCriteria Object)
-
Establishes the start time of the MessageRecordset query.
Syntax
object.StartTime[ = Date]
Parameters
None
- StartTimeSet Property (DataCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.StartTimeSet[ = Boolean]
Parameters
None
- StartTimeSet Property (MessageCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.StartTimeSet[ = Boolean]
Parameters
None
- StartTimeShortcut Property (DataCriteria Object)
-
Returns or sets the start of the time range to retrieve data for in the DataRecordset query. Shortcuts are strings that define absolute or relative times.
The time shortcuts are the following:
Value Description (N)ow The current time (absolute). (T)oday Today at midnight (absolute). (Y)esterday Yesterday at midnight (absolute). (D)ays Number of Days (relative). (M)in Number of Minutes (relative). (H)our Number of Hours (relative). (W)eek Number of Weeks (relative). (BOM) Beginning of this month at Midnight (absolute). (EOM) Last Day of this month at Midnight (absolute). (BOY) First Day of this year at Midnight (absolute). (EOY) Last Day of this year at Midnight (absolute). Syntax
object.StartTimeShortcut[ = String]
Parameters
None
Example
With MyRecordset.Criteria .Tagmask = "*.F_CV" ' Start two days Ago at 8am in the morning .StartTimeShortcut = "Today-2d+8h" ' End this morning at 8am .EndTimeShortcut = "Today+8h" End With
- StartTimeShortcut Property (MessageCriteria Object)
-
Establishes the start time of the MessageRecordset Query by specifying a time shortcut string versus a date.
The time shortcuts are the following:
Value Description (N)ow The current time (absolute). (T)oday Today at midnight (absolute). (Y)esterday Yesterday at midnight (absolute). (D)ays Number of Days (relative). (M)in Number of Minutes (relative). (H)our Number of Hours (relative). (W)eek Number of Weeks (relative). (BOM) Beginning of this month at Midnight (absolute). (EOM) Last Day of this month at Midnight (absolute). (BOY) First Day of this year at Midnight (absolute). (EOY) Last Day of this year at Midnight (absolute). Syntax
object.StartTimeShortcut[ = String]
Parameters
None
Example
'Set A Start Time For Two Days Ago MyMessages.Criteria.StartTimeShortcut = "-2d"
- StartTimeShortcutSet Property (MessageCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.StartTimeShortcutSet[ = Boolean]
Parameters
None
- State Property (DataStore Object)
-
Returns or sets the state of data store. For example, Running.
Syntax
object.State
Parameters
None
Remarks
ihDataStoreState
- State Property (DataStore Object)
-
Returns or sets the state of data store. For example, Running.
Syntax
object.State
Parameters
None
Remarks
ihDataStoreState
- State Property (DataStore Object)
-
Returns or sets the state of data store. For example, Running.
Syntax
object.State
Parameters
None
Remarks
ihDataStoreState
- StateLowRawValue Property (EnumeratedState Object)
-
Returns or defines the minimum value of a state when you are using a range of values for a state. For example, if your state value is from 0 to 5 and it is defined as ON, then this would be 0.
Syntax
object.StateLowRawValue
Parameters
None
Remarks
Variant. Returns the low raw value of the state.
- StateValue Property (QueryModifiers Object)
-
Returns or sets the state value to be used when querying data with the StateCount and StateTime calculation modes.
Syntax
object.StateValue = value
- Status Property (Archive Object)
-
Returns the status of the specified Archive. This status is typically Current or Active.
Syntax
object.Status
Parameters
None
Remarks
Status is a read-only property of type String.
Example
' Print Out The Archive Status Debug.Print MyArchive.Status
- Status Property (Collector Object)
-
Returns the status of the specified Collector. This status is typically Running or Stopped.
Syntax
object.Status
Parameters
None
Remarks
Status is a read-only property of type String.
Example
' Print Out The Collector Status Debug.Print MyCollector.Status
- StepValue Property (Tag Object)
-
Returns or sets whether this tag is using Step Value or not.
Syntax
object.StepValue[ = Boolean]
Parameters
None
- StepValue Property (TagCriteria Object)
-
Sets the Step Value value to search for in the TagRecordset query.
Syntax
object.StepValue[ = Boolean]
Parameters
None
- StepValue Property (TagFields Object)
-
Determines whether the StepValue field should be returned in the TagRecordset query.
Syntax
object.StepValue[ = Boolean]
Parameters
None
- StepValueSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.StepValueSet[ = Boolean]
Parameters
None
- StepValueUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.StepValueUpdated[ = Boolean]
Parameters
None
- StorageType Property (DataStore Object)
-
Returns the type of data store. For example, ScadaBufferStore or Historical data store.
Syntax
object.StorageType
Parameters
None
Remarks
ihDataStorageType
- StoreMilliseconds Property (Tag Object)
-
Returns or sets the time resolution of the Tag. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.StoreMilliseconds[ = Boolean]
Parameters
None
- StoreMilliseconds Property (TagCriteria Object)
-
Sets the time resolution to search for in the TagRecordset query.
Syntax
object.StoreMilliseconds[ = Boolean]
Parameters
None
- StoreMilliseconds Property (TagFields Object)
-
Determines whether the StoreMilliseconds field should be returned in the TagRecordset query.
Syntax
object.StoreMilliseconds[ = Boolean]
Parameters
None
- StoreMillisecondsSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.StoreMilliseconds[ = Boolean]
Parameters
None
- StoreMillisecondsUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.StoreMillisecondsUpdated[ = Boolean]
Parameters
None
- StoreOPCQuality Property (Server Object)
-
Returns or sets whether the server stores the raw (16-bit) OPC quality flags.
Syntax
object.StoreOPCQuality[ = Boolean]
Parameters
None
- Strict Client Authentication Property
-
Returns or sets whether to enforce strict client authentication. Setting this value to TRUE will disallow connections from clients older than version 4.7.
Syntax
object.StrictClientAuthentication
Parameters
None
- Strict Collector Authentication (Archives Object)
-
Returns or sets whether to enforce strict client authentication. Setting this value to TRUE will disallow connections from clients older than version 4.7.
Syntax
object.StrictCollectorAuthentication
Parameters
None
- StringLength Property (Tag Object)
-
Returns or sets the fixed string length associated with a fixed string type Tag. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.StringLength[ = Byte]
Parameters
None
- StringLength Property (TagFields Object)
-
Determines whether the StringLength field should be returned in the TagRecordset query.
Syntax
object.StringLength[ = Boolean]
Parameters
None
- StringLengthSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.StringLengthSet[ = Boolean]
Parameters
None
- StringLengthUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.StringLengthUpdated[ = Boolean]
Parameters
None
- SubscribeStatus Property (Archives Object)
-
Subscribes to changes in Archive status and configuration. The Historian server publishes messages to any client signed up for Archive status changes as modifications are committed to the Archive Database. Setting the SubscribeStatus to True signs up for status and configuration changes on all archives.
Status and configuration changes are reported asynchronously to the client through the Status_Received event of the Archives object.
Syntax
object.SubscribeStatus[ = Boolean]
Parameters
None
Example
' Subscribe To Archive Status Updates MyArchives.SubscribeStatus = True ' Unsubscribe To Archive Status Updates MyArchives.SubscribeStatus = False
- SubscribeStatus Property (Collectors Object)
-
Subscribes to changes in Collector status and configuration. The Historian server publishes messages to any client signed up for Collector status changes as modifications are committed to the Collector database. Setting the SubscribeStatus to True will sign up for status and configuration changes on all Collectors.
Status and configuration changes are reported asynchronously to the client through the Status_Received event of the Collectors object.
Syntax
object.SubscribeStatus[ = Boolean]
Parameters
None
Example
' Subscribe To Collector Status Updates MyCollectors.SubscribeStatus = True ' Unsubscribe To Collector Status Updates MyCollectors.SubscribeStatus = False
- Substitutions Property (Message Object)
-
Returns the variable text of a message such as timestamps, usernames, and tagnames.
Syntax
object.Substitutions
Parameters
None
Remarks
Substitutions is a read-only property of type String.
Example
Dim MySubstitutions As Collection Dim I As Integer Set MySubstitutions = MyMessage.Substitutions For I = 1 To MySubstitutions.count Debug.Print MySubstitutions(I) Next I
- Substitutions Property (MessageFields Object)
-
Determines whether the Substitutions should be returned in the MessageRecordset query.
Syntax
object.Substitutions[ = Boolean]
Parameters
None
Example
Dim MyMessages As iHistorian_SDK.MessageRecordset Set MyMessages = GetServer.Messages.NewRecordset With MyMessages.Fields .Topic = True .TimeStamp = True .MessageString = True .Substitutions = True End With
- T
- Tagmask Property (DataCriteria Object)
- Returns or sets a mask of tags to retrieve data for in the DataRecordset query. The tag mask may include wildcard characters including the "*" and "?".
Syntax
object.Tagmask[ = String]
Parameters
None
T
- TagmaskSet Property (DataCriteria Object)
A flag to indicate whether this property has been set or not.
Syntax
object.TagmaskSet[ = Boolean]
Parameters
None
- Tagname Property (Tag Object)
-
Returns the Tagname property of the Tag. Tagname is a read-only property.
Syntax
object.Tagname[ = String]
Parameters
None
Remarks
Tagname is a read-only property of type String.
- Tagname Property (Tag Object)
-
Returns the Tagname property of the Tag. Tagname is a read-only property.
Syntax
object.Tagname[ = String]
Parameters
None
Remarks
Tagname is a read-only property of type String.
- Tagname Property (TagCriteria Object)
-
Sets the Tagname or tag mask to search for in the TagRecordset query. The Tagname may include wildcard characters.
Syntax
object.Tagname[ = String]
Parameters
None
- Tagname Property (TagFields Object)
-
Determines whether the Tagname field should be returned in the TagRecordset query.
Syntax
object.Tagname[ = Boolean]
Parameters
None
- TagnameSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.TagnameSet[ = Boolean]
Parameters
None
- TagnameUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.TagnameUpdated[ = Boolean]
Parameters
None
- Tags Property (DataCriteria Object)
-
Returns or sets an array of Tagnames to retrieve data for in the DataRecordset query.
Syntax
object.Tags[ = Variant]
Parameters
None
- Tags Property (DataRecordset Object)
-
Exposes the list of Tagnames associated with the collection of DataValue results maintained in the DataRecordset object. The Item property takes a tagname or tag index as a parameter to expose the collection of DataValues for that tag. The first collection of DataValues in the Item property.
Syntax
object.Tags
Parameters
None
Remarks
Tags is a read-only property of type Collection of String.
- Tags Property (Server Object)
-
Returns the Tags object for the current server, but only if the authenticated user is a member of the Historian tag administrators group.
Syntax
object.Tags
Parameters
None
- TagsSet Property (DataCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.TagsSet[ = Boolean]
Parameters
None
- TimeStamp Property (DataFields Object)
-
Determines whether the Timestamp field should be returned in the DataRecordset query.
Syntax
object.TimeStamp[ = Boolean]
Parameters
None
- TimeStamp Property (DataValue Object)
-
Returns the timestamp of the DataValue in a localized time.
Syntax
object.TimeStamp
Parameters
None
Remarks
TimeStamp is a read-only property of type Date.
- TimeStamp Property (Message Object)
-
Returns the time the Message was created.
Syntax
object.TimeStamp[ = Date]
Parameters
None
Remarks
TimeStamp is a writeable property of type Date.
- TimeStamp Property (MessageFields Object)
-
Determines whether the TimeStamp field should be returned in the MessageRecordset query.
Syntax
object.TimeStamp[ = Boolean]
Parameters
None
- TimeStampType Property (Tag Object)
-
Returns or sets the type of time stamping applied to data at collection time.
Name Description Value Source New values take timestamp from data source. 1 Collector New values are timestamped by Collector. 2 Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.TimeStampType[ = ihTimeStampType]
Parameters
None
- TimeStampType Property (TagCriteria Object)
-
Sets the timestamp type to search for in the TagRecordset query.
Syntax
object.TimeStampType[ = Boolean]
Parameters
None
- TimeStampType Property (TagFields Object)
-
Determines whether the TimeStampType field should be returned in the TagRecordset query.
Syntax
object.TimeStampType[ = Boolean]
Parameters
None
- TimeStampTypeSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.TimeStampTypeSet[ = Boolean]
Parameters
None
- TimeStampTypeUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.TimeStampTypeUpdated[ = Boolean]
Parameters
None
- TimeZoneBias Property (Tag Object)
-
Returns or sets the time zone bias for the tag. Time zone bias is used to indicate the natural time zone of the tag expressed as an offset from GMT in minutes. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.TimeZoneBias[ = Long]
Parameters
None
- TimeZoneBias Property (TagCriteria Object)
-
Sets the time zone bias to search for in the TagRecordset query.
Syntax
object.TimeZoneBias[ = Long]
Parameters
None
- TimeZoneBias Property (TagFields Object)
-
Determines whether the TimeZoneBias field should be returned in the TagRecordset query.
Syntax
object.TimeZoneBias[ = Boolean]
Parameters
None
- TimeZoneBiasUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.TimeZoneBiasUpdated[ = Boolean]
Parameters
None
- TimeZoneBiasSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.TimeZoneBiasSet[ = Boolean]
Parameters
None
- TimestampTypeList Property (Tags Object)
-
Returns a list of the valid Timestamp types available in Historian.
Syntax
object.TimestampTypeList
Parameters
None
- Topic Property (Message Object)
-
Returns the Topic Number of the Message.
Syntax
object.Topic[ = ihMessageTopic]
Parameters
None
Remarks
Topic is a writeable property of type ihMessageTopic.
Example
If MyMessage.Topic = ihMessageTopic.General Then Debug.Print "This is a General Message" End If
- Topic Property (MessageCriteria Object)
-
Establishes which Topic the MessageRecordset query will filter by.
Syntax
object.Topic[ = ihMessageTopic]
Parameters
None
Remarks
Topic is a writeable property of type ihMessageTopic.
Example
MyMessages.Criteria.Topic = ihMessageTopic.General
- Topic Property (MessageFields Object)
-
Determines whether the Topic field should be returned in the MessageRecordset query.
Syntax
object.Topic[ = Boolean]
Parameters
None
Remarks
Topic is a writeable property of type ihMessageTopic.
Example
Dim MyMessages As iHistorian_SDK.MessageRecordset Set MyMessages = GetServer.Messages.NewRecordset With MyMessages.Fields .Topic = True End With
- TopicList Property (Messages Object)
-
Returns a list of available Topics.
Syntax
object.TopicList([IncludeMessages], [IncludeAlerts])
Parameters
Name Data Type Description IncludeMessages Boolean Indicates whether Message topics should be included in the returned list IncludeAlerts Boolean Indicates whether Alert topics should be included in the returned list - TopicName Property (Message Object)
-
Returns the Topic Name of the Message.
Syntax
object.TopicName
Parameters
None
Remarks
Topic is a writeable property of type String.
Example
Debug.Print "This is a " + MyMessage.TopicName + " message."
- TopicSet Property (MessageCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.TopicSet[ = Boolean]
Parameters
None
- TrackingEvents Property (OPCFilters Object)
-
Returns the list of Tracking Event Categories being filtered on the Alarm Collector. This list is only applied if isTrackingEventsOn(true) has been called.
Syntax
object.TrackingEvents
Parameters
None
Property Reference U-V
U
- UserName Property (Message Object)
-
Returns the username who generated the message, or who the message is associated with.
Syntax
object.UserName[ = String]
Parameters
None
Remarks
UserName is a writeable property of type String.
- UserName Property (MessageFields Object)
-
Determines whether the UserName field should be returned in the MessageRecordset query.
Syntax
object.UserName[ = Boolean]
Parameters
None
- UserName Property (Server Object)
-
Returns the name of the currently authenticated user for the server.
Syntax
object.UserName
Parameters
None
- UsernameSet Property (MessageCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.UserNameSet[ = Boolean]
Parameters
None
V
- Value Property (DataFields Object)
-
Determines whether the Value field should be returned in the DataRecordset query.
Syntax
object.Value[ = Boolean]
Parameters
None
- Value Property (DataValue Object)
-
Returns or sets the value of the DataValue.
Syntax
object.Value[ = Variant]
Parameters
None
- Value Property (Option Object)
-
The value parameter of this option expressed as a localized string.
Syntax
object.Value[ = Variant]
Parameters
None
- Version Property (Server Object)
-
Returns the server or client version number.
Syntax
object.Version([API])
Parameters
Name Data Type Description API Boolean When True, the server version is returned. When False, the client version is returned. The default is False. '
When connecting to an Historian v1.0 server and passing True, Historian returns "Unknown" for the version number.
- Remarks
-
Version is a read-only property of type String.
Property Reference W-Z
W
- WatchdogTag Property (Collector Object)
-
Returns or sets the collector redundancy watchdog tag name.
Syntax
object.WatchdogTag[ = String]
Parameters
None
- WatchdogValueMaxUnchangedPeriod Property (Collector Object)
-
Returns or sets the time in seconds when the collector should automatically failover if a raw sample is not received for the watchdog tag from the primary collector. Use with FailoverOnValueUnchanged property.
Syntax
object.WatchdogValueMaxUnchangedPeriod[ = Long]
Parameters
None
- WriteSecurityGroup Property (Tag Object)
-
Sets the name of the security group controlling the writing of data for the Tag. Changes to tag properties are not committed until you call the WriteRecordset method of the TagRecordset object.
Syntax
object.WriteSecurityGroup[ = String]
Parameters
None
- WriteSecurityGroup Property (TagCriteria Object)
-
Sets the write security group to search for in the TagRecordset query.
Syntax
object.WriteSecurityGroup[ = String]
Parameters
None
- WriteSecurityGroup Property (TagFields Object)
-
Determines whether the WriteSecurityGroup field should be returned in the TagRecordset query.
Syntax
object.WriteSecurityGroup[ = Boolean]
Parameters
None
- WriteSecurityGroupSet Property (TagCriteria Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.WriteSecurityGroupSet[ = Boolean]
Parameters
None
- WriteSecurityGroupUpdated Property (Tag Object)
-
A flag to indicate whether this property has been set or not.
Syntax
object.WriteSecurityGroupUpdated[ = Boolean]
Parameters
None
Method Reference A-B
- APIStatusToString Method (Server Object)
-
Converts a status ID into a string.
Syntax
object.APIStatusToString(nStatus, bHRESULT)
Table 4. Parameters Name Data Type Description nStatus Long The status ID to be converted. bHRESULT Boolean If true, then the status ID is an HRESULT; otherwise, it is an APIStatus. Returns
String. The translation of the status code.
- Add Method (Archives Object)
-
Adds a new archive with the specified characteristics to the Historian server. You can also use this method to add an existing archive file to the archives collection to restore an archive.
Specify the FileLocation in the context of the Historian server machine drive and directory structure. If the specified FileLocation points to an existing valid Historian archive, the method effectively re-registers this archive and automatically loads it. Use this method when you return a previously unloaded archive to the system.
Since the Add request is synchronous, it immediately creates a new Archive object on the Historian server and another one in the Archives collection on the client.
Syntax
object.Add(ArchiveName As String, FileLocation As String, FileSize As Long, ArchiveDataStoreName As String)
Table 5. Parameters Name Data Type Description ArchiveName String Name of the archive to add (Read-Only). FileLocation String Fully qualified name of the archive file (Read-Only). FileSize Long Size of archive in MB (Read-Only). ArchiveDataStoreName String Name of the archive data store the archive belongs to. This is an optional parameter. Returns
Archive. The newly added Archive object or Nothing.
- Add Method (Collectors Object)
-
Adds a new collector with the specified name to the Historian server. The collector name must be unique in a given Historian server.
Since the Add request is synchronous, it immediately creates a new Collector Object on the Historian server and another one in the Collectors collection on the client.
Syntax
object.Add(CollectorName)
Table 6. Parameters Name Data Type CollectorName String Name of the new collector to add. (Read-only) Returns
Collector. Returns a reference to the newly created Collector object.
- Add Method (DataRecordset Object)
-
Adds a new blank DataValue record to the current DataRecordset for the specified tag. The DataValue is written to the server when the WriteRecordset method of the DataRecordset object is called. You can optionally specify the value of the record or specify it after creation by operating on the DataValue object.
Syntax
object.Add(Tagname, TimeStamp, [InValue])
Table 7. Parameters Name Data Type Definition Tagname String Tag to which you are adding a new data value (read-only). TimeStamp Date Timestamp to add value at (read-only). InValue DataValue New value (optional). Returns
DataValue. Returns a reference to the newly created data value.
- Add Method (DataStores Object)
-
Adds a data store.
Syntax
object.Add(MyDataStoreName,MyDefaultDS, MyDataStoreType, MyDataStoreDescription)
Table 8. Parameters Name Data Type DataStoreName String Indicates the name of the data store. IsDefault Boolean Indicates whether the data store is the default data store. DataStoreType String Indicates the type of the data store: Historical, User, or SCADA buffer. Description String The description provided for the data store. Returns
DataStore.
- Add Method (EnumeratedSets Object)
-
Adds an enumerated set to the Enumerated Sets collection. The enumerated set is not added to the Historian Server until the SaveSet Method is called.
Syntax
object.Add(MySet)
Table 9. Parameters Name Data Type Description MySet EnumeratedSet The set that has to be added. Returns
None.
- Add Method (EnumeratedStates Object)
-
Adds an enumerated state to the enumerated set collection. The enumerated state is not added to the Historian Server until the SaveSet Method is called.
Syntax
Object.Add(MyState)
Table 10. Parameters Name Data Type Description MyState EnumeratedState The state that has to be added. Returns
None.
- Add Method (MessageRecordset Object)
-
Adds a new blank message record to the current MessageRecordset. The message is written to the server when the WriteRecordset method of the MessageRecordset object is called.
Syntax
object.Add
Parameters
None
Returns
The empty message that was added.
- Add Method (TagDependencies Object)
-
Adds a dependent Tag to the current calculation. The calculation will be triggered when the value of this tag changes.
Syntax
object.Add(Tagname)
Table 11. Parameters Name Data Type Description Tagname String Name of the tag to add Returns
Boolean. Whether the Add operation succeeded.
- Add Method (TagRecordset Object)
- Adds a new blank tag record to the current TagRecordset. The tag is written to the server when the WriteRecordset method of the TagRecordset object is called.
Syntax
object.Add(Tagname)
Table 12. Parameters Name Data Type Description Tagname String Name of the tag to add Returns
Returns a reference to the newly created tag.
- Add Method (UserDefinedtypeFields Object)
-
Adds multiple fields to the User Defined Type. The User Defined Type is not added to the Historian Server until the SaveSet Method is called.
Syntax
object.Add(MyField)
Table 13. Parameters Name Data Type Description MyField UserDefinedTypeField The field to be added. Returns
None.
- AddComment Method (DataValue Object)
-
Adds a comment to the current DataValue. If you supply a secondary username and password, the SDK authenticates the username and password before the committing the comment.
Syntax
object.AddComment(Comment, [DataTypeHint], [SecondaryUser], [SecondaryPassword])
Table 14. Parameters Name Data Type Description Comment Variant The comment to add. DataTypeHint String The name of the data type for the comment (optional, read-only). SecondaryUser String Supervisor's username to sign comment (optional, read-only). SecondaryPassword String Supervisor's password to sign comment (optional, read-only). Returns
Boolean. Returns True if the AddComment Method operation succeeded.
- AddEx Method (Archives Object)
-
Adds a new archive with the specified characteristics to the Historian server. You can also use this method to add an existing archive file to the archives collection to restore an archive.
Specify the FileLocation in the context of the Historian server machine drive and directory structure. If the specified FileLocation points to an existing valid Historian archive, the method effectively re-registers this archive and automatically loads it. Use this method when you return a previously unloaded archive to the system.
Since the Add request is synchronous, it immediately creates a new Archive object on the Historian server and another one in the Archives collection on the client.
The window pointed to by hWnd is kept alive (messages processed) while the archive is being added.
Syntax
object.AddEx(ArchiveName As String, FileLocation As String, FileSize As Long, hWnd As Long, ArchiveDataStoreName As String)
Table 15. Parameters Name Data Type Description ArchiveName String Name of the archive to add (Read-Only). FileLocation String Fully qualified name of the archive file (Read-Only). FileSize Long Size of archive in MB (Read-Only). hWnd Long The window handle to keep alive. ArchiveDataStoreName String Name of the archive data store the archive belongs to. This is an optional parameter. Returns
Archive. The newly added Archive object or Nothing.
- AddServer Method (ServerManager Object)
-
Registers a new server to the list of registered servers on the client. It makes an attempt to authenticate the connection based on the username and password supplied. If a username and password are not supplied, it assumes the user to be the currently authenticated domain user.
If it cannot authenticate the connection, because of incorrect user information or an invalid ServerName, the AddServer method returns False and does not register the supplied ServerName on the client.
Syntax
object.AddServer(ServerName, [UserName], [Password], [ConnectionTimeout])
Table 16. Parameters Name Data Type Description ServerName String Computer name of the Historian server (read-only). UserName String Username to authenticate (optional, read-only). Password String Password to authenticate (optional, read-only). ConnectionTimeout Long The maximum length of time clients should wait for messages from the server before concluding the server is unavailable (optional, read-only). Returns
Boolean. Returns True if the AddServer operation succeeded.
Example
Dim MyManager As New iHistorian_SDK.ServerManager Dim MyServer As iHistorian_SDK.Server ' Try to add the new server If MyManager.AddServer("USGB014") Then Set MyServer = MyManager.Servers("USGB014") Else err.Raise 1, , "Failed to authenticate new server" End If
- AlarmAttributesRecordSet Method (Alarms Object)
This function returns a list of all the Vendor Attributes in the Alarm Archiver.
Syntax
object.AlarmAttributesRecordSet
Parameters
None.
ReturnsAlarmAttributes. The AlarmAttributes object contains the list of vendor attributes.
- AlarmRecordSet Method (Alarms Object)
-
This function is used to query alarms or events from the archiver. This function takes one parameter, an AlarmOpenRecordSetInfo object, which specifies the query. The following sections describe how to populate this object to perform an Alarm or Event query.
AlarmOpenRecordSetInfo Parameter
This object contains details on what to select, and any filters for the query. After creating the object, you first specify which fields to select, and which fields to sort (SelectFields), and then specify any criteria/filter to apply (AlarmCriteria).
Create the object:
Dim myAlarmOpenRecordSetInfo As New AlarmOpenRecordSetInfo
Alarm Fields
The following is a list of the alarm fields that can be returned in the recordset, or used to sort or filter the recordset. These are used in the SelectFields and AlarmCriteria object (see below for more details).
Table 17. Option Data Type Description AlarmID Long The unique ID of the alarm or event in the Historian alarm database. ItemID String The OPC ItemID of the alarm. This contains the source address of the data access tag the alarm is associated with. This could contain a NULL value if the alarm is not associated with a tag. Source String This is the unique identifier used by the OPC AE Collector for the alarm or event. DataSource String The collector interface name associated with the alarm or event. Tagname String The Historian Tag Name associated with the alarm. The tag name will be NULL unless the tag is also collected by Historian. EventCategory String The OPC event category of the alarm or event. ConditionName String The OPC condition of the alarm. This does not apply to event data. This, combined with the Source, comprises an alarm. SubConditionName String The OPC sub-condition of the alarm. This does not apply to event data. This is the state of the alarm. StartTime Date The start time or time stamp of the alarm or event. EndTime Date The end time of the alarm. This does not apply to event data. AckTime Date The time the alarm was acknowledged. This does not apply to event data. Timestamp Date The time stamp of the alarm or event. Message String The message attached to the alarm or event. Acked Boolean Stores the acknowledgement status of the alarm. If the alarm is acknowledged, this will be set to TRUE. Severity Long The severity of the alarm or event. This is stored as an integer value with a range of 1-1000. Actor String The operator who acknowledged the alarm, or caused the tracking event. Quality String The quality of the alarm or event. AlarmOpenRecordSetInfo.SelectFields
Each of the fields above can be selected, or used to sort the alarm recordset. Fill in the AlarmOpenRecordSetInfo.SelectFields for each field, according to the following table.
Option Data Type Description Select Boolean True to select the field. OrderBy Boolean True to order by the field. OrderPriority Integer Relative priority compared to other field order priorities. Highest first. Ties are random. Descending Boolean True to sort descending. OrderBy must also be True. Example
Set up SelectFields to select the AlarmId and ItemId. Order by the AlarmId, then the ItemId.myAlarmOpenRecordSetInfo.SelectFields.AlarmId.Select = TRUE myAlarmOpenRecordSetInfo.SelectFields.AlarmId.OrderBy = TRUE myAlarmOpenRecordSetInfo.SelectFields.AlarmId.OrderPriority = 10 myAlarmOpenRecordSetInfo.SelectFields.ItemId.Select = TRUE myAlarmOpenRecordSetInfo.SelectFields.ItemId.OrderBy = TRUE myAlarmOpenRecordSetInfo.SelectFields.ItemId.OrderPriority = 20
The SelectFields object has one other field, AllFields, which can be used to select all fields.SelectFields.AllFields = TRUE
Choose Query Type
For all queries, the type of query should be specified. If it is not specified, the default is to return a record set containing the events. The query type is specified by setting the AlarmOpenRecordSetInfo.AlarmCriteria.AlarmType object.
Add filtersQuery Alarms: myAlarmOpenRecordSetInfo.AlarmType = ihALARM_CONDITION Query Events: myAlarmOpenRecordSetInfo.AlarmType = ihALARM_TRACKING Query Historical Alarm Transitions: myAlarmOpenRecordSetInfo.AlarmType = ihALARM_CONDITION_HIST
Similar to the SelectFields object, each field listed above (Alarm Fields) can have criteria associated with it. This criteria is used to filter the record set, so for example, you can ask for all alarms with severity greater than 500. The type of Criteria that can be applied is dependant on the Data Type of the field. The following table lists the available criteria:
For example, the Severity field is of type Long. Therefore, Min, Max, Equal, or NotEqual criteria can be specified for the severity. To query where severity is greater than 500:Field Data Type Criteria Types Integer/Long Min, Max, Equal, NotEqual Float Min, Max, Equal, NotEqual String StringMask Quality Min, Max, Equal, NotEqual myAlarmOpenRecordSetInfo.AlarmCriteria.SeverityCriteria.Min = 500
Specify Max Records
An optional criteria, MaxRecords, can be set to set the upper limit size of the recordset.
Example: Return the first 10 records:myAlarmOpenRecordSetInfo.AlarmCriteria.MaxRecords = 10
Note: To avoid having random rows returned, if you specify a MaxRecords criteria, you should generally also specify an Order By (see SelectFields above).Syntax
object.AlarmRecordSet(theAlarmOpenRecordSetInfo)
ReturnsTable 18. Parameters Name Data Type Description theAlarmOpenRecordSetInfo Variant See above for details. AlarmRecordset. An AlarmRecordset object, populated according the details specified in the AlarmOpenRecordSetInfo parameter.
Example
Dim MyServer As iHistorian_SDK.Server Set MyServer = GetServer Dim myAlarmOpenRecordSetInfo As AlarmOpenRecordSetInfo ' Select the last 100 alarms in the alarm history table myAlarmOpenRecordSetInfo.SelectFields.AllFields = True myAlarmOpenRecordSetInfo.SelectFields.Timestamp.OrderBy = True myAlarmOpenRecordSetInfo.SelectFields.Timestamp.Descending = True myAlarmOpenRecordSetInfo.AlarmCriteria.AlarmType = ihALARM_CONDITION_HIST myAlarmOpenRecordSetInfo.AlarmCriteria.MaxRecords = 100 Dim myAlarmRecordSet As AlarmRecordSet Set myAlarmRecordSet = MyServer.Alarms.AlarmRecordSet(myAlarmOpenRecordSetInfo)
- AllFields Method (DataFields Object)
-
Specifies that all DataFields should be returned in the DataRecordset query.
Syntax
Syntax object.AllFields
Parameters
None.
Returns
None.
- AllFields Method (MessageFields Object)
-
Specifies that all MessageFields should be returned in the MessageRecordset query.
Syntax
object.AllFields
Parameters
None.
Returns
None.
- AllFields Method (TagFields Object)
-
Sets all fields for retrieval in the TagRecordset query.
Syntax
object.AllFields
Parameters
None.
Returns
None.
- Backup Alarms Method
-
Backs up or saves a copy of the alarms to an offline file.
Syntax
object.BackupAlarms
Table 19. Parameters Name Data Type Description BackupFile String The file that stores the backup alarm data. StartTime Date Start time of the alarm data. EndTime Date End time of the alarm data. Returns
Boolean. Returns TRUE if the alarms are backed up.
ExampleDim Status As ihStatus Dim ReturnStatus As Boolean Dim AlarmsStartTime As ihTimeStruct Dim AlarmsEndTime As ihTimeStruct Status = ihSTATUS_FAILED ReturnStatus = False AlarmsStartTime = Date_To_UTC(StartTime) AlarmsEndTime = Date_To_UTC(EndTime) On Error GoTo errc Status = ihBackupAlarms(MyServer.Handle, BackupFile, AlarmsStartTime, AlarmsEndTime, 0) If Status <> ihSTATUS_OK Then err.Raise 1, , "Error while performing Backup alarms [" + ErrorDescription(Status) ReturnStatus = True BackupAlarms = ReturnStatus errc: zLastError = "Backup Alarms >> " + err.Description BackupAlarms = ReturnStatusEnd Function
- Backup Method (Archive Object)
-
Performs an online backup of the specified archive by stopping inbound data flow and copying an image of the specified archive into the file identified by the BackupFileName parameter.
When the online backup operation completes, the archive returns to normal operation and accepts inbound data flow.
Syntax
object.Backup(BackupFileName As String, Optional DataStoreName As String)
Table 20. Parameters Name Data Type Description BackupFileName String Fully qualified name of the backup file (read-only). DataStoreName String Name of the data store to which the backup file belongs. This is an optional parameter. Returns
Boolean. Returns whether or not the BackupFile operation succeeded.
ExampleDim BackupFilename As String BackupFilename = ArchiverLauncher.Archives & "\TheCurrentArchive.ZIP" Set MyArchives = GetServer.Archives ' Find The Current Archive, Then Initiate A Backup With MyArchives For I = 1 To .Item.count If .Item(I).IsCurrent Then If Not .Item(I).Backup(BackupFilename) Then err.Raise 1, "Backup", "Backup Failed" End If End If Next I End With
- BackupEx Method (Archive Object)
-
Performs an online backup of the specified archive by stopping inbound data flow and copying an image of the specified archive into the file identified by the BackupFileName parameter.
When the online backup operation completes, the archive returns to normal operation and accepts inbound data flow.
The Ex method will process messages for a client window while waiting for the backup to complete (so clients do not appear to be frozen.
Syntax
object.BackupEx(BackupFileName As String, hWnd As Long, DataStoreName As String)
Table 21. Parameters Name Data Type Description BackupFileName String Fully qualified name of the backup file (read-only) hWnd Long The handle of the window to keep alive. DataStoreName String Name of the data store. This is an optional parameter. Returns
Boolean. Returns whether or not the BackupFile operation succeeded.
ExampleDim BackupFilename As String BackupFilename = ArchiverLauncher.Archives & "\TheCurrentArchive.ZIP" Set MyArchives = GetServer.Archives ' Find The Current Archive, Then Initiate A Backup With MyArchives For I = 1 To .Item.count If .Item(I).IsCurrent Then If Not .Item(I).Backup(BackupFilename) Then err.Raise 1, "Backup", "Backup Failed" End If End If Next I End With
- Browse Method (OPCBrowse Object)
-
Populates the Browse Object with sources and areas for the current browse position.
Syntax
object.Browse(theServer, theCollector)
Table 22. Parameters Name Data Type Description theServer Variant The Server Object for the Historian Server. theCollector Variant The Collector Object for the Collector to Browse. Returns
Boolean. Returns whether or not the Browse operation succeeded.
- BrowseCollector Method (TagRecordset Object)
-
Browses a collector for its available tags.
Syntax
object.BrowseCollector(CollectorName, AdditionsOnly, SourceFilter, DescriptionFilter, [BrowsePosition], [Recursive])
Table 23. Parameters Name Data Type Description CollectorName String The name of the collector to browse. AdditionsOnly Boolean Browse only tags that are additions to the Historian server. SourceFilter String The tag source address filter. DescriptionFilter String The tag description filter. BrowsePosition String The browse position when performing an OPC hierarchical browse (optional, default = ""). Recursive Boolean Whether to perform an OPC hierarchical browse (optional, default = False). Returns
Boolean. Success/Failure.
- BrowseTags Method (Collector Object)
-
BrowseTags is available for collection in the data source. The tags can then be added to the archiver using the WriteRecordSet Method.
Syntax
object.BrowseTags([AdditionsOnly], [SourceFilter], [DescriptionFilter], [BrowsePosition], [Recursive])
Table 24. Parameters Name Data Type Description AdditionsOnly Boolean Browse only tags that are additions to the Historian server (optional, default = True). SourceFilter String The tag source address filter (optional, default = ""). DescriptionFilter String The tag description filter (optional, default = ""). BrowsePosition String The browse position when performing an OPC hierarchical browse (optional, default = ""). Recursive Boolean Whether to perform an OPC hierarchical browse (optional, default = False). Returns
TagRecordset. Returns a reference to the tag record that resulted from browsing the selected collector.
ExampleDim MyNewTags As iHistorian_SDK.TagRecordset ' Request The Collector To Browse Its Tag Source Set MyNewTags = MyCollectors.Item("USIM031_OPC1").BrowseTags ' Modify Tag Records In Recordset To Add Additional Configuration Information ' Go Ahead And Add New Tags To System If Not MyNewTags.WriteRecordset Then err.Raise 1, , "TagRecordset.WriteRecord failed: " + MyNewTags.LastError End If
Method Reference C-D
- C
- Clear Method (DataCriteria Object)
-
Clears any previously supplied criteria for the DataRecordset query. Use this method to initialize the DataRecordset query.
Syntax
object.Clear
Parameters
None.
Returns
None.
- Clear Method (DataFields Object)
-
Clears all DataFields from being returned in the DataRecordset query. Use this method to initialize the DataRecordset query.
Syntax
object.Clear
Parameters
None.
Returns
None.
- Clear Method (Enumerated Sets Object)
Applies to:
Clears all the elements from the EnumeratedSets collection object and create a new instance of the EnumeratedSets collection.Syntax
object.Clear
Parameters
None.
Returns
None.
- Clear Method (EnumeratedStates Object)
Applies to:
Clears all the states from the enumerated set collection.Syntax
object.Clear
Parameters
None.
Returns
None.
- Clear Method (MessageCriteria Object)
-
Clears all previously supplied criteria for the MessageRecordset query. Use this method to initialize the MessageRecordset query.
Syntax
object.Clear
Parameters
None.
Returns
None.
- Clear Method (MessageFields Object)
-
Clears all previously supplied criteria for the MessageRecordset query. Use this method to initialize the MessageRecordset query.
Syntax
object.Clear
Parameters
None.
Returns
None.
- Clear Method (TagCriteria Object)
-
Clears previously entered criteria for the TagRecordset query. Use this method to initialize the TagRecordset query.
Syntax
object.Clear
Parameters
None.
Returns
None.
- Clear Method (TagFields Object)
-
Clears all fields for retrieval in the TagRecordset query.
Syntax
object.Clear
Parameters
None.
Returns
None.
Returns
- Clear Method (UserDefinedTypeFields Object)
-
Applies to:
Clears all the fields from the User Defined Type.
Syntax
object.Clear
Parameters
None.
Returns
None.
Returns
- ClearRecordset Method (DataRecordset Object)
-
Clears specific records from the DataRecordset without deleting them from the Historian server.
You can specify a tagname to remove all DataValues for a specific tag, or supply a specific timestamp to remove a single DataValue.CAUTION: You can clear the entire DataRecordset by omitting both the tagname and timestamp.Syntax
object.ClearRecordset([Tagname], [TimeStamp])
Table 25. Parameters Name Data Type Description Tagname String Tag to clear records for (optional, read-only). TimeStamp Date Timestamp to clear records for (optional, read-only). Returns
Boolean. Returns True if the ClearRecordset operation succeeded.
- ClearRecordset Method (TagRecordset Object)
- Clears specific records from the TagRecordset without deleting them from the Historian server. You can specify a tagname to delete a specific record.CAUTION: You can clear the entire TagRecordset by omitting the tag name.
Syntax
object.ClearRecordset([Tagname])
Table 26. Parameters Name Data Type Description Tagname String Name of tag to remove from record set (read-only, optional). Returns
Boolean. Success/Failure. - CloseAlarms Method (Alarms Object)
-
This function sends a special alarm request to close alarms on a specific collector before a specific date. This is useful to close out any alarms that are stuck mid-lifecycle.
Syntax
object.CloseAlarms(endDate, theCollector)
Table 27. Parameters Name Data Type Description endDate Date The date from which to close alarms. Alarms before this date are closed. theCollector String Close alarms associated with this collector/datasource. Note: If your alarm collector is linked to a data collector, pass in the data collector name.Returns
None.
- CloseArchive Method (Archive Object)
-
Closes the specified archive for new data flow. You can perform this operation on the current archive only (the one accepting the newest data). Once an archive is closed, the Historian server looks to the next available empty archive to re-commence data storage.
If no empty archive is found, the method creates one or overwrites the oldest loaded archive. The archiving options, ArchiveAutomaticCreate, ArchiveAutomaticFreeSpace, ArchiveDefaultSize, and ArchiveOverWriteOld, control this behavior.
If ArchiveAutomaticCreate is running and enough free space exists on the drive of the ArchiveDefaultPath, the method creates a new archive of default size after it creates an archive of default size.
If the method cannot create a new archive, it overwrites the oldest archive based on ArchiveOverWriteOld being on. If ArchiveOverWriteOld is not on, the Historian archiver shuts down and the collectors start buffering data.
Syntax
object.CloseArchive(DataStoreName As String)
Table 28. Parameters Name Data Type Description DataStoreName String The name of the data store the archive belongs to. This is an optional parameter. Returns
Boolean. Returns whether or not the CloseArchive operation succeeded.
- CollectorHasBackup Method (Collectors Object)
-
Returns whether a collector has a backup collector.
Syntax
object.CollectorHasBackup(CollectorName)
Table 29. Parameters Name Data Type Description CollectorName String Name of the collector to determine if a backup exists. Returns
Boolean. True if the Collector has a backup, False otherwise.
ExampleDim MyCollectors As iHistorian_SDK.Collectors Set MyCollectors = MyServer.Collectors Dim HasBackup As Boolean HasBackup = MyCollectors.CollectorHasBackup("SimulationCollector")
- CommitImport Method (Alarms Object)
Writes the alarms/events acquired via the Import method to the Historian Archiver.
Syntax
object.CommitImport
Parameters
None
Returns
Boolean. Returns whether or not the Import operation succeeded.- Connect Method (Server Object)
-
Initiates a connection to the current server. Calling the Connect method on a currently connected session re-authenticates the user.
If a ServerName has been set, the method authenticates the user by the username and password supplied, if any. If they are not supplied, it authenticates the user by the currently authenticated domain user. If a ServerName has not been set, it uses the ServerName registered as the Default Server. If a username and password are not supplied, it uses the username and password registered with the default server. If neither establishes a username, it authenticates the user by the currently authenticated domain user.
Syntax
object.Connect([ServerName], [UserName], [Password])
Table 30. Parameters Name Data Type Description ServerName String Table text UserName String Username to authenticate (optional). Password String Password to authenticate (optional). Returns
Boolean. Returns whether or not the Connect operation succeeded.
ExampleDim MyServer As New iHistorian_SDK.Server ' Connect to the default server using default user If Not MyServer.Connect Then err.Raise 1, , "Failed to authenticate on server " + MyServer.ServerName End If ' Connect to the default server using specific user If Not MyServer.Connect("Fred", "000") Then err.Raise 1, , "Failed to authenticate on server " + MyServer.ServerName End If ' Connect to specific server using specific user If Not MyServer.Connect("USGB014", "Fred", "000") Then err.Raise 1, , "Failed to authenticate on server " + MyServer.ServerName End If
- ConvertShortcutToTime Method (Server Object)
-
Converts a time shortcut to a date. It converts the time from UTC into formatted time based on the ConnectionOptions (TimeOption) settings listed below.
Value Description (N)ow The current time (absolute). (T)oday Today at midnight (absolute). (Y)esterday Yesterday at midnight (absolute). (D)ays Number of Days (relative). (M)in Number of Minutes (relative). (H)our Number of Hours (relative). (W)eek Number of Weeks (relative). (BOM) Beginning of this month at Midnight (absolute). (EOM) Last Day of this month at Midnight (absolute). (BOY) First Day of this year at Midnight (absolute). (EOY) Last Day of this year at Midnight (absolute). Syntax
object.ConvertShortcutToTime(Shortcut)
Table 31. Parameters Name Data Type Description Shortcut String Date of shortcut to convert (read-only). Returns
Date. Returns date converted from string shortcut.
- CopyTo Method (Tag Object)
-
Copies the properties of the given tag to the specified destination tag.
Syntax
object.CopyTo(TargetTag)
Table 32. Parameters Name Data Type Description TargetTag Variant The destination tag. Returns
None.
- CriteriaFromStrings Method (QueryModifiers Object)
-
Applies to:
Returns the sampling mode, calculation mode and query modifiers associated with the input CriteriaString.
Syntax
object.CriteriaFromStrings(CriteriaString As String)
Table 33. Parameters Name Data Type Description CriteriaString String Indicates the criteria string. For example, #ONLYGOOD. Returns
DataCriteria
- D
- DataStoreUpdate Method (DataStores Object)
-
Updates the changes made to the data store settings.
Syntax
object.MyDataStores.Item(DataStoreName)
Table 34. Parameters Name Data Type Description DataStoreName String Name of the data store that should be updated. IsDefault Boolean Indicates whether the data store is the default data store. Description String Description of the data store. This is an optional parameter. StorageType String Indicates whether the storage type is historical or SCADA buffer. This is an optional parameter. Returns
Boolean. Returns TRUE if the data store has been updated and FALSE if there is an error in updating the data store.
- Delete Method (Archive Object)
-
Deletes the specified archive on the Historian server. This is a synchronous operation that executes immediately when you call the Delete Method.
Syntax
object.Delete(DataStoreName As String)
Table 35. Parameters Name Data Type Description DataStoreName String Name of the data store that contains the archive. This is an optional parameter. Returns
Boolean. Returns whether or not the Delete operation succeeded.
- Delete Method (Archives Object)
-
Attempts to delete an Archive from the Historian server.
Syntax
object.Delete(ArchiveName As String, ArchiveDataStoreName As String)
Table 36. Parameters Name Data Type Description ArchiveName String Name of the archive to delete. ArchiveDataStoreName String Name of the archive data store the archive belongs to. This is an optional parameter. Returns
Boolean. Returns whether or not the Delete operation succeeded.
- Delete Method (Collector Object)
-
Deletes the specified collector on the Historian Server.CAUTION: The default option also deletes all tags marked with this collector as their source (CollectorName Property) at the same time it deletes the collector.
Syntax
object.Delete([DeleteTags])
Table 37. Parameters Name Data Type Description DeleteTags Boolean Deletes collector tags when deleting the collector. (optional, default = True) Returns
Boolean. Whether the Delete was successful.
- Delete Method (Collectors Object)
-
Removes an existing collector with the specified name from the Historian server.
Syntax
object.Delete(CollectorName, [DeleteTags])
Table 38. Parameters Name Data Type Description CollectorName String Name of the collector to Delete. DeleteTags Boolean Should the tags from this collector be deleted as well? Returns
Boolean. Success/Failure.
Example
Dim MyCollectors As iHistorian_SDK.Collectors Set MyCollectors = MyServer.Collectors MyCollectors.Delete "OPC Collector"
- Delete Method (DataRecordset Object)
-
Marks the specified tag in the current TagRecordset for deletion. If the specified tag does not exist in the current TagRecordset, the method adds it. If the tag is not found, the Delete method fails.
In either case, the method does not delete this tag on the Historian server until the WriteRecordset Method of the TagRecordset object is called.
Syntax
object.Delete(Tagname, TimeStamp)
Table 39. Parameters Name Data Type Description Tagname String Name of the tag to delete (read-only). TimeStamp Date Tag timestamp (optional). Returns
Boolean. Returns True if successful.
- Delete Method (DataStores Object)
-
Deletes the data store.
Syntax
object.Delete(DataStoreName As String)
Table 40. Parameters Name Data Type Description DataStoreName String Indicates the name of the data store that has to be deleted. Returns
Boolean. Returns TRUE if the data store has been deleted and FALSE if there is an error in deleting the data store.
- Delete Method (DataValue Object)
-
Deletes the DataValue from the archive. Commit the Delete operation by calling the WriteRecordset method of the DataRecordset object.
Syntax
object.Delete
Parameters
None
Returns
Boolean. Returns whether or not the Delete operation succeeded.
- Delete Method (EnumeratedSets Object)
-
Deletes the specified set from the Historian Server. This is a synchronous operation that is executed immediately when you call the Delete method.
Syntax
object.Delete(setName)Table 41. Parameters Name Data Type Description SetName Variant The name of the set that has to be deleted. Returns
Boolean. Returns True if the method has been deleted
- Delete Method (EnumeratedStates Object)
-
Deletes the specified state from the enumerated set. This is a synchronous operation that is executed immediately when you call the Delete method.
Syntax
object.Delete(StateName)
Table 42. Parameters Name Data Type Description StateName Variant The name of the state that has to be deleted. Returns
Boolean. Returns True if the state has been deleted or False if not.
- Delete Method (Tag Object)
- Deletes the specified tag on the Historian Server. This is a synchronous operation that executes immediately when you call the Delete method. You can choose to delete a tag permanently from the Historian Server by passing an additional parameter as True or False.Note: This method is called within the WriteRecordset method. For more information, refer to the Sample Code section.
Syntax
object.Delete((Optional) DeletePermanent)
Table 43. Parameters Name Data Type Description DeletePermanent Boolean (Optional) Pass TRUE to permanently delete a tag. Returns
Boolean. Returns whether or not the Delete operation succeeded. - Delete Method (TagRecordset Object)
-
Marks the specified tag in the current TagRecordset for deletion. If the specified tag does not exist in the current TagRecordset, the method adds it. If the tag is not found, the Delete method fails. In either case, the method does not delete this tag on the Historian server until the WriteRecordset method of the TagRecordset object is called.
Syntax
object.Delete(Tagname)
Table 44. Parameters Name Data Type Description Tagname String Name of the tag to delete (read-only). Returns
Boolean. Returns whether or not the Delete operation succeeded.
- Delete Method (UserDefinedTypeFields Object)
Deletes a field from the User Defined Type. This is a synchronous operation that is executed immediately when you call the Delete method.
Syntax
object.Delete(FieldName)
Table 45. Parameters Name Data Type Description FieldName Variant The name of the state that has to be deleted. Returns
Boolean. Returns TRUE if the state has been deleted.- DeleteEx Method (Archive Object)
-
Deletes the specified archive on the Historian server. This is a synchronous operation that executes immediately when you call the Delete Method. The window associated with the handle passed in is kept alive (messages processed) while the operation takes place.
Syntax
object.DeleteEx(hWnd As Long, DataStoreName As String)
Table 46. Parameters Name Data Type Description hWnd Long The handle of the window to keep alive. DataStoreName String Name of the data store that contains the archive. This is an optional parameter. Returns
Boolean. Returns whether or not the Delete operation succeeded.
- DeleteEx Method (Archives Object)
-
Attempts to delete an Archive from the Historian server. Keeps the window with handle hwnd alive by processing its messages while waiting for the deletion to occur.
Syntax
object.DeleteEx(ArchiveName As String, hWnd As Long, ArchiveDataStoreName As String)
Table 47. Parameters Name Data Type Description ArchiveName String Name of the archive to delete hWnd Long The window handle to keep alive. ArchiveDataStoreName String Name of the archive data store the archive belongs to. This is an optional parameter. Returns
Boolean. Success/Failure.
- Disconnect Method (Server Object)
-
Disconnects the currently authenticated connection to the Server.
Syntax
object.Disconnect
Parameters
None
Returns
None.
Method Reference E-H
- E
- Export Method (Alarms Object)
-
Exports the contents of the AlarmRecordSet into the specified file.
Syntax
object.Export(AlmRS, RSInfo, FileName, FileFormat)
Table 48. Parameters Name Data Type Description AlmRS AlarmRecordSet Returns the requested records (writeable). RSInfo AlarmOpenRecordSetInfo Contains descriptions of the desired records (read-only). FileName String Fully qualified export filename (read-only). FileFormat ihFileFormat File format of the export file (read-only). Returns
Boolean. Returns whether or not the Export operation succeeded.
- Export Method (DataRecordset Object)
-
Exports the contents of the current DataRecordset into the specified file.
Syntax
object.Export(FileName, FileFormat)
Table 49. Parameters Name Data Type Description FileName String Fully qualified export filename (read-only. FileFormat ihFileFormat File format of the export file (read-only). Returns
Boolean. Returns whether or not the Export operation succeeded.
Example
' Export File From Existing Query Results If Not MyRecordset.Export("C:\Temp\DataReport.RPT", ihFileFormat.Report) Then Err.Raise 1, , "Error Exporting File: " + MyRecordset.LastError End If
- Export Method (EnumeratedSets Object)
-
Applies to:
Exports the contents of the EnumeratedSets collection into the specified file.
The following file formats are supported:
Name Description Value CSV File is imported/exported as comma separated values. 1 XML File is imported/exported as XML. 2 Imported files follow a specific format that contains specific keywords. With CSV, the first row of the file establishes the fields in the file and their positions. With XML reports, the files describe the format of the data.
Syntax
object. Export(FileName, FileFormat)
Table 50. Parameters Name Data Type Description FileName String Fully qualified export file name (read-only). FileFormat ihFileFormat File format of the export file (read-only). Returns
Boolean. Returns True if the sets have been exported successfully.
- Export Method (MessageRecordset Object)
-
Exports the contents of the current MessageRecordset into the specified file.
The following file formats are supported. Exported files follow a specific format containing specific keywords. With CSV and tabular reports, the first row of the file establishes the fields in the file and their positions. With XML, the file itself describes the format of the data.
Name Description Value CSV File is imported/exported as comma separated values. 1 XML File is imported/exported as XML. 2 Report File is exported as a columnar report 3 Syntax
object.Export(FileName, FileFormat)
Table 51. Parameters Name Data Type Description FileName String Fully qualified export file name (read-only). FileFormat ihFileFormat File format of the export file (read-only). Returns
Boolean. Success/Failure.
- Export Method (TagRecordset Object)
Exports the contents of the current TagRecordset into the specified file.
The following file formats are supported:
Imported files follow a specific format that contains specific keywords. With CSV and tabular reports, the first row of the file establishes the fields in the file and their positions. With XML reports, the files describe the format of the data. Prepare a file for import by exporting it with the desired fields for import.Name Description Value CSV File is imported/exported as comma separated values. 1 XML File is imported/exported as XML. 2 Report File is exported as a columnar report 3 Syntax
object.Export(FileName, FileFormat)
Table 52. Parameters Name Data Type Description FileName String Fully qualified export file name (read-only). FileFormat ihFileFormat File format of the export file (read-only). Returns
Returns whether or not the Export operation succeeded.
Example
' Export file from existing query results Set MyRecordset = MyServer.Tags.NewRecordset MyRecordset.Criteria.Tagname = "*" MyRecordset.Fields.AllFields MyRecordset.QueryRecordset If Not MyRecordset.Export(Path & "TagReport.RPT", ihFileFormat.Report) Then err.Raise 1, , "Error exporting file: " & MyRecordset.LastError End If
- Export Method (UserDefinedType Object)
-
Applies to:
Exports the contents of the User Defined Type into the specified file.
The following file formats are supported:
Imported files follow a specific format that contains specific keywords. With CSV, the first row of the file establishes the fields in the file and their positions. With XML reports, the files describe the format of the data.Name Description Value CSV File is imported/exported as comma separated values. 1 XML File is imported/exported as XML. 2 Syntax
object. Export(FileName, FileFormat)Table 53. Parameters Name Data Type Description FileName String Fully qualified export file name (read-only). FileFormat ihFileFormat File format of the export file (read-only). Returns
Boolean. Returns TRUE if the User Defined Type is exported successfully.
- G
- GetCurrentValue Method (Collector Object)
-
Returns the current value for a given tag.
Syntax
object.GetCurrentValue(SourceAddress, ErrorMessage, CurrentValue)
Table 54. Parameters Name Data Type Description SourceAddress String The tag source address. ErrorMessage String The error message string encountered, if any. CurrentValue String A DataValue object representing the current tag value. Returns
Boolean. Succeeded/Failed. ExampleDim OPC1 As iHistorian_SDK.Collector Dim MyTagValue As Variant Dim MyErrorMessage As String ' Request The Collector To Get the Current Value for a Tag Set OPC1 = MyCollectors.Item("USIM031_OPC1") OPC1.GetCurrentValue "OPCTag1", MyErrorMessage, MyTagValue
- GetFilters Method (OPCFilters Object)
-
Returns the current set of Filters configured for MyCollector.
Syntax
object.GetFilters(MyServer, MyCollector)
Table 55. Parameters Name Data Type Description MyServer Variant The Historian server connection. MyCollector MyCollector The Collector object to acquire the Filter information for. Returns
Boolean true on success, false otherwise
- GetLastError Method (Server Object)
-
Returns the last error message encountered by the Server object. To see a complete list of messages, refer to the ErrorList property. When possible, the system translates messages into the locale of the client.
Syntax
object.GetLastError
Parameters
None
Returns
String. The last error message encountered.
- GetPrimaryCollectorName Method (Collectors Object)
-
Returns the name of the Primary Collector for a set of redundantly configured Collectors.
Syntax
object.GetPrimaryCollectorName(CollectorName)
Table 56. Parameters Name Data Type Description CollectorName String The name of the Collector. Returns
String. The primary collector name.
Method Reference I-L
- I
- Import Method (Alarms Object)
-
This function imports the alarms/events in the specified file into this Alarms object.CAUTION: Any previously imported alarms will be discarded.
Syntax
object.Import(FileName, FileFormat)
Table 57. Parameters Name Data Type Description FileName String Fully qualified import filename (read-only). FileFormat Long File format of the import file (read-only). Returns
Boolean. Returns whether or not the Import operation succeeded.
- Import Method (DataRecordset Object)
-
Imports the specified file into the current DataRecordset. If the DataRecordset contains items when the Import Method is invoked, the method first clears current DataRecordset before it imports the specified file.
Syntax
object.Import(FileName, FileFormat)
Table 58. Parameters Name Data Type Description FileName String Fully qualified import filename (read-only). FileFormat Long File format of the import file (read-only). Returns
Boolean. Returns whether or not the Import operation succeeded.
Example
' Get A New Recordset Set MyRecordset = MyData.NewRecordset ' Import The File If Not MyRecordset.Import("C:\Temp\ImportData.CSV", ihFileFormat.CSV) Then Err.Raise 1, , "Error Importing File:" + MyRecordset.LastError End If ' Commit Data If Not MyRecordset.WriteRecordset Then Err.Raise 1, , "Error Committing File: " + MyRecordset.LastError End If
- ImportMethod (EnumeratedSets Object)
-
Imports the specified file into the EnumeratedSets collection. The following file formats are supported:
Imported files follow a specific format that contains specific keywords. With CSV files, the first row of the file establishes the fields in the file and their positions. With XML reports, the files describe the format of the data.Name Description Value CSV File is imported/exported as comma separated values. 1 XML File is imported/exported as XML. 2 Syntax
object. Import(FileName, FileFormat, Server)
Table 59. Parameters Name Data Type Description FileName String Fully qualified export file name (read-only). FileFormat ihFileFormat File format of the export file (read-only). Server Server Server from which the sets are imported. Returns
Boolean. Returns True if the sets have been imported successfully.
- Import Method (MessageRecordset Object)
Attempts to import a list of Messages from a file.
Syntax
object.Import(FileName, FileFormat)Table 60. Parameters Name Data Type Description FileFormat ihFileFormat The format of the file specified in FileName FileName String The name of the file to import. Returns
Boolean true if the Import succeeded, false otherwise.
- Import Method (TagRecordset Object)
-
Imports the specified file into the current TagRecordset. If the TagRecordset contains items when the Import method is invoked, the method first clears the current TagRecordset before importing the specified file. After you have imported a file, call the WriteRecordset method of the TagRecordset object to save the data to the Historian server. The following file formats are supported:
Imported files follow a specific format that contains specific keywords. With CSV and tabular reports, the first row of the file establishes the fields in the file and their positions. With XML reports, the files describe the format of the data.Name Description Value CSV File is imported/exported as comma separated values. 1 XML File is imported/exported as XML. 2 Report File is exported as a columnar report. 3 Note: Prepare a file for import by exporting it with the desired fields for import.Syntax
object.Import(FileName, FileFormat)
Table 61. Parameters Name Data Type Description FileName String Fully qualified import file name (read-only). FileFormat Long File format of the import file (read-only). Returns
Returns whether or not the Import operation succeeded.
Example
' Get a new recordset Set MyRecordset = MyTags.NewRecordset ' Import the file If Not MyRecordset.Import(Path & "ImportTags.csv", ihFileFormat.CSV) Then err.Raise 1, , "Error importing file: " & MyRecordset.LastError End If ' Commit Data If Not MyRecordset.WriteRecordset Then err.Raise 1, , "Error committing file: " & MyRecordset.LastError End If
- Import Method (UserDefinedType Object)
Applies to:
Imports the specified file into the User Defined Type collection. The following file formats are supported:
Imported files follow a specific format that contains specific keywords. With CSV files, the first row of the file establishes the fields in the file and their positions. With XML reports, the files describe the format of the data.Name Description Value CSV File is imported/exported as comma separated values. 1 XML File is imported/exported as XML. 2 Syntax
object. Import(FileName, FileFormat, Server)
Table 62. Parameters Name Data Type Description FileFormat ihFileFormat File format of the import file (read-only). FileName String Fully qualified export file name (read-only). Server Server Server from which the sets are imported. Returns
Boolean. Returns TRUE if the type imports successfully.
- InitiateFailover Method (Collectors Object)
-
Manually tries to initiate a Failover to a redundantly configured collector.
Syntax
object.InitiateFailover(CollectorName)
Table 63. Parameters Name Data Type Description CollectorName String Name of the collector to fail-over. Returns
Collector. Returns Success/Failure.
Example
Dim MyCollectors As iHistorian_SDK.Collectors Set MyCollectors = MyServer.Collectors MyCollectors.InitiateFailover "SimulationCollector"
- L
- LastError Method (Alarms Object)
- This function returns the last error message generated by this object.
Syntax
object.LastError
Parameters
None
Returns
String. The last error message encountered.
- LoadUserCalcLibrary Method (Server Object)
-
Retrieves the user calculation library from the Server object. This library contains all of the user-created functions and subroutines available for calculations on this Server. The calculation library will be returned as an array of UserCalcFunction objects. If no functions exist in the library, UserCalcFunctions should be set to Empty
Syntax
object.LoadUserCalcLibrary(UserCalcFunctions)
Table 64. Parameters Name Data Type Description UserCalcFunctions Variant Resulting array of UserCalcFunction objects. Returns
Boolean. Returns whether or not the calculation library was loaded successfully.
Example
Dim MyServer As New iHistorian_SDK.Server Dim MyUserCalcFunctions() As iHistorian_SDK.UserCalcFunction Dim MyNewFunction As New iHistorian_SDK.UserCalcFunction ' Connect to the local server If Not MyServer.Connect("", "", "") Then err.Raise 1, , "Failed to connect to the local server" End If ' Load the calculation library MyServer.LoadUserCalcLibrary MyUserCalcFunctions ' Create a new function MyNewFunction.Name = "Sum" MyNewFunction.Definition = "Function Sum(a, b)" & vbCrLf & "Sum = a + b" & vbCrLf & "End Function" ' Add it to the loaded library If IsArray(MyUserCalcFunctions) Then ReDim Preserve MyUserCalcFunctions(UBound(MyUserCalcFunctions) + 1) Else ReDim MyUserCalcFunctions(0) End If Set MyUserCalcFunctions(UBound(MyUserCalcFunctions)) = MyNewFunction ' Save the changes to the calculation library If Not MyServer.SaveUserCalcLibrary(MyUserCalcFunctions) Then err.Raise 1, , "Failed to save the calculation library" End If
Method Reference M-P
- M
- ManageServerDialog Method (ServerManager Object)
-
Displays a window to manage server connection information on the client. This window allows you to add and remove new connections, and to modify the default username and password. This method optionally returns the name of the server last selected in the window.
Syntax
object.ManageServerDialog([SelectedServer])Table 65. Parameters Name Data Type Description SelectedServer String Name of the selected Historian Server (optional, read/write). Returns
None.
ExampleDim MyManager As New iHistorian_SDK.ServerManager Dim MyServer As iHistorian_SDK.Server Dim SelectedServer As String ' Show the manage server window MyManager.ManageServerDialog SelectedServer ' If a server was selected, get the server If Trim(SelectedServer) <> "" Then Set MyServer = MyManager.Servers(SelectedServer) End If
- N
- NewRecordset Method (Data Object)
-
Returns a new DataRecordset object to subsequently build a query for tag data from the Historian server. It is the responsibility of the developer to release the DataRecordset object when processing has been completed. DataRecordset objects may be re-used by re-executing a query with new criteria set through the DataCriteria of the DataRecordset object.
You must also use a new DataRecordset object to add new data points to the system and delete existing data points from the system. Changes are not committed until calling the WriteRecordset method of the DataRecordset object.
Syntax
object.NewRecordset
Parameters
None
Returns
DataRecordset. A new, empty, DataRecordset object.
- NewRecordset Method (Messages Object)
-
Returns a new MessageRecordset object to build a query for messages and alerts from the Historian server message archive. You must release the MessageRecordset object when processing completes. You can re-use a MessageRecordset object by re-executing a query with new criteria set through the MessageCriteria of the MessageRecordset object.
To add new messages, you must use a new MessageRecordset object. Call the WriteRecordset method of the MessageRecordset object to commit changes to the archiver.
Syntax
object.NewRecordset
Parameters
None
Returns
MessageRecordset. Returns the newly created MessageRecordset object.
- NewRecordset Method (Tags Object)
-
Returns a new TagRecordset object to build a query for tag information. You must terminate the TagRecordset object when processing completes. You can re-use the TagRecordset objects by re-executing a query with new criteria set through the TagCriteria of the TagRecordset object.
You must also use a new TagRecordset object to add new tags to the system and to delete tags from the system. Call the WriteRecordset Method of the TagRecordset object to commit changes to the archiver.
Syntax
object.NewRecordset
Parameters
None.
Returns
TagRecordset. Returns a reference to the newly created Recordset Object.
- Purge Alarms By Id Method
Purges a single alarm as identified by its alarm ID.
Syntax
object.AlarmIdsTable 66. Parameters Name Data Type Description AlarmIds Long Alarm ID of the alarm. Returns
Boolean. Returns TRUE if the alarm is purged.
Example
Dim Status As ihStatus Dim ReturnStatus As Boolean Dim Alarms() As Long Dim NumberOfAlarms As Long Dim i As Long Status = ihSTATUS_FAILED ReturnStatus = False NumberOfAlarms = (UBound(AlarmIds) + 1) ReDim Alarms(0 To NumberOfAlarms - 1) As Long On Error GoTo errc For i = 0 To NumberOfAlarms - 1 Alarms(i) = AlarmIds(i) Next i Status = ihPurgeAlarmsById(MyServer.Handle, Alarms(0), NumberOfAlarms, 0) If Status <> ihSTATUS_OK Then err.Raise 1, , "Error Purging alarms by Id[" + ErrorDescription(Status) + "," + CS ReturnStatus = True PurgeAlarmsById = ReturnStatus errc: zLastError = "Purge Alarms By Id>> " + err.Description PurgeAlarmsById = ReturnStatus End Function
- Purge Alarms Method
-
Purges or deletes the alarms from the Archiver.
Syntax
object.PurgeAlarms
Table 67. Parameters Name Data Type Description BackupFile String The file that stores the purged alarm data. ShouldZipAlarms Boolean Indicates whether the alarms should be zipped into file or not. StartTime Date Start time of the alarms. EndTime Date End time of the alarms. Returns
Boolean. Returns TRUE if the alarms are purged.
Example
Dim Status As ihStatus Dim AlarmsStartTime As ihTimeStruct Dim AlarmsEndTime As ihTimeStruct Dim ShouldZip As ihBoolean Dim ReturnStatus As Boolean Status = ihSTATUS_FAILED ReturnStatus = False AlarmsStartTime = Date_To_UTC(StartTime) AlarmsEndTime = Date_To_UTC(EndTime) If ShouldZipAlarms = True Then ShouldZip = ihTRUE Else ShouldZip = ihFALSE End If On Error GoTo errc Status = ihPurgeAlarms(MyServer.Handle, BackupFile, ShouldZip, AlarmsStartTime, AlarmsEndTime, 0) If Status <> ihSTATUS_OK Then err.Raise 1, , "Error Purging alarms [" + ErrorDescription(Status) + "," + CStr(St ReturnStatus = True PurgeAlarms = ReturnStatus errc: zLastError = "Purge Alarms>> " + err.Description PurgeAlarms = ReturnStatus End Function
Method Reference Q-T
- Q
- QueryArray Method (Archives Object)
-
This function returns a list of properties of an Archive found on the Historian server.
Syntax
object.QueryArray(ArchiveName, Params, SortAscending, ArrayOrientation, ArraySize, ReturnCount, ReturnArray)
Table 68. Parameters Name Data Type Description ArchiveName String Name of the Archive to return information on. Params Variant A list of the parameters to retrieve on the specified Archive. SortAscending Boolean Sorting preference for the returned list of properties. ArrayOrientation Integer The desired orientation of the returned array. ArraySize Long The desired size of the returned array. ReturnCount Long The number of rows returned in ReturnArray ReturnArray Variant A returned array which contains the requested properties. Returns
Boolean. Success/Failure.
- QueryArray Method (Collectors Object)
-
This function returns a list of properties for a set of Collectors.
Syntax
object.QueryArray(CollectorName, Params, SortAscending, ArrayOrientation, ArraySize, ReturnCount, ReturnArray)
Table 69. Parameters Name Data Type Description CollectorName String Name of the Collector to return information on. Params Variant A list of the parameters to retrieve from the Collectors. SortAscending Boolean Sorting preference for the returned list of properties. ArrayOrientation Integer The desired orientation of the returned array. ArraySize Long The desired size of the returned array. ReturnCount Long The number of rows returned in ReturnArray ReturnArray Variant A returned array which contains the requested properties. Returns
Boolean. Success/Failure.
- QueryArray Method (DataRecordset Object)
-
This function returns an array of data records from the Historian server.
Syntax
object.QueryArray(Params, SortAscending, ArrayOrientation, ArraySize, ReturnCount, ReturnArray)
Table 70. Parameters Name Data Type Description Params Variant A list of the parameters to retrieve. SortAscending Boolean Sorting preference for the returned list of properties. ArrayOrientation Integer The desired orientation of the returned array. ArraySize Long The desired size of the returned array. ReturnCount Long The number of rows returned in ReturnArray ReturnArray Variant A returned array which contains the requested properties. Returns
Boolean. Success/Failure.
- QueryArray Method (MessageRecordset Object)
-
This function returns an array of Messages from the Historian server.
Syntax
object.QueryArray(Params, SortAscending, ArrayOrientation, ArraySize, ReturnCount, ReturnArray)
Table 71. Parameters Name Data Type Description Params Variant A list of the parameters to retrieve. SortAscending Boolean Sorting preference for the returned list of properties. ArrayOrientation Integer The desired orientation of the returned array. ArraySize Long The desired size of the returned array. ReturnCount Long The number of rows returned in ReturnArray ReturnArray Variant A returned array which contains the requested properties. Returns
Boolean. Success/Failure.
- QueryArray Method (TagRecordset Object)
-
This function returns an array of Tags from the Historian server.
Syntax
object.QueryArray(Params, SortAscending, ArrayOrientation, ArraySize, ReturnCount, ReturnArray)
Table 72. Parameters Name Data Type Description Params Variant A list of the parameters to retrieve. SortAscending Boolean Sorting preference for the returned list of properties. ArrayOrientation Integer The desired orientation of the returned array. ArraySize Long The desired size of the returned array. ReturnCount Long The number of rows returned in ReturnArray. ReturnArray Variant A returned array which contains the requested properties. Returns
Boolean. Success/Failure
- QueryRecordset Method (DataRecordset Object)
-
Executes the DataValue query based on the fields and criteria specified.
Syntax
object.QueryRecordset
Parameters
None
Returns
Boolean. Returns whether or not the QueryRecordset operation succeeded.
Example
Dim I As Integer Dim J As Integer Dim K As Integer Dim strComment$ Dim lngInterval As Long Dim TagCount As Integer Dim strDataQuality As String Dim iDataRecordset As iHistorian_SDK.DataRecordset Dim iDataValue As iHistorian_SDK.DataValue Dim lEndTime&, lStartTime&, lNumSamples& Dim lNumSeconds, lNumSamplesPerSecond On Error GoTo Error_Handle If CheckConnection = True Then If lbTags.Text = "" Then MsgBox "No Tag Selected", vbOKOnly, "SDK Sample" Exit Sub End If Set iDataRecordset = ConnectedServer.Data.NewRecordset 'reset lstValues.Clear 'build query With iDataRecordset 'filter code If txtFilterTag.Text <> "" Then .Criteria.FilterTagSet = True .Criteria.FilterTag = txtFilterTag.Text .Criteria.FilterComparisonModeSet = True 'comparison mode Select Case cboComparisonMode.Text Case Is = "Equal" .Criteria.FilterComparisonMode = 1 Case Is = "NotEqual " .Criteria.FilterComparisonMode = 2 Case Is = "LessThan" .Criteria.FilterComparisonMode = 3 Case Is = "GreaterThan" .Criteria.FilterComparisonMode = 4 Case Is = "LessThanEqual" .Criteria.FilterComparisonMode = 5 Case Is = "GreaterThanEqual" .Criteria.FilterComparisonMode = 6 End Select .Criteria.FilterModeSet = True 'filter mode Select Case cboFilterMode.Text Case Is = "ExactTime" .Criteria.FilterMode = 1 Case Is = "BeforeTime" .Criteria.FilterMode = 2 Case Is = "AfterTime" .Criteria.FilterMode = 3 Case Is = "BeforeAndAfterTime" .Criteria.FilterMode = 4 End Select .Criteria.FilterComparisonValue = txtFilterValue.Text End If .Criteria.Tagmask = lbTags.Text .Criteria.StartTime = dtStartTime.Value .Criteria.EndTime = dtEndTime.Value 'get sample mode Select Case cboSampleMode.Text Case Is = "Interpolated" .Criteria.SamplingMode = 2 'interpolated Case Is = "Raw By Number" .Criteria.SamplingMode = 5 'raw by number Case Is = "Raw By Time" .Criteria.SamplingMode = 4 'raw by time Case Is = "Current Value" .Criteria.SamplingMode = 1 'current value Case Is = "Calculated" .Criteria.SamplingMode = 6 'calculation Case Is = "Trend" .Criteria.SamplingMode = 3 'trend End Select If .Criteria.SamplingMode = 5 Then 'if raw by number get direction If optDirectionForward.Value = True Then .Criteria.Direction = 1 'forward Else .Criteria.Direction = 2 'backward End If End If 'if calculation get calc mode If .Criteria.SamplingMode = 6 Then Select Case cboCalculationMode.Text Case Is = "Average" .Criteria.CalculationMode = 1 'average Case Is = "Standard Deviation" .Criteria.CalculationMode = 2 'standard deviation Case Is = "Total" .Criteria.CalculationMode = 3 'total Case Is = "Minimum" .Criteria.CalculationMode = 4 'minimum Case Is = "Maximum" .Criteria.CalculationMode = 5 'maximum Case Is = "Count" .Criteria.CalculationMode = 6 'count Case Is = "Raw Average" .Criteria.CalculationMode = 7 'raw average Case Is = "Raw Standard Deviation" .Criteria.CalculationMode = 8 'raw standard deviation Case Is = "Raw Total" .Criteria.CalculationMode = 9 'raw total Case Is = "Minimum Time" .Criteria.CalculationMode = 10 'minimum time Case Is = "Maximum Time" .Criteria.CalculationMode = 11 'maximum time Case Is = "Time Good" .Criteria.CalculationMode = 12 'time good End Select End If If optSamplingByNumber.Value = True Then .Criteria.NumberOfSamples = Int(txtNumSamples.Text) Else Select Case cboTimeUnits.Text Case Is = "Milliseconds" .Criteria.SamplingInterval = Int(txtInterval.Text) Case Is = "Seconds" .Criteria.SamplingInterval = Int(txtInterval.Text) * 1000 Case Is = "Minutes" .Criteria.SamplingInterval = Int(txtInterval.Text) * 60000 Case Is = "Hours" .Criteria.SamplingInterval = Int(txtInterval.Text) * 3600000 Case Is = "Days" .Criteria.SamplingInterval = Int(txtInterval.Text) * 86400000 End Select End If .Fields.AllFields VB.Screen.MousePointer = vbHourglass 'wait wait wait lStartTime = Timer 'do query If Not .QueryRecordset Then lEndTime = Timer MsgBox "Query Failed..." & Chr(13) & iDataRecordset.LastError VB.Screen.MousePointer = vbDefault Exit Sub End If lEndTime = Timer VB.Screen.MousePointer = vbDefault lNumSamples = 0 TagCount = iDataRecordset.Item(1).Count For I = 1 To iDataRecordset.Tags.Count For J = 1 To iDataRecordset.Item(I).Count Set iDataValue = iDataRecordset.Item(I).Item(J) Select Case iDataValue.DataQuality Case Is = 1 strDataQuality = "Good" Case Is = 2 strDataQuality = "Bad" Case Is = 3 strDataQuality = "Unknown" Case Else strDataQuality = "ERROR" End Select strComment = "" For K = 1 To iDataValue.Comments.Count strComment = strComment & " " & iDataValue.Comments(K).Comment Next K lstValues.AddItem Format(iDataValue.TimeStamp, "MM/dd/yyyy hh:mm:ss") & _ Space(10) & CStr(iDataValue.Value) & vbTab & strDataQuality & vbTab & strComment lNumSamples = lNumSamples + 1 Next J Next I End With lNumSeconds = lEndTime - lStartTime lNumSamplesPerSecond = lNumSamples If lNumSeconds > 0 Then lNumSamplesPerSecond = lNumSamples / lNumSeconds End If txtReadTime.Caption = lNumSamples & " returned in " & lEndTime - lStartTime & " seconds (" & lNumSamplesPerSec Caption = "Output values for " & lbTags.Text & " (" & TagCount & ")" VB.Screen.MousePointer = vbDefault 'done Else MsgBox "Not Connected" End If Exit Sub Error_Handle: VB.Screen.MousePointer = vbDefault Select Case Err.Number Case Is = 6 'overflow MsgBox "Error Number: " & Err.Number & Chr(13) & "Description: " & Err.Description & Chr(13) & "Check numb Case Is = 13 'type mismatch MsgBox "Error Number: " & Err.Number & Chr(13) & "Description: " & Err.Description & Chr(13) & "Check numb Case Is = 91 MsgBox "Error Number: " & Err.Number & Chr(13) & "Check connection to server" Case Else MsgBox "Error Number: " & Err.Number & Chr(13) & Err.Description, vbOKOnly, "Error" End Select
- QueryRecordset Method (MessageRecordset Object)
-
Executes the message query based on the fields and criteria specified.
Syntax
object.QueryRecordset
Parameters
None
Returns
Boolean. Success/Failure.
Example
Dim MyRecordset As iHistorian_SDK.MessageRecordset Dim I As Integer Dim J As Integer Dim lEndTime&, lStartTime&, lNumMessages& Dim lNumSeconds&, lNumMessagesPerSecond& If CheckConnection = True Then ' Get A New Recordset Set MyRecordset = ConnectedServer.Messages.NewRecordset ' Return Timestamp, Message Number, and Message String Fields In Query With MyRecordset.Fields .TimeStamp = True .MessageNumber = True .MessageString = True End With ' Query messages for given start and end time With MyRecordset.Criteria .Clear .StartTime = dtMessageStart.Value .EndTime = dtMessageEnd.Value If txtMessageContains.Text <> "" Then .MessageString = txtMessageContains.Text End If End With VB.Screen.MousePointer = vbHourglass ' wait wait wait ' Run Query lStartTime = Timer If Not MyRecordset.QueryRecordset Then lEndTime = Timer MsgBox "Query Failed..." & Chr(13) & MyRecordset.LastError VB.Screen.MousePointer = vbDefault Exit Sub End If lEndTime = Timer ' reset output list lstRetrievedMessages.Clear ' display all messages lNumMessages = 0 For J = 1 To MyRecordset.Item.Count lstRetrievedMessages.AddItem Format(MyRecordset.Item(J).TimeStamp, "MM/dd/yyyy hh:mm:ss") & _ vbTab & MyRecordset.Item(J).MessageString lNumMessages = lNumMessages + 1 Next J ' calculate performance statistics lNumSeconds = lEndTime - lStartTime lNumMessagesPerSecond = lNumMessages If lNumSeconds > 0 Then lNumMessagesPerSecond = lNumMessages / lNumSeconds End If VB.Screen.MousePointer = vbDefault txtReadTime.Caption = lNumMessages & " returned in " & lEndTime - lStartTime & " seconds (" & lNumMessagesP End If
- QueryRecordset Method (TagRecordset Object)
Executes the tag query based on the fields and criteria specified.
Syntax
object.QueryRecordsetParameters
None.Returns
Boolean. Returns whether the QueryRecordset operation succeeded.Example
Dim MyTags As iHistorian_SDK.Tags Dim MyRecordset As iHistorian_SDK.TagRecordset Dim lStartTime&, lEndTime&, lNumSeconds&, lNumTagsPerSecond& Dim I As Integer On Error GoTo errc lbTags.Clear ' If we are connected to server If CheckConnection = True Then ' Query all the tagnames Set MyTags = ConnectedServer.Tags Set MyRecordset = MyTags.NewRecordset MyRecordset.Criteria.Tagname = txtTagMask.Text If txtDescriptionMask.Text <> "" Then MyRecordset.Criteria.Description = txtDescriptionMask.Text End If MyRecordset.Fields.Clear MyRecordset.Fields.Tagname = True VB.Screen.MousePointer = vbHourglass lStartTime = Timer If Not MyRecordset.QueryRecordset Then Err.Raise 1, , "Tag Query Failed: " + MyRecordset.LastError lEndTime = Timer For I = 1 To MyRecordset.Item.Count lbTags.AddItem MyRecordset.Item(I).Tagname Next I VB.Screen.MousePointer = vbDefault ' Calculate performance statistics lNumSeconds = lEndTime - lStartTime lNumTagsPerSecond = MyRecordset.Item.Count If lNumSeconds > 0 Then lNumTagsPerSecond = MyRecordset.Item.Count / lNumSeconds End If lblAddTime.Caption = MyRecordset.Item.Count & " tags returned in " & lEndTime - lStartTime & " seconds (" & lN MyRecordset.ClearRecordset Set MyRecordset = Nothing Else MsgBox "Not connected" End If Exit Sub errc: MsgBox "TestBrowseTags >> " + Err.Description
- QueryTagAlias Method (TagRecordset Object )
-
This function returns a list of tag aliases for the tag name passed in. Pass in the current name of the tag and this function will return if there are any previous names for the tag due to tag rename.
Syntax object.QueryTagAlias(TagNames(), NumberofTags, TagAlias(), NoOfAliases)
Table 73. Parameters Name Data Type Description TagNames() String Name of the tags to return information on. NumberofTags Long Total count of tag names passed in. This must be equal to 1. TagAlias() String List of 0 or more tag aliases. NoOfAliases Integer The number of tag aliases returned. Returns
Boolean. TRUE if successful. FALSE otherwise.
- QueryUserDefinedType Method (UserDefinedType Object)
-
Queries the Historian Server and loads all the User Defined Types that match the query mask.
Syntax
object.QueryUserDefinedType(Server, QueryMask)Table 74. Parameters Name Data Type Description Server Server The reference to the Historian Server object. QueryMask String A mask string that can be used to search for UserDefinedType on the Historian Server. The string can include wild-card characters like "*" and "?". Returns
Boolean. Indicates whether the query was successful.
- R
- Reload Method (Collector Object)
-
Causes a re-calculation of tags to occur for a specified tag period. You can reload all tags for the time period or specify specific tags that you want to reload.Note: This method is only supported by ServerToServer and Calculation collectors.
Syntax
object.Reload(StartTime, EndTime, [Tags])
Table 75. Parameters Name Data Type Description StartTime Date The time that you want the reload to begin at (read-only). EndTime Date The time that you want the reload to end at (read-only). Tags Variant The specified tag names either in an array of tag names, or in a tagRecordset object for tags that you want to reload (optional). Returns
Boolean. Returns whether or not the Reload operation succeeded.
- Remove Method (TagDependencies Object)
-
Removes a Tag dependency from the current calculation.CAUTION: If no Tagname is specified, all the Tag dependencies will be removed.
Syntax
object.Remove([Tagname])
Table 76. Parameters Name Data Type Description Tagname Variant Name of the tag to remove (optional), default = ""). Returns
Boolean. Whether the Remove operation succeeded.
- RemoveServer Method (ServerManager Object)
-
Removes the specified server from the list of registered servers on the client.
Syntax
object.RemoveServer(ServerName)
Table 77. Parameters Name Data Type Description ServerName String Computer name of the Historian server (read/write). Returns
Boolean. Whether the server was successfully removed from the list.
- Rename Method (Tags Object)
-
Use this method to rename tag names. You can rename a tag permanently by passing an additional parameter as TRUE or FALSE.Note: This method is called within the WriteRecordset method. For more information, refer to the Sample Code section.
Syntax
object.Rename(newTagName, (Optional) RenamePermanent)
Table 78. Parameters Name Data Type Description newTagName String Name of the new tag to rename. RenamePermanent (Optional) Boolean Pass TRUE to permanently rename a tag. Returns
Boolean. Returns whether or not the Rename operation succeeded.
- Restore Alarms Method
-
Restores the alarms.
Syntax
object.RestoreAlarms
Table 79. Parameters Name Data Type Description RestoreFileName String The name of the file to be restored to the absolute path. Returns
Boolean. Returns TRUE if the alarms have been restored.
Example
Dim Status As ihStatus Dim ReturnStatus As Boolean Status = ihSTATUS_FAILED ReturnStatus = False On Error GoTo errc Status = ihRestoreAlarms(MyServer.Handle, RestoreFileName, 0) If Status <> ihSTATUS_OK Then err.Raise 1, , "Error in restoring the alarms [" + ErrorDescription(Status) + "," ReturnStatus = True RestoreAlarms = ReturnStatus errc: zLastError = "Purge Alarms>> " + err.Description RestoreAlarms = ReturnStatus End Function
- S
- SaveSet Method (EnumeratedSets Object)
-
Saves the Enumerated Set that has been passed into the Historian Server.
Syntax
object.SaveSet(SetTosave)
Table 80. Parameters Name Data Type Description SetToSave EnumeratedSet The set that is passed in to be saved. Returns
None.
- SaveSet Method (UserDefinedType Object)
-
Saves the UserDefinedType that has been passed into the Historian Server.
Syntax
object.SaveSet(Handle, MySet, Datatype)Table 81. Parameters Name Data Type Description Handle Long Server handle. MySet UserDefinedType The UserDefinedType to be saved. DataType ihDatatype The data type of the UserDefinedType Returns
Boolean. Returns TRUE if the UserDefinedType is saved.
- SaveToCollectorProperty Method (OPCFilters Object)
-
Saves the current filter configuration in the Collector object.
Syntax
object.SaveToCollectorProperty(Collector)
Table 82. Parameters Name Data Type Description Collector Variant The Collector object in which to save the filtering information. Returns
Boolean true on success, false otherwise.
- SaveUserCalcLibrary Method (Server Object)
-
Saves the given user calculation library to the Server object. This will update the set of user-created functions and subroutines available for calculations on this Server. The new calculation library must be passed in as an array of UserCalcFunctions.
This list of functions will replace any existing user calculation library on the Server. To save an empty calculation library, pass a non-array value such as Empty.
Syntax
object.SaveUserCalcLibrary(UserCalcFunctions)
Table 83. Parameters Name Data Type Description UserCalcFunctions Variant Array of UserCalcFunction objects. Returns
Boolean. Returns whether or not the calculation library was saved successfully.
Example
Dim MyServer As New iHistorian_SDK.Server Dim MyUserCalcFunctions() As iHistorian_SDK.UserCalcFunction Dim MyNewFunction As New iHistorian_SDK.UserCalcFunction ' Connect to the local server If Not MyServer.Connect("", "", "") Then err.Raise 1, , "Failed to connect to the local server" End If ' Load the calculation library MyServer.LoadUserCalcLibrary MyUserCalcFunctions ' Create a new function MyNewFunction.Name = "Sum" MyNewFunction.Definition = "Function Sum(a, b)" & vbCrLf & "Sum = a + b" & vbCrLf & "End Function" ' Add it to the loaded library If IsArray(MyUserCalcFunctions) Then ReDim Preserve MyUserCalcFunctions(UBound(MyUserCalcFunctions) + 1) Else ReDim MyUserCalcFunctions(0) End If Set MyUserCalcFunctions(UBound(MyUserCalcFunctions)) = MyNewFunction ' Save the changes to the calculation library If Not MyServer.SaveUserCalcLibrary(MyUserCalcFunctions) Then err.Raise 1, , "Failed to save the calculation library" End If
- SelectAll Method (TagRecordset Object)
-
Selects each tag in the current TagRecordset. Use in conjunction with the Master tag to perform bulk update operations on the selected tags of the TagRecordset.
Syntax
object.SelectAll
Parameters
None.
Returns
None.
Example
' Query for tags Set MyRecordset = MyServer.Tags.NewRecordset MyRecordset.QueryRecordset ' Select all tags MyRecordset.SelectAll ' Update the HiEngineeringUnits for all tags MyRecordset.Master.HiEngineeringUnits = 300 ' Commit changes MyRecordset.WriteRecordset
- SetFields Method (DataRecordset Object)
-
Sets the DataValue fields to return from the Historian server when a DataRecordset query is executed.
Syntax
object.SetFields(Params)
Table 84. Parameters Name Data Type Description Params Variant Array of DataValue fields to set. Returns
Boolean. Success / Failure
- SetFields Method (MessageRecordset Object)
-
Set a list of desired Fields to be returned for the messages.
Syntax
object.SetFields(Params)
Table 85. Parameters Name Data Type Description Params Variant Array of Message fields Returns
Boolean. Success / Failure
- SetFields Method (TagRecordset Object)
-
Sets the Fields to retrieve in the TagRecordSet.
Syntax
object.SetFields(Params)
Table 86. Parameters Name Data Type Description Params Variant The array of field values to set. Returns
Boolean. Success / failure.
- SetNames Method (EnumeratedSets Object)
-
This function returns an array of names of all the loaded Enumerated Sets within the Historian server object.
Syntax
object.SetNames()
Parameters
None.
Returns
String Array.
- ShowErrorListDialog Method (Server Object)
-
Displays a window that details errors messages accumulated during the current session of the Server object. Each message is timestamped at the time the error generated and includes an error message translated into the locale of the client when possible.
Syntax
object.ShowErrorListDialog
Parameters
None.
Returns
None
Example
ErrorTrap: ' On error display the error list window If MyServer.ErrorList.count > 0 Then MyServer.ShowErrorListDialog End If
- SubscribeAlerts Method (Messages Object)
-
Subscribes to alert messages reported by the Historian Server. As the server receives alerts, the Historian server publishes messages to any client signed up for alerts.
- To subscribe to messages of specific types, supply a topic.
- To subscribe to all topics, do not supply a topic. Subscribe all is the default.
- Subscribe to individual topics by making multiple calls to the SubscribeAlerts with different topics.
- To subscribe to all topics, call SubscribeAlerts and pass 0.
- To unsubscribe to a specific topic or all topics, call SubscribeAlerts and supply the Subscribe parameter set to False.
The Alert_Received event of the Messages object reports alert messages to the client asynchronously.
Syntax
object.SubscribeAlerts(Topic, Subscribe)
Table 87. Parameters Name Data Type Description Topic ihMessageTopic Topics of Alerts to subscribe to (optional, default = All). Subscribe Boolean Flag to subscribe / unsubscribe to alerts (optional, default = True). Set to False to unsubscribe. Returns
Boolean. Returns whether or not the SubscribeAlerts operation succeeded.
- SubscribeChanges Method (Tags Object)
-
Subscribes to changes in tag configuration. The Historian server publishes messages to any client signed up for tag configuration changes as modifications are saved to the tag database.
The system reports tag configuration messages asynchronously to the client through the ChangeReceived event of the Tags Object.
To unsubscribe to a specific tag, or all tags, call SubscribeChanges and supply the Subscribe parameter set to False.
Syntax
object.SubscribeChanges(Tagname, Subscribe)
Table 88. Parameters Name Data Type Description Tagname String Name of tag to Subscribe for configuration changes (read-only). Subscribe Boolean Flag to Subscribe/Unsubscribe to tag changes (default = True). Returns
Boolean. Returns whether or not the SubscribeChanges operation succeeded.
- SubscribeData Method (Data Object)
-
Subscribes to changes in the current value of a specific tag. The Historian server publishes messages as new values are received to any client signed up for current value changes. To qualify as a new current value, any new data point must have a newer timestamp than the previously established current value. Values received by the Historian server have passed a deadband check by the collector reporting the data. Since new current values have not been compressed, however, values reported as current may not exactly match those that reach the archive.
You can use the MinimumElapsedTime, in milliseconds, to throttle the rate at which current values are reported to a specific server connection. If the same tag is subscribed twice, the last supplied MinimumElapsedTime is used. If MinimumElapsedTime is not supplied, or is zero, the system reports all current values.
The system reports current values asynchronously to the client through the DataReceived event of the Data object.
To unsubscribe to a specific tag, or all tags, call SubscribeData and set the Subscribe parameter to False.
Syntax
object.SubscribeData(Tagname, MinimumElapsedTime, Subscribe)
Table 89. Parameters Name Data Type Description Tagname String Name of the tag to Subscribe for current values (read-only). MinimumElapsedTime MinimumElapsedTime Minimum elapsed time (ms) between values (read-only). Subscribe Boolean Flag to subscribe/unsubscribe to current values (read-only). Returns
Boolean. Operation success / fail
- SubscribeMessages Method (Messages Object)
-
Subscribes to messages reported by the Historian Server. The Historian Server publishes messages as messages are received to any client signed up for messages. As an option, you may supply a topic to subscribe only to messages of specific types. If you do not supply a topic, all topics are subscribed. You can subscribe to individual topics by making multiple calls to the SubscribeMessages method with different topics, or pass 0 to subscribe to all topics.
The system reports alert messages asynchronously to the client through the Message_Received event of the Messages object.
To unsubscribe to a specific topic, or all topics, call SubscribeMessages and set the Subscribe parameter to False.
Syntax
object.SubscribeMessages(Topic, Subscribe)
Table 90. Parameters Name Data Type Description Topic ihMessageTopic Topics of messages to Subscribe to (optional, default = True). Subscribe Boolean Flag to unsubscribe to a specific topic (optional, default = True). Returns
Boolean. Operation success / fail
- Substitutions Method (MessageFields Object)
-
Determines whether the Substitutions should be returned in the MessageRecordset query.
Syntax
object.Substitutions
Parameters
None
Returns
None
Example
Dim maMyMessages As iHistorian_SDK.MessageRecordset Set MyMessages = GetServer.Messages.NewRecordset With MyMessages.Fields .Topic = True .TimeStamp = True .MessageString = True .Substitutions = True End With
- T
- TestCalculation Method (Tag Object)
Runs the calculation currently stored in the Calculation property. This calculation will be run with a current time of "Now". The results of the calculation will be stored in the Value and DataQuality parameters.
If an error occurs during the test, a description of the error will be stored in the ErrorMessage parameter.Syntax
object.TestCalculation(Value, DataQuality, ErrorMessage)
Table 91. Parameters Name Data Type Description Value Variant Value of the calculation result. DataQuality String Quality of the calculation result. ErrorMessage String Description of any error that occurred during the test. Returns
Boolean. Operation success / fail
- TranslateMessage Method (Server Object)
Returns a translated message or prompt based on the current locale and the MessageNumber specified. If no translation is available for the current locale, the method uses the default message.
To insert context specific information into the generic message string, use substitutions. For example, the generic message string:
requires two substitutions, the first being the server, and the second being the error number.Connection To Server:[1] Failed With Error Number: [2]
The substituted message then reads:Connection To Server: USGB014 Failed With Error Number: 65535.
Syntax
object.TranslateMessage(MessageNumber, DefaultMessage, Substitutions)Table 92. Parameters Name Data Type Description MessageNumber Long Message or prompt number to translate (read-only). DefaultMessage String Default message to translate (optional, read-only). Substitutions ParamArray Ordered substitutions into message (optional, read-only). Returns
String. The translated message text.
Example
Dim MyServer As New iHistorian_SDK.Server Dim MyPrompt As String ' Connect to the default server If Not MyServer.Connect Then err.Raise 1, , "Failed to authenticate on server " + MyServer.ServerName End If ' Translate the prompt from the connected server MyPrompt = MyServer.TranslateMessage(549, "User: [1]", MyServer.Username) ' Prompt is translated to "User: Fred"
Method Reference U-Z
- U
- UnSelectAll Method (TagRecordset Object)
-
Applies to:
Clears all selections in the current TagRecordset. See the SelectAll method and the Master Tag Property.
Syntax
object.UnSelectAll
Parameters
None
Returns
None
Example
' Clear any current selection MyRecordset.UnSelectAll
- UserCalcFunctionsFromString Method (Server Object)
Applies to:
Converts the given string to an array of user calculation functions. The string is assumed to have been generated from a call to UserCalcFunctionsToString.If no functions exist in the string, UserCalcFunctions will be set to Empty.
Syntax
object.UserCalcFunctionsFromString(FuncStr, UserCalcFunctions)
Table 93. Parameters Name Data Type Description FuncStr String String to convert. UserCalcFunctions Variant Resulting array of UserCalcFunction objects. Returns
Boolean. Conversion successful / failed.
- UserCalcFunctionsToString Method
Applies to:
Converts the given array of user calculation functions to a string.
To convert an empty set of functions, pass a non-array value such as Empty.
Syntax
object.UserCalcFunctionsToString(UserCalcFunctions, FuncStr)
ReturnsTable 94. Parameters Name Data Type Description UserCalcFunctions Variant Array of UserCalcFunction objects. FuncStr String String resulting from conversion Boolean. Conversion successful / failed.
- W
- WriteArray Method (DataRecordset Object)
-
Applies to:
Attempt to write a set of Data to the Historian archiver.Note: This function is not fully implemented yet and will always returnfalse current DataRecordset
before it imports the specified file.Syntax
object.WriteArray(DataArray)
Table 95. Parameters Name Data Type Description DataArray Variant Data Array to be written to the Historian archiver. Returns
Boolean. Write succeeded / failed.
- WriteRecordset Method (DataRecordset Object)
-
Applies to:
Saves changes made to the DataRecordset object to the Historian server. If DataValues have not changed, the method does not write DataValues to the server.
Syntax
object.WriteRecordset
Parameters
None
Returns
Boolean. Write succeeded / failed.
- WriteRecordset Method (MessageRecordset Object)
-
Applies to:
Saves changes made to the MessageRecordset object to the Historian server. Only new messages are written to the server.
Syntax
object.WriteRecordset
Parameters
None
Returns
Boolean. Write succeeded / failed.
- WriteRecordset Method (TagRecordset Object)
Applies to:
Saves changes made to the TagRecordset Object to the Historian server. If tags have not changed, they are not re-written to the server.
Syntax
object.WriteRecordset([UseMasterTag])
Table 96. Parameters Name Data Type Description UseMasterTag Boolean Whether to apply Master tag changes to all tags (read-only optional). Returns
Boolean. Write succeeded / failed.- X
- XML Method (DataRecordset Object)
Applies to:
Returns an XML document fragment representing the DataValues and DataFields contained in the current DataRecordset.
Syntax
object.XML([XMLHeader], [StartIndex], [EndIndex])
Table 97. Parameters Name Data Type Description XMLHeader String XML to include before the DataRecordset XML (optional). StartIndex Long Index of first tag to include in XML (optional). EndIndex Long Index of last tag to include in XML (optional). Returns
String. An XML document fragment string.Example
Dim Recordset As DataRecordset ' Get A New Data Recordset Set Recordset = MyServer.Data.NewRecordset ' Fill In Criteria, Get One Tag For Yesterday With Recordset.Criteria .Tagmask = "MyNode.OneTag.F_CV" .StartTime = DateAdd("d", -1, Now) .EndTime = Now End With ' Fill In Fields, Timestamp and Value With Recordset.Fields .TimeStamp = True .Value = True End With Recordset.QueryRecordset ' Print XML to Debug Window Debug.Print Recordset.XML
- XML Method (MessageRecordset Object)
Applies to:
Returns an XML document fragment representing the Messages and MessageFields contained in the current MessageRecordset.Syntax
object.XML([XMLHeader], [StartIndex], [EndIndex])
Table 98. Parameters Name Data Type Description XMLHeader String XML to include before message XML (read-only, optional). StartIndex Long Index of first message to Include in XML (read-only, optional). EndIndex Long Index of last message to include in XML (read-only, optional). Returns
String. An XML document fragment string.
- XML Method (TagRecordset Object)
Applies to:
Returns an XML document fragment representing the Tags and TagFields contained in the current TagRecordset.Syntax
object.XML([XMLHeader], [StartIndex], [EndIndex])
Table 99. Parameters Name Data Type Description XMLHeader String XML to include before the TagRecordset XML (read-only, optional). StartIndex Long Index of first tag to Include in XML (read-only, optional). EndIndex Long Index of last tag to include in XML (read-only, optional). Example
Dim Recordset As TagRecordset ' Get a new tag recordset Set Recordset = MyServer.Tags.NewRecordset ' Fill in criteria, aet all tags With Recordset.Criteria .Tagname = "*" End With ' Fill in fields, get tagname and description With Recordset.Fields .Tagname = True .Description = True End With Recordset.QueryRecordset ' Print XML to debug window Debug.Print Recordset.XML
Event Reference A-Z
- A
- AlertReceived Event (Messages Object)
-
The AlertReceived event fires each time an alert is reported to a client. This event fires only for those alert topics that you subscribed to by using the SubscribeAlerts method of the Messages object.
Syntax
AlertReceived(NewAlert)
Table 100. Parameters Name Data Type Description NewAlert Message The Alert reported by the Historian server (read-only). Example
' It is necessary to declare Messages "WithEvents" Dim WithEvents MyMessages As iHistorian_SDK.Messages Attribute MyMessages.VB_VarHelpID = -1 Private Sub Form_Load() ' Subscribe To All Alert Topics If Not MyMessages.SubscribeAlerts(ihMessageTopic.Security, True) Then Err.Raise 1, , "Failed To Subscribe" End If End Sub ' Event Procedure Private Sub MyMessages_Alert_Received(NewMessage As Message) ' We Just Received A New Alert With NewMessage Debug.Print "Received Alert " + CStr(.MessageNumber) + _ " " + .MessageString End With End Sub
- C
- ChangeReceived Event (Tags Object)
- Fires each time a tag configuration change is reported to a client. Subscribe to data changes using the current data received event. This event fires only for tags that you subscribed to by using the SubscribeChanges method of the Tags object. You can subscribe to tag changes on a per tag basis or you can pass "" to subscribe to changes on any tag.
Syntax
ChangeReceived(ChangedTag)Table 101. Parameters Name Data Type Description ChangedTag Tag Tag configuration change reported by the server (read-only). - D
- DataReceived Event (Data Object)
-
Fires each time a changed value is reported to a client. This event fires only for tags that you subscribed to by using the SubscribeData method of the Data object.
Syntax
DataReceived(Tagname, Value)Table 102. Parameters Name Data Type Column Header Tagname String Tag with the current value change reported by the server (read-only). Value DataValue Value reported by the server (read-only). Example' It is necessary to declare Data "WithEvents" Dim WithEvents MyData As iHistorian_SDK.Data Attribute MyData.VB_VarHelpID = -1 Private Sub Form_Load() ' Subscribe To Changes If Not MyData.SubscribeData("USGB014.FIC101.F_CV", 5000, True) Then Err.Raise 1, , "Failed To Subscribe" End If End Sub ' Event Procedure Private Sub MyData_DataReceived(Tagname As String, DataValue As DataValue) ' We Just Received a Current Value Update With DataValue Debug.Print "Received Current Value For " + Tagname + " " + _ " At " + Format$(.TimeStamp) + " With Value of " + _ CStr(.Value) End With End Sub
- M
- MessageReceived Event (Messages Object)
- ) Fires each time a message is reported to a client. This event fires only for message topics that you subscribed to by using the SubscribeMessages method of the Messages object.
Syntax
MessageReceived(NewMessage)Table 103. Parameters Name Data Type Description NewMessage Message Message reported by the Historian Server (read-only). - S
- StatusReceived Event (Archives Object)
-
Fires each time a tag configuration change is reported to a client. This event fires only if the SubscribeStatus property of the Archives object is set to true.
Syntax
StatusReceived(ChangedArchive)Table 104. Parameters Name Data Type Description ChangedArchive Archive Reported change for Historian server archive (read-only). Example' It is necessary to declare Archives "WithEvents" Dim WithEvents MyArchives As iHistorian_SDK.Archives Attribute MyArchives.VB_VarHelpID = -1 Private Sub Form_Load() ' Subscribe To Changes MyArchives.SubscribeStatus = True End Sub ' Event Procedure Private Sub MyArchives_StatusReceived(ChangedArchive As Archive) ' We Just Received An Archive Status Update With ChangedArchive Debug.Print "Received Update For " + .Name + " (" + .FileName + ")" End With End Sub
- StatusReceived Event (Collectors Object)
-
Fires each time a Collectors' status or configuration change is reported to a client. This event fires only if the SubscribeStatus property of the Collectors object is set to True.
Syntax
StatusReceived(ChangedCollector)Table 105. Parameters Name Data Type Description ChangedCollector Collector Reported change for collector (read-only). Example' It is necessary to declare Collectors "WithEvents" Dim WithEvents MyCollectors As iHistorian_SDK.Collectors Attribute MyCollectors.VB_VarHelpID = -1 Private Sub Form_Load() ' Subscribe To Changes MyCollectors.SubscribeStatus = True End Sub
- T
- TagnameChangeReceived Event (Tags Object)
-
Occurs each time a tag is renamed. This event occurs only for tags that you subscribed to by using the SubscribeChanges method of the Tags object. You can subscribe to tag changes on a per tag basis or you can pass "" to subscribe to changes on any tag.
Syntax
TagnameChangeReceived(ChangedTag, oldTag)Table 106. Parameters Name Data Type Description ChangedTag Tag Tag rename change reported by the server (read-only). oldTag String Old tag name reported by the server (read-only).