Issue writing specific index of an array type.
- I'm trying to write specific indexes of an array node defined in Kepware.
- Node defined as a float array of length 10
- I get an error while the similar pattern for reading works.
- How do I achieve this? Please provide examples.
UAEndpointDescriptor endpointDescriptor = "opc.tcp://localhost:49320";
// Following code returns an error and fails to write specific index values of a float array type
//
var writeAttributeArguments = new UAWriteValueArguments(endpointDescriptor, nodeElementCollection[3].NodeId, new float[] { 7.7F, 8.8F, 9.9F })
{
IndexRangeList = UAIndexRangeList.OneDimension(2, 4),
};
var writeResponses = client.WriteMultipleValues(new UAWriteValueArguments[] { writeAttributeArguments});
// Write response values
// Write result : False,
// ErrorId : Opc.UA.ServiceResult=0x80730000,
// ErrorMessage : OPC UA service result - {BadWriteNotSupported}. The server does not support writing the combination of value, status and timestamps provided. A list of parts provided (or not provided) to the Write service follows.
// Value: yes, index range: yes, source timestamp: no, server timestamp: no.
// Following code for read multiple values work with read of specific indexes of a float array type
//
var attributeArguments = new UAReadArguments(endpointDescriptor, nodeElementCollection[3].NodeId)
{
IndexRangeList = UAIndexRangeList.OneDimension(2,4),
};
var readResponse = client.ReadMultipleValues(new UAReadArguments[] { attributeArguments});