Skip to main content

OPC uploader issue

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

Popular posts from this blog

Real time data to web application using Microsoft Signal R and Razor Pages

Today we are going to learn how to create razor pages and how to send run time value to the razor page using Signal R Create a new .NET core web application Add Signal R library by,  Add Client-Side Library dialog in the project, for Provider select "unpkg" and select the latest version from the drop down For Library, enter @aspnet/signalr@1, Add a new folder to the project named as Hubs The chat hub class inherits from HUb class that manages connections and messaging The send message is called to send the message to all the clients. MyHub.cs file contains the following code using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.SignalR; //using System.Threading.Tasks; namespace SignalRSample.Hubs {     public class MyHub : Hub     {         public async Task SendMessage(string user, string message)         {       ...

CRUD operation with WCF service and WPF client

 The database restored on local server WCF Service is talking to the database. Used Visual Studio 2019, entity framework 6 for data base operations from the service. The service exposes the following API’s.  The WCF contracts has both synchronous and asynchronous API's The client is in WPF. It has three windows, main window, customer window and order window as follows. The client uses the WCF service for database operations. When customer button is clicked, the customer window is displayed as below. We can perform CRUD operation from it. The customer can be searched based on ID. New customer window The order button launched order window. It has combo box to choose the customer ID. On selecting the ID, the order details are displayed in the data grid as follows. The source code is available in the GIT hub, URL below: https://github.com/SwagatikaGoswami/WPF_WCF_CRUD.git

Online Exam App with .NET Core Web API and Blazor Client

 We will develop an app that can host online exam. It will have the feature to register user, allow the user to log in. Dashboard for creating sample tests.  The code is shared in GIT hub repository https://github.com/ SwagatikaGoswami/ OnlineExamApp.git The database is MySQL database. The server is a WEB API .NET Core service that uses entity framework for DB operations. The client is a web assembly blazor application. The password stored in the database is encrypted. Register window is as follows. It checks for the mandatory fields. The log in page is as follows: The admin dashboard after logging in  The admin dashboard when new test button is clicked. It uses a Blazor component for adding new test samples.