i'm greenhorn to this topic and i have problems getting started. I downloaded the Demo-SDK and craeated a model using the UAModeler.
Basically i can not find a simple example that uses a model generated with the UaModeler. This would be helpfull.
For evaluation I created a model with a folder and 3 variables of type UInt32, String and Boolean.
I use the generated code and succeeded to view the model with the 3 variables using the UaExpert tool.
I override the NodeManager method like:
Code: Select all
public override DataValue ReadAttribute(RequestContext context, NodeAttributeHandle nodeHandle)
{
if(object.Equals(nodeHandle.NodeId.Identifier, VariableIds.WeldTask_JobNumber.Identifier))
{
return new DataValue(new Variant((UInt32)1));
}
else
{
return base.ReadAttribute(context, nodeHandle);
}
}
This is the only change i made to the generated code.
The method is being called as expected, when i click on the node in the UaExpert.
I can identify the requested variable and return a value = 1
The timestamp is showed in the ua expert but the values is always 0.
I tried the same with the boolean and string variable - corresponding results with timestamps successfully transmitted but values shows default.
Question:
- Can somebody explain why i receive a timestamp but no values at all?