OPC Labs EasyOPC “Classic” Components Library
WriteItem Method
OpcLabs_EasyOpcClassicComponents ActiveX DLL > EasyDAClient Object : WriteItem Method

Description
Writes separately given value, timestamp and quality into a named item using individual parameters specifying its location, and a specific data type.

 

DISPID (Dispatch ID):

 

For more information, see WriteItem in .NET Reference.

Syntax
Visual Basic
Public Sub WriteItem( _
   ByVal machineName As String, _
   ByVal serverClass As String, _
   ByVal itemId As String, _
   ByVal value As Variant, _
   ByVal timestamp As Date, _
   ByVal quality As DAQualities _
) 
Parameters
machineName

serverClass

itemId

value

timestamp

quality
ValueDescription
DAQualities_BadNonspecificNon-specific. Substatus for BAD Quality: The value is bad but no specific reason is known.
DAQualities_CommFailureComm Failure. Substatus for BAD Quality: Communications have failed. There is no last known value is available.
DAQualities_ConfigErrorConfiguration Error. Substatus for BAD Quality: There is some server specific problem with the configuration. For example the item in question has been deleted from the configuration.
DAQualities_DeviceFailureDevice Failure. Substatus for BAD Quality: A device failure has been detected.
DAQualities_EguExceededEngineering Units Exceeded. Substatus for UNCERTAIN Quality: The returned value is outside the limits defined for this parameter. Remark: In this case (per the Fieldbus Specification) the ‘Limits’ field indicates which limit has been exceeded but does NOT necessarily imply that the value cannot move farther out of range.
DAQualities_GoodNonspecificNon-specific. Substatus for GOOD Quality: The value is good. There are no special conditions.
DAQualities_LastKnownLast Known Value. Substatus for BAD Quality: Communications have failed. However, the last known value is available. Remark: The ‘age’ of the value may be determined from the TIMESTAMP in the OPCITEMSTATE.
DAQualities_LastUsableLast Usable Value. Substatus for UNCERTAIN Quality: Whatever was writing this value has stopped doing so. The returned value should be regarded as ‘stale’. Remark: This differs from a BAD value with Substatus 5 (Last Known Value). That status is associated specifically with a detectable communications error on a ‘fetched’ value. This error is associated with the failure of some external source to ‘put’ something into the value within an acceptable period of time. Remark: The ‘age’ of the value can be determined from the TIMESTAMP in OPCITEMSTATE.
DAQualities_LocalOverrideLocal Override. Substatus for GOOD Quality: The value has been Overridden. Typically this is means the input has been disconnected and a manually entered value has been ‘forced’.
DAQualities_NotConnectedNot Connected. Substatus for BAD Quality: The input is required to be logically connected to something but is not. This quality may reflect that no value is available at this time, for reasons like the value may have not been provided by the data source.
DAQualities_OutOfServiceOut of Service. Substatus for BAD Quality: The block is off scan or otherwise locked. This quality is also used when the active state of the item or the group containing the item is InActive.
DAQualities_SensorCalSensor Not Accurate. Substatus for UNCERTAIN Quality: Either the value has ‘pegged’ at one of the sensor limits (in which case the limit field should be set to 1 or 2) or the sensor is otherwise known to be out of calibration via some form of internal diagnostics (in which case the limit field should be 0).
DAQualities_SensorFailureSensor Failure. Substatus for BAD Quality: A sensor failure had been detected (the ’Limits’ field can provide additional diagnostic information in some situations).
DAQualities_SubnormalSub-Normal. Substatus for UNCERTAIN Quality: The value is derived from multiple sources and has less than the required number of Good sources.
DAQualities_UncertainNonspecificNon-specific. Substatus for UNCERTAIN Quality: There is no specific reason why the value is uncertain.
DAQualities_WaitingForInitialDataWaiting for Initial Data. Substatus for BAD Quality: After Items are added to a group, it may take some time for the server to actually obtain values for these items. In such cases the client might perform a read (from cache), or establish a ConnectionPoint based subscription and/or execute a Refresh on such a subscription before the values are available. This substatus is only available from OPC DA 3.0 or newer servers.

Return Type

See WriteItem in .NET Reference.

Remarks

For remarks, see WriteItem in .NET Reference.

Example

For examples, see WriteItem in .NET Reference.

See Also

EasyDAClient Object  | EasyDAClient Members