Thanks for this quick response.
1. I thought if I only subscribe to the variables i do not have all current values from the server. I need to get the all current values at the time when initialize my program and of course I want to know when the values are changing.
2. & 3. When the reading operation perform the cpu usage is really low, near to zero with small peaks of maybe 3%, I checked it in the diagnosis tool of the visual studio and it does not matter whether the sampling rate is 50 ms or 250 ms.
4. Yes, I mean the reading operation ended and the values of our structure still has all its default values but not the current and right values.
Here is a code snipped:
client = new EasyUAClient();
clientMapper = new UAClientMapper(client);
axisDescriptor = new UANodeDescriptor
{
BrowsePath = UABrowsePath.Parse(browseName, defaultNamespaceUri)
};
lock (MapLock)
{
ClientMapper.Map(MappedMotionAxis,
new UAMappingContext
{
EndpointDescriptor = serverInstance.DiscoveryUriString,
NodeDescriptor = axisDescriptor,
MonitoringParameters = 250
});
}
ClientMapper.Subscribe(true);
// This reading operation takes about 54 seconds
ClientMapper.Read();
Our Mapped properties have the following attributes
[UANode(BrowsePath = ".Initialize"), UAData(Operations = UADataMappingOperations.All, Kind = UADataMappingKind.Value), UAMonitoring(SamplingInterval = 50), UASubscription(PublishingInterval = 100)]
public bool Initialize
{
get { return initialize; }
set { SetProperty(ref initialize, value); }
}
What we were trying to achieve is the following. Our plc is controlling some motion axes and we want to view the current values and want to change values to set some commands for the motions and the 27 variables are only used to control one the axes. We may need to control about 30 to 40 axis in that way.
I hope I could answer your questions properly.