Quantcast
Channel: OPC Labs - OPC Labs - Recent Topics - OPC Labs Online Forums
Viewing all articles
Browse latest Browse all 1794

Reading / writting values via QuickOPC causes RAM usage (GE iFix, VBA) - by: bvader

$
0
0
Hi,

I am facing issues with high memory usage while executing Read and Write values operations with QuickOPC-UA Client. We are using the application in connection with GE iFix. iFix scripts are written in Visual Basic for Applications 7.1.

We noticed that after a certain amount of time we started getting the "Network transaction in progress" error in iFix. We checked numerous possible reasons for this, because our client was facing poor performance from virtual machines. We first suspected that poor performance of virtual machines was the reason for this error. We conducted additional test on a test sistem in our company where the performance of the computers is not an issued and found out that we can replicated the problem. Above mentioned error message is really a masked Windows system error "Server is Busy....Switch / retry". You can read more about this error here: GE Support

We design SCADA systems and as a part of the system, each command performed on the P&ID screen is recorder to Audit Trail. So if the operator opens a valve on the system an Audi Trail record is generated and stored on the SQL database. The program flow is as follows:

1. User clicks "Activate" on the user form
2. VBA function is called which uses QuickOPC-UA COM component to pass the data to the OPC-UA server.
3. OPC-UA server receives the request and responds (request finished or error message).
4. If there was no error Audit Trail record is stored on the SQL.

We noticed that prior to receiving the "Network transaction in progress" error message RAM usage of the iFix Workspace application (UI environment which hold the VBA code) is very high ad was arrong 1.04 GB at some point. I started isolating the issue and found out if I comment out the call of the AuditTrail function, which usses only QuickOPC-UA functions, I didn't detect any change in RAM usage when the code was executed. If I left the AuditTrail function active, every call of the function caused bump of the RAM usage. After 100, 1000 clicks on the valve and corresponding calls of the AuditTrail function the RAM usage was again significant. If I continued in that matter I started receiving the "Network transaction in progress" error. The OPC-UA server is performing normaly because other clients were working normally.

I thought that we were not handling the QuickOPC-UA component correctly and that something was staying active in the background but as far as I can tell this is not the case. I have changed the usage of the EasyUAClient component by always using the "With" and "End with" sentence. This should clean up any activifty after the use of the component.

For reading of values we are using the code below because we were facing issues with reading old parameter values when the new value was already present on the OPC-UA server. This approach helped (it was response from your support, thanks again).





The function below is a validation function. When we send a trigger to the OPC-UA server we are expecting a response in a form of value 2 or value >=10 if there is an error present. if I execute the code below without the "Do While" sentence I don't get the response quickly enough and am always reading value 1 (trigger set) but this is not the issue of the QuickOPC-UA client rather application specifit because the request hasn't been handled yet by the OPA-UA server. Do you have any other suggestions on how to delay the check of the response?



Viewing all articles
Browse latest Browse all 1794

Trending Articles