From: ...
Sent: Thu 9/23/2010 2:41 AM
To: Zbynek Zahradnik
Subject: WriteMultipleItems
[...] . I am trying to use the WriteMultipleItems method but I keep getting an error, something like "OPC server doesn't support timestamp and/or state"...or somthing like that. I can't figure out how to populate the array for the write. Can you tell me what I am doing wrong? Here is the code snippet after trying several variations;
Dim m_asTagsToWrite(5) As DAItemVtqArguments
Dim MsgID As String = fnConvertMessagetoID(tmpMsg.Command)
m_asTagsToWrite(0) = New DAItemVtqArguments(se.ServerClass, "Channel1.ADAM_GE.API." & TAG_IN_MESSAGE, New DAVtq(MsgID), New Object()) ', Nothing, Nothing) ', Now, New DAQuality())
m_asTagsToWrite(1) = New DAItemVtqArguments(se.ServerClass, "Channel1.ADAM_GE.API." & TAG_IN_PARAM_ADAM, New DAVtq(tmpMsg.Params.ADAMID), New Object()) ', Now, New DAQuality())
m_asTagsToWrite(2) = New DAItemVtqArguments(se.ServerClass, "Channel1.ADAM_GE.API." & TAG_IN_PARAM_DEST, New DAVtq(tmpMsg.Params.DestinationID), New Object()) ', Now, New DAQuality())
m_asTagsToWrite(3) = New DAItemVtqArguments(se.ServerClass, "Channel1.ADAM_GE.API." & TAG_IN_PARAM_NEST, New DAVtq(tmpMsg.Params.NestID), New Object()) ', Now, New DAQuality())
m_asTagsToWrite(4) = New DAItemVtqArguments(se.ServerClass, "Channel1.ADAM_GE.API." & TAG_IN_PARAM_PART, New DAVtq(tmpMsg.Params.PartID), New Object()) ', Now, New DAQuality())
m_asTagsToWrite(5) = New DAItemVtqArguments(se.ServerClass, "Channel1.ADAM_GE.API." & TAG_IN_MSG_READY, New DAVtq("True"), New Object()) ', Now, New DAQuality())
Dim opResults() As OperationResult = m_OPC.WriteMultipleItems(m_asTagsToWrite)
I hope you can understand this code enough to figure this out because I've tried everything I can and can't figure it out.
Thank you. Submitted By: I.