(sorry for my french way to write english)
Hi, After many research on net and doc, i can't resolve my problem
I try to write an array of 150 real to siemens with OPC UA :
PROCÉDURE WriteArrayToNode(NodeIdTxt is string)
Trace("lets write")
myNodeId is NodeId(gsNotreBD+"."+NodeIdTxt)
nodesToWrite is WriteValueCollection <- new WriteValueCollection()
nodeToWrite is WriteValue <- new WriteValue()
nodeToWrite.NodeId = myNodeId
nodeToWrite.AttributeId = Attributes.Value
Trace(Attributes.ValueRank,Attributes.Value,Attributes.ArrayDimensions)
vTemp is Opc.Ua.variant(gTab_W_PARA) //gTab_W_PARA is the array of 150 real i trying to write
clDataValue1 is DataValue <- new DataValue(vTemp);
nodeToWrite.Value=clDataValue1
nodeToWrite.IndexRange="1:150"
nodesToWrite.Add(nodeToWrite);
clRequestHeader is RequestHeader <- new RequestHeader()
myResults is StatusCodeCollection dynamic = new StatusCodeCollection
myDiagsInfo is DiagnosticInfoCollection dynamic = new DiagnosticInfoCollection
request is RequestHeader dynamic = new RequestHeader
gmySession.Write(request,nodesToWrite,myResults,myDiagsInfo)
Trace(myDiagsInfo.get_Count())
Trace("scribe ? ")
RETURN True
Trace(" yes scribe ")
CASE ERROR:
Trace("erreur",ExceptionInfo)
RETURN False
CASE EXCEPTION:
Trace("exception",ExceptionInfo)
RETURN False
The TRACE give :
lets write //start of process
15 13 16 // Attributes.ValueRank,Attributes.Value,Attributes.ArrayDimensions I don't understand :
// With doc, I admit it say Attributes is 15 dimensional array with value of 13 ? and 16
// index, but who is Attributes ? I never use array like that
0
scribe ? //it return true, so there is no error ?
But in siemens my array don't change, so the write not work ? i try use variant and Datavalue like in many example, but i not sure its the good way. if someone can help I thank him in advance