A very basic question I'm sure. I have made the client and the server from the examples on http://node-opcua.github.io/.
The example demonstrates reading the variables but not how to write.
Thanks for the help
A very basic question I'm sure. I have made the client and the server from the examples on http://node-opcua.github.io/.
The example demonstrates reading the variables but not how to write.
Thanks for the help
On
You can use the session#write method
function (callback) {
var setPointTemperatureId = "ns=4;s=SetPointTemperature";
var nodesToWrite = [
{
nodeId: setPointTemperatureId,
attributeId: AttributeIds.Value,
value: /*new DataValue(*/{
value: {/* Variant */
dataType: DataType.Double,
value: 10.0
}
}
}
];
session.write(nodesToWrite, function (err, statusCodes) {
if (!err) {
}
callback(err);
});
}
I figured it out for those with the same question see the code below. The writing function is at step 4