Problem: While uploading a large set of OPC properties, the uploader would fail randomly
Analysis:
- Initially the uploader would fail for some properties. On checking these properties via an OPC client everything seemed to be ok. So the easiest fix was to increase the time out of the uploader. This fixed the issue at that point.
- But the fix didn't last long, again some of the properties would fail to subscribe. This time after debugging it was observed that some properties received had bad values. This properties were ignored by the uploader. Hence one more collection was added to keep a tab on those properties and re-subscribe after rest of the properties are uploaded.
- The fix worked for most of the cases and for many days without any issues. Then one fine day the issue reappeared. On further debugging, it was observed that this time the failure was a combination of above two symptoms. Few properties having bad data on re-subscription also failed. The loop would end once the time out is reached and hence few properties would fail under very rare condition.
Solution: In this case a bad understanding of OPC specification and time out implementation was the issue. OPC sends a property change event for each property if the value changes, which was ignored. The solution proposed was to make the start time of the uploader dynamic. The start time would be calculated based on the last good value of a property. The time out will occur if no good value is received during the time out duration set for the uploader. If still some properties fail then the failure is genuine due to bad configuration of property..
Comments
Post a Comment