
'Declaration
<CLSCompliantAttribute(True)> <ComDefaultInterfaceAttribute(OpcLabs.EasyOpc.DataAccess.OperationModel.ComTypes._DAVtqResult)> <ComVisibleAttribute(True)> <GuidAttribute("6075EE51-ED43-48F6-A61C-B7E814D7C7B0")> <TypeConverterAttribute(System.ComponentModel.ExpandableObjectConverter)> <ValueControlAttribute("OpcLabs.BaseLib.Forms.Common.ObjectSerializationControl, OpcLabs.BaseLibForms, Version=5.72.465.1, Culture=neutral, PublicKeyToken=6faddca41dacb409", DefaultReadWrite=False, Export=True, PageId=10001)> <SerializableAttribute()> Public Class DAVtqResult Inherits OpcLabs.BaseLib.OperationModel.OperationResult Implements LINQPad.ICustomMemberProvider, OpcLabs.BaseLib.ComTypes._Info, OpcLabs.BaseLib.ComTypes._Object2, OpcLabs.BaseLib.OperationModel.ComTypes._OperationResult, OpcLabs.EasyOpc.DataAccess.OperationModel.ComTypes._DAVtqResult, System.ICloneable, System.IFormattable, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable
'Usage
Dim instance As DAVtqResult
[CLSCompliant(true)] [ComDefaultInterface(OpcLabs.EasyOpc.DataAccess.OperationModel.ComTypes._DAVtqResult)] [ComVisible(true)] [Guid("6075EE51-ED43-48F6-A61C-B7E814D7C7B0")] [TypeConverter(System.ComponentModel.ExpandableObjectConverter)] [ValueControl("OpcLabs.BaseLib.Forms.Common.ObjectSerializationControl, OpcLabs.BaseLibForms, Version=5.72.465.1, Culture=neutral, PublicKeyToken=6faddca41dacb409", DefaultReadWrite=false, Export=true, PageId=10001)] [Serializable()] public class DAVtqResult : OpcLabs.BaseLib.OperationModel.OperationResult, LINQPad.ICustomMemberProvider, OpcLabs.BaseLib.ComTypes._Info, OpcLabs.BaseLib.ComTypes._Object2, OpcLabs.BaseLib.OperationModel.ComTypes._OperationResult, OpcLabs.EasyOpc.DataAccess.OperationModel.ComTypes._DAVtqResult, System.ICloneable, System.IFormattable, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable
[CLSCompliant(true)] [ComDefaultInterface(OpcLabs.EasyOpc.DataAccess.OperationModel.ComTypes._DAVtqResult)] [ComVisible(true)] [Guid("6075EE51-ED43-48F6-A61C-B7E814D7C7B0")] [TypeConverter(System.ComponentModel.ExpandableObjectConverter)] [ValueControl("OpcLabs.BaseLib.Forms.Common.ObjectSerializationControl, OpcLabs.BaseLibForms, Version=5.72.465.1, Culture=neutral, PublicKeyToken=6faddca41dacb409", DefaultReadWrite=false, Export=true, PageId=10001)] [Serializable()] public ref class DAVtqResult : public OpcLabs.BaseLib.OperationModel.OperationResult, LINQPad.ICustomMemberProvider, OpcLabs.BaseLib.ComTypes._Info, OpcLabs.BaseLib.ComTypes._Object2, OpcLabs.BaseLib.OperationModel.ComTypes._OperationResult, OpcLabs.EasyOpc.DataAccess.OperationModel.ComTypes._DAVtqResult, System.ICloneable, System.IFormattable, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable
The result is successful if the OpcLabs.BaseLib.OperationModel.OperationResult.Exception is a null reference. Otherwise, this property contains information about the reason of the failure.
In OPC Data Access, reading data from OPC items is one of the most common tasks. The OPC server generally provides current data for any OPC item in form of a Value, Timestamp and Quality combination (VTQ).
If you want to read the current VTQ from a specific OPC item, call the ReadItem method. You pass in individual arguments for machine name, server class, ItemID, and an optional data type. You will receive back a DAVtq object holding the current value, timestamp, and quality of the OPC item. The ReadItem method returns the current VTQ, regardless of the quality. You may receive an Uncertain or even Bad quality (and no usable data value), and your code needs to deal with such situations accordingly.
In QuickOPC.NET, you can also pass ServerDescriptor and DAItemDescriptor objects in place of individual arguments to the ReadItem method.
For reading VTQs of multiple items simultaneously in an efficient manner, call the ReadMultipleItems method (instead of multiple ReadItem calls in a loop). You will receive back an array of DAVtqResult objects.
In QuickOPC.NET, you can pass in a ServerDescriptor object and an array of DAItemDescriptor objects, or an array of DAItemArguments objects, to the ReadMultipleItems method.
In QuickOPC.NET, you can use the optional argument of type DAReadParameters, and then set the ValueAge property in it to control how “old” may be the values you receive by reading from OPC items. With the DataSource property, you can also specify that you want values from the device, or from cache. You can also use the pre-defined DAReadParameters.CacheSource and DAReadParameters.DeviceSource constants to specify the read parameters. There are also overloads of ReadXXXX methods that accept an integer valueAge argument.
In .NET languages, there is an implicit conversion operator from Int32 to DAReadParameters, which means that you can simply use the number of milliseconds that represents the value age in place of any argument that expects the read parameters (the DAReadParameters object). There is also a FromInt32 Method which has the same functionality as this conversion operator.
In addition, there is also an implicit conversion from the DADataSource Enumeration to DAReadParameters. You can therefore use the enumeration members such as DADataSource.Cache or DADataSource.Device in place of the read parameters. The FromDADataSource Method has the same functionality as this conversion operator.
The default setting of read parameters, which specifies a non-zero value age, may sometimes "bite" you, if you expect to receive an up-to-date value from the data source. Furthermore, you may even receive a "bad quality" indication with some first reads, because the (OPC server) cache is not yet filled with valid data. Make sure to specify the value age that is appropriate for particular read operation in your application, if the default behavior is not what you want.
Reading from the device (or using very short value age) is, however, an ineffective practice that is discouraged, and should only be used when absolutely necessary.
Be aware that it is physically impossible for any system to always obtain fully up-to-date values all the time.
System.Object
OpcLabs.BaseLib.Object2
OpcLabs.BaseLib.Info
OpcLabs.BaseLib.OperationModel.OperationResult
OpcLabs.EasyOpc.DataAccess.OperationModel.DAVtqResult
OpcLabs.EasyOpc.DataAccess.Generic.DAVtqResult<TValue>