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

SDK version upgrade is stoping and crashing application - by: Restrepo

$
0
0
Hello Z,

I am working with a customer that is experiencing the following behavior:

*******************************************************************************************************************************************
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ObjectDisposedException
at System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean ByRef)
at System.StubHelpers.StubHelpers.SafeHandleAddRef(System.Runtime.InteropServices.SafeHandle, Boolean ByRef)
at Microsoft.Win32.Win32Native.SetEvent(Microsoft.Win32.SafeHandles.SafeWaitHandle)
at System.Threading.EventWaitHandle.Set()
at Opc.Ua.Bindings.TcpAsyncOperation`1System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.InternalComplete(Boolean, System.Object)
at Opc.Ua.Bindings.TcpAsyncOperation`1System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.OnTimeout(System.Object)
at System.Threading.TimerQueueTimer.CallCallbackInContext(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.TimerQueueTimer.CallCallback()
at System.Threading.TimerQueueTimer.Fire()
at System.Threading.TimerQueue.FireNextTimers()
at System.Threading.TimerQueue.AppDomainTimerCallback(Int32)

*******************************************************************************************************************************************

and also :


*******************************************************************************************************************************************
OpcLabs.EasyOpc.UA.OperationModel.UAException: An OPC-UA operation failure with error code -1 (0xFFFFFFFF) occurred, originating from ''. The inner exception, of type 'OpcLabs.EasyOpc.UA.Engine.UAClientEngineException', contains details about the problem. ---> OpcLabs.EasyOpc.UA.Engine.UAClientEngineException: Cannot lock the OPC-UA client session because it is not available.
+ The client method called was 'ReadMultiple'.
--- End of inner exception stack trace ---
at OpcLabs.EasyOpc.UA.EasyUAClient.CheckSuccess(OperationResult operationResult)
at OpcLabs.EasyOpc.UA.IEasyUAClientExtension.ReadValue(IEasyUAClient client, UAReadArguments readArguments)
at OpcLabs.EasyOpc.UA.IEasyUAClientExtension.ReadValue(IEasyUAClient client, UAEndpointDescriptor endpointDescriptor, UANodeDescriptor nodeDescriptor)
at Mesabi.MixVision.Opc.Service.OpcServiceLibrary.IsOpcOnline(EasyUAClient opc, String device) in C:\Working\Mesabi\OpcService\Mesabi.MixVision.Opc.Service\OpcServiceLibrary.cs:line 120
at Mesabi.MixVision.Opc.Service.OpcServiceLibrary.GetOpcForCall(String tag) in C:\Working\Mesabi\OpcService\Mesabi.MixVision.Opc.Service\OpcServiceLibrary.cs:line 147
at Mesabi.MixVision.Opc.Service.OpcServiceLibrary.ReadOpcTags(String server, String[] tags, String sender) in C:\Working\Mesabi\OpcService\Mesabi.MixVision.Opc.Service\OpcServiceLibrary.cs:line 0

*******************************************************************************************************************************************

The customer upgraded the quick OPC dlls from 5.50 to 5.54 as well as updating the server to TOP Server 6.6 from V5.21. Since he updated the Dlls he started to get the first exception (The process was terminated due to an unhandled exception) which if I recall correctly, this could possibly be an issue with the "Boxing". We suggested to him to disable the boxing using these instructions - kb.opclabs.com/How_to_disable_prerequisites_boxing - even though we were under the impression that his issue was fixed on version 5.54. but we wanted to see if this had any effect. Ever since he disabled the boxing, he has not seen the exception thrown again; however, the second exception is occurring 2 to 3 times in an hour pretty consistently.

This is only occurring on the production environment which has been updated to the same quick opc version. He has also updated the .NET Runtime to 4.6.2. He is running his service on Server 2016. Have you seen this behavior before? Do you jave any suggestions on what might be the issue? Thanks in advance.

Subscription to events - by: federica

$
0
0
Hi,
I'm using your SDK (QuickOPC 2018.1, in particular OPC-UA under COM with C++) since last year.
Now I need to integrate my application with an OPC-UA server who is generating events that I must subscribe for.
The events are exposed as "Simple Events".

I'm trying to use "SubscribeEvents" method but I can't use it in my C++ COM application.
I also need to access to the datails provided with the event.
Do you have any code sample for doing it or any suggestion?

Thank you

Best regards,
Federica

Installation with LicensingException - by: SolutionNow

$
0
0
We have purchased a license and installed in numerous PCs without problem, until a couple of days ago when a colleague attempted to install the license on two different PCs but he encountered the same licensing error:

Not allowed to run by the license "Multipurpose". You might be using a trial license, and the version of the software you are using is obsolete. Obtain a recent version to resolve this problem.
Component name: "QuickOPC", license IDs: "Multipurpose", version number: 554, release date: 09/11/2018, trial validity: 210 days, option name: "EasyUAClient


In theory we haven't changed version or done anything different compared to previous successful installations, why are we now having this problem?

Thank you

OPC XML-DA. Communication problem - by: Andriy

$
0
0
Hi,

I can't communicate with OPC XML server. Can you help?
I receive next error:
OpcLabs.EasyOpcClassic E_FAIL
Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.
The request failed with the error message:
--

<html>
<head id="Head1"><t-itle>
Error
</title></head>
<body>
<div>
An error occurred while processing your request.
</div>
</body>
</html>

--.

Keep-Alive and inactive subscriptions - by: sjscheider

$
0
0
In our system, we have 3 subscriptions. The data on 1 of the subscriptions changes relatively often, at least every 5 minutes per device. (Typically it is every few seconds, but we've seen instances of ideal devices going for about 5 minutes without data changes.

But for two of the subscription, it is not uncommon for an event not to fire for hours or days. During our testing, we've simulated no events firing for 5+ days and the data change event fired without issue. This is great, but our team has some concerns, so I'm hoping you can answer the following questions for us.
  1. Is there a max value for subscription inactivity?
  2. Is it possible for 1 of the subscriptions to disconnect or "go bad" while the other subscriptions remain active and functioning as normal?
  3. Is there a way to determine when the last keep-alive was received from the server for a given subscription?
  4. Once a subscription has been created, is there any status available on the subscription that can be obtained? Like when the last time a message was received or when the last week-alive was received?
Sorry if you've answered this before. I search the posts and the docs and couldn't find the information.

Unable to connect to Bihler machine using X509 certificate: strange error. - by: scaglio

$
0
0
Hello, I am unable to connect to a Bihler CNC machine using X509 pfx certificate. As you can see in log file attached, the error is:

The OPC-UA client session with connect sequence number 1 failed to connect to endpoint URL "opc.tcp://192.168.4.200:4840". Password di rete specificata non corretta. + The SDK action called was "static Session.Create".

("Password di rete specificata non corretta" = Incorrect specified network password).

I await your kind reply.
Thank you.

Massimo Scaglioni

Slow Update To Listview (Large Amount Of Tags) - by: neilcooley

$
0
0
Hi
I am wondering if you could tell me how to improve my code so I can read over 1000 elements into a listview in real time.

The OP Server is Rockwell FactoryTalk Gateway.



I then repeat this in a for loop incrementing I, from 1 to 750.

I then use a subscribe method to add the tags to an OPC Group;




I then have a callback and update list view function;



The values are displayed but not in real time, there is a lag of approximately 10seconds, then it displays, then there’s another lag then it displays.

What am I doing wrong or is there a better way of achieving this with later release? If I reduce the number of tags then it works perfectly.


If you wish I can send the Visual Studio project file if its easier (VB.net).



Neil

getting null (was: OPC UA Syntax for Simatic.NET UA server) - by: Giuseppe12

$
0
0
I've to read data from Siemens Panel TP 900 Comfort with OPC UA.

I've set
UAEndpointDescriptor endpointDescriptor = "opc.tcp://192.168.107.12:4870";

After I've set
var mapper = new UAClientMapper();

After

where datiseghetto is a class


When I invoke the method
mapper.Read();

no error occurs but the value of "CED_TriggerScritturaVersoUffici" is always null.

Why ? What is wrong ?

Thanks
Giuseppe

Union Complex Data Type - by: kriskazmar

$
0
0
Will QuickOPC-UA .NET be able to decode the data for the following array of structures, where the structure contains a union complex data type? The OPC UA server address space will define the Event, Alarm, Valve and Mode structures, and will define the union complex data type per Part 6 of the OPC UA specification.

Exception in SDK action ApplicationInstance.CheckApplicationInstanceCertificate - by: boppbo

$
0
0
During evaluation of QuickOPC I always get this error. Something seems to be wrong with my certificate store or maybe it is because the computer is Azure-AD-joined.
I already tried deleting all stored certificates with the "UA Configuration Tool".

The simplest step to reproduce the error is to call "EasyUAClient.Install();", but it also happens for the "Read"-Methods of the EasyUAClient.
The only workaround I found is to run the application as administrator.

Using the Official OPC UA .Net Standard Stack (1.4.356) in the current version directly, the error doesn't occur. I saw that the toolkit does't use the current version. Maybe an update of the embedded SDK could help?

Tested Versions:
5.54.1311 net46
5.55.0-rev12 net47

Message:
OpcLabs.EasyOpc.UA.OperationModel.UAException : An OPC-UA operation failure with error code -1 (0xFFFFFFFF) occurred, originating from 'mscorlib'. The inner exception, of type 'System.Security.Cryptography.CryptographicException', contains details about the problem.
---- System.Security.Cryptography.CryptographicException : The specified network password is not correct.

+ The SDK action called was "ApplicationInstance.CheckApplicationInstanceCertificate".
+ The error occurred while creating or checking the (client) application instance certificate. Check event log entries for errors and warnings.
+ The certificate generator path was "C:\[removed]\bin\Opc.Ua.CertificateGenerator.exe".
Stack Trace:
at NetSdkEasyUAClient.Install()
at EasyUAClient.Install()
at OpcClientIntegrationTests.OpcClient_EngineBroken() in OpcClientIntegrationTests.cs line: 30
at
Inner Stack Trace
at CryptographicException.ThrowCryptographicException(Int32 hr)
at X509Utils._LoadCertFromBlob(Byte[] rawData, IntPtr password, UInt32 dwFlags, Boolean persistKeySet, SafeCertContextHandle& pCertCtx)
at X509Utils.LoadCertFromBlob(Byte[] rawData, IntPtr password, UInt32 dwFlags, Boolean persistKeySet, SafeCertContextHandle pCertCtx)
at X509Certificate.LoadCertificateFromBlob(Byte[] rawData, Object password, X509KeyStorageFlags keyStorageFlags)
at X509Certificate2.ctor(Byte[] rawData, String password, X509KeyStorageFlags keyStorageFlags)
at CertificateFactory.Load(X509Certificate2 certificate, Boolean ensurePrivateKeyAccessible)
at CertificateIdentifier.Find(Boolean needPrivateKey)
at ApplicationInstance.CheckApplicationInstanceCertificate(Boolean silent, UInt16 minimumKeySize)
at <>c__DisplayClass31_0.<ValidateOrCreateClientCertificate>b__2()
at UAEngineBase.PerformSdkAction(UASdkCallType callType, Func`1 usingFunction, String name, Action sdkAction)

Error in Live Binding when closing WPF Application - by: treams-gmbh

$
0
0
Hi,

I have implement a live binding in a WPF Application. The binding is working well but when I close the application i got the following error message:

(QickOPC 2018.3)

System.ArgumentException: OPC-DA subscription handle is invalid.
Parametername: handleArray[0]
bei OpcLabs.BaseLib.Utilities.ExceptionUtilities.CheckExceptions(IEnumerable`1 exceptions)
bei OpcLabs.BaseLib.LiveBinding.PointBinder.Operate[TPointActor](IEnumerable`1 pointBindings, Predicate`1 bindingPredicate, Func`2 getParametersFunc, Predicate`1 supportsPredicate, Func`2 getArgumentsTypeFunc, TPointActor actor, ArgumentDirections argumentDirections, Action`3 action, Func`3 succeededFunc)
bei OpcLabs.BaseLib.LiveBinding.PointBinder.InternalSubscribe(Boolean active, IEnumerable`1 pointBindings)
bei OpcLabs.BaseLib.LiveBinding.PointBinder.<>c__DisplayClass72_0.<Subscribe>b__0()
bei OpcLabs.BaseLib.LiveBinding.PointBinder.ExecuteOperationDirect(Action operation)
bei OpcLabs.BaseLib.LiveBinding.PointBinder.ExecuteOperation(Action operation)
bei OpcLabs.BaseLib.LiveBinding.PointBinder.Subscribe(Boolean active, IEnumerable`1 pointBindings)
bei OpcLabs.BaseLib.LiveBinding.PointBinder.Subscribe(Boolean active, IEnumerable`1 bindingGroups)
bei OpcLabs.BaseLib.LiveBinding.PointBinder.Subscribe(Boolean active, PointBindingGroup bindingGroup)
bei OpcLabs.BaseLib.LiveBinding.PointBindingGroup.ExecuteSubscribe(Boolean active)
bei OpcLabs.BaseLib.LiveBinding.PointBindingGroup.MakeLinks(Boolean make)
bei OpcLabs.BaseLib.LiveBinding.AbstractBindingGroup.set_OnlineBinder(AbstractBinder value)
bei OpcLabs.BaseLib.LiveBinding.BinderBase.SetGroupsOnlineBinder(AbstractBinder onlineBinder)
bei OpcLabs.BaseLib.LiveBinding.PointBinder.OnOnlineChanging(Boolean newValue)
bei OpcLabs.BaseLib.LiveBinding.BinderBase.set_Online(Boolean value)
bei OpcLabs.BaseLib.LiveBinding.BindingExtender.SetProvidersOnline(Boolean online)
bei OpcLabs.BaseLib.LiveBinding.BindingExtender.OnOnlineChanged()
bei OpcLabs.BaseLib.LiveBinding.BindingExtender.Dispose(Boolean disposing)
bei System.ComponentModel.Component.Finalize()


What can I do?

Thanks

I can write to an OPC server but not read - by: mikeboiko

$
0
0
Hi,

I'm not able to perform read/write operations to a Yokogawa ExaOPC.

I downloaded the latest QuickOPC library (2019.1) for this test. Then, I opened EasyOpcNetDemo.exe to perform a test on FCS0317!202PC01093B.MV
- I am able to retrieve the value property (2) without issues. When I clicked "Get property value", I got: 14.95476
- I am not able to read properly, when I clicked "Read Item", I got the following error after waiting for approximately for 30s "Read not completed. This error indicates that it could not be verified that the requested read operation was completed during the timeout period. It is possible that the read operation will actually succeed or fail, but later. Increase the timeout period if you want to obtain positive or negative indication of the operation outcome. Other reason for this error may be that under heavy loads, topic request or response queue is overflowing. Check the event log for queue overflow errors (if event logging is supported by the product and enabled)."
- I am somewhat able to write, but with an error. When I clicked "Write item value" and put a value of 20, the OPC server changed to 20 as expected, but I got the following error after approximately 30s: "Write not completed. This error indicates that it could not be verified that the requested write operation was completed during the timeout period. It is possible that the write operation will actually succeed or fail, but later. Increase the timeout period if you want to obtain positive or negative indication of the operation outcome. Other reason for this error may be that under heavy loads, topic request or response queue is overflowing. Check the event log for queue overflow errors (if event logging is supported by the product and enabled)."
- When I clicked on "Get property value" again, I got: 20

During some read operations, I would simply get the "Access is denied." error.

I'm pretty sure that it's not a DCOM permissions problem either because I was able to successfully perform the exact same read/write operations with the Matrikon Explorer and Kepware OPC clients.

Please let me know if the QuickOPC library can be patched somehow to rectify this issue.

Thank you!
Mike

Using PicoOPC in VB.NET project with Visual Studio 2010 - by: tangoristo

$
0
0
Hi,
i want to use the PicoOPC library in my VB.NET project. I am using Visual Studio 2010.
I've Installed Nuget and i've tried to install PicoOPC packet. I've received some errors with System.ValueTuple (NuGet version too old) and PicoOPC (.NET framework compatibility).
Please can you help me to set up a system compatible with PicoOPC (system requirements, Visual Studio version, .NET framework version ecc).

I need to read/write some variables in an OPC-UA server (integrated in a Siemens PLC) and monitor a variable change (machine state).

Thanks for support

Memory gets full while writing the OPC Variables in the OPC Server - by: Moien

$
0
0
Dear all,

I have an OPC UA Client application in Delphi 10.2. Via my application I connect to the OPC Server and try to write variables continuously into the OPC Server. I can successfully connect to the server and write the variables, but after a couple of seconds the memory gets full and my application crashes. In the attachment you may find a copy of my code. In the function 'WriteItem' I call another function 'WriteItemValue(Name,ItemValue)' and try to write into the OPC Server. I tried to give OPCUAClient object free in different positions, but it doesn't work! I would be really happy if someone can help me.

Regards,
Moien

Second very slow variable subscription - by: phil56

$
0
0
Hi ! We work with librairies Quick OPC-UA 2018.3.
When we start the program, we subscribe to 2724 variables in 14 seconds :

PlcClient : subscribe event
PlcClient : open
PlcClient : subscribe data change
PlcClient : subscribe variable ns=2;i=3006287402(23/09/2019 15:24:13:1)
PlcClient : subscribe variable ns=2;i=2438195688(23/09/2019 15:24:13:2)
...
PlcClient : subscribe variable ns=2;i=3444163552(23/09/2019 15:24:27:2723)
PlcClient : subscribe variable ns=2;i=3632956119(23/09/2019 15:24:27:2724)
PlcClient : end


Then, if the program detects a connection's error, we close / open the connection.
We subscribe again to 2724 variables but in 5 minutes:

PlcClient : subscribe event
PlcClient : open
PlcClient : subscribe data change
PlcClient : subscribe variable ns=2;i=3006287402(23/09/2019 15:26:54:1)
PlcClient : subscribe variable ns=2;i=2438195688(23/09/2019 15:26:54:2)
....
PlcClient : subscribe variable ns=2;i=3444163552(23/09/2019 15:32:32:2723)
PlcClient : subscribe variable ns=2;i=3632956119(23/09/2019 15:32:32:2724)


This is the code implemented to close the connection :

And this is the code implemented to subscribe :


Can you help me about this ?

EasyUAClient.SubscribeDataChange() behaviour - by: Giuseppe12

$
0
0
testing EasyUAClient.SubscribeDataChange() with dataChangeCallback, the event raise also on startup program



where the subscribed variable on PLC (and C#) is a boolean type.

Is there a way to filter the event only when variable change to "true" but not in startup application ?

Otherwise in the event handler understand not a true changes ?

Thanks

How to get the status of TEeasyUAClient.WriteValue - by: Moien

$
0
0
Hi all,

Is there any property of TEeasyUAClient to get the status of TEeasyUAClient.WriteValue (endpointDescriptorString, nodeDescriptorString, Value) to see if the "WriteValue" procedure has done successfully?

Regards,
Moien

How to get the status of TEeasyUAClient.WriteValue - by: Moien

$
0
0
Hi all,

Is there any property of TEeasyUAClient to get the status of TEeasyUAClient.WriteValue (endpointDescriptorString, nodeDescriptorString, Value) as a Boolean output to see if the "WriteValue" procedure has done successfully?

Regards,
Moien

Performance Differences on Windows & Linux - by: sjscheider

$
0
0
We have been experimenting running our .NET Core app on both Windows 10 and Linux (Ubuntu 16.04) and are seeing some interest results that we are hoping you can validate, explain and provide some recommendations.

Our original app was written for Windows and was able to support connecting to 300+ OPC-UA server/devices. For each device, the app subscribes to data change events for 4 complex data nodes. The code was written to use a separate EasyUAClient object per device, with isolation set to false. To achieve the 300+ devices, we needed to run two instances of the application on the PC. A single instance of the app starts to fail around 225 devices while use two instances handles 300+. (We don’t have enough device simulators to get over the 300 device number.) Also, we need to set the worker thread count to 1000 and the port thread count to 100.

When we run this same app on our Linux server, which is identical hardware as the Windows box, we are only able to support about 120 devices until the application started throwing exceptions. Before the exceptions occur, we noticed that the thread count would fluctuate up and down between 300 and 400. Then after a few minutes, the thread count would start climbing and never recover. To get the maximum performance from the app on Linux, we set the worker thread count to 5000 and the port thread count to 1000.

Here is what a typical exception looks like:

So after some experimentation, we were able to determine that using a single EasyUAClient object for all connection, the app would support more devices on Linux but less on Windows. On the Linux box, the app was able to support about 180 devices across 2 instances of the application. While on Windows, the app was able to support about 120 devices across 2 instances of the application.

Do our results mirror what you’ve seen in your testing?

Do you have any suggestions on how to improve the performance on Linux?

PlatformNotSupportedException: Operation is not supported on this platform - by: cfza

$
0
0
Good day,

I am getting the following Exception when I try to create a new EasyDAClient object. Please can you assist me?

System.TypeInitializationException
HResult=0x80131534
Message=The type initializer for 'OpcLabs.EasyOpc.DataAccess.EasyDAClient' threw an exception.
Source=OpcLabs.EasyOpcClassic
StackTrace:
at OpcLabs.EasyOpc.DataAccess.EasyDAClient..ctor()
at TestConsole.Program.Main(String[] args) in C:\Users\User\Development\TestConsole\Program.cs:line 10

Inner Exception 1:
TypeInitializationException: The type initializer for 'OpcLabs.EasyOpc.Implementations.Native.Assemblies' threw an exception.

Inner Exception 2:
TargetInvocationException: Exception has been thrown by the target of an invocation.

Inner Exception 3:
PlatformNotSupportedException: Operation is not supported on this platform.
Viewing all 1794 articles
Browse latest View live