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

SerializationException: OPC.Ua.Core 1.3.342.0 Not Found - by: goosvanbeek

$
0
0
Hello support,

I'm trying to deserialize an UAEventData object in a webapi service and get an serializationException (Could not load file or assembly 'Opc.Ua.Core, Version=1.3.342.0), see the attachment.

I am not able to find where Opc.Ua.Core Version=1.3.342.0 is referenced. I use NuGet for the project references.

Windows 2012
QuickOPC 5.58.192.1 (NuGet)
OPC Unified Architecture .NET Standard 1.4.360.0 (NuGet)



Deserializing an UAAttributeData object has no issues.

Can you help me any further?

Best regards,
Goos van Beek

The requested OPC Data Access technology 'Com' is not supported. - by: fbenitez-inblic

$
0
0
I am adding the sample code at the end of the explanation.

This error started with Windows 10 Update to Version 2004 OS Build 19041.329

I have tested the following libraries:
Nuget -> 5.58.192
Nuget -> 5.59.0-rev7
QuickOPC-2020.2-Windows-Full

If the the example is targeting Framework 4.7+ the application closes, no trace at all.
If the the example is targeting Framework 4.6.2 then, the OpcException is thrown


"The requested OPC Data Access technology 'Com' is not supported. Check the scheme \"opcda\" in server URL string \"opcda:Kepware.KEPServerEX.V6\".\r\n\r\n+ OPC specifications based on COM/DCOM are only supported under .NET Framework.\r\n+ The client method called was 'WriteMultipleItemValues'."


Now here is where it gets even stranger, if i run the Samples from the full installation, the ones that are in Windows Forms they do work.

This is happening completely new projects with zero references to anything else, and I need this EasyDAClient to be created from code behind because it will be running on a windows service.

The OPC is working and I was able to write the Tag in question using the sample application: Demo Application (OPC-DA) and running it from the Visual Studio from the samples.

These was working prior the Windows Update.

This is the simple source code (only 2 lines)
Also, the same issue if the EasyDAClient.SharedInstance is used

The Kepware OPC Server has been uninstalled / reinstalled several times.

Please advice.

This is the sample code

Reading and Writing from vba (Access 2016) to RSLinx Gateway - by: jwomacks

$
0
0
I have an Access 2016 project that I will be using to read and write data to a Rockwell PLC controller. I will be communicating to RSLinx Gateway via OPC UA and am looking for some example code to start the integration. Also please note that the server is not always in the local machine. Although due to the nature of any OPC client tool I have used , a remote connection is typical.

What product would be appropriate for using OUR program as an OPC server? - by: gprresources_opc

$
0
0
Hello.

We have an automation application that in non-PLC and non-OPC, which uses a .NET C# platform together with MS SQL Server 2017 to collect automation data.
A customer has requested the ability to use their OPC CLIENT to pull data directly from our application.

As I understand this, it means we would essentially need to develop our own OPC SERVER interface to our SQL data, OR use some kind of data exchange interface that allows making requests to our system (potentially directly to SQL server) and pulling our data (from SQL Server) in an OPC compliant format.

I see that your OPC tools would allow us to use .NET C# to create an OPC CLIENT, that can PULL data from genuine OPC servers, but I do not think that is what we need to do. We don't need our app to be a CONSUMER of OPC data... it needs to be the PROVIDER of OPC data to any compliant OPC client program (which would be a 3rd party, or in this case, our customer using their own OPC client software of choice... which may be yours).

Do your tools allow us to create an OPC data PROVIDER either directly from SQL SERVER or via an application that we can create with C# that will SERVE data to an OPC client? Or is there some direct-to-SQL tool that you can recommend which creates an interface that OPC clients can connect into?

The requested OPC Data Access technology 'Com' is not supported. - by: fbenitez-inblic

$
0
0
I am adding the sample code at the end of the explanation.

This error started with Windows 10 Update to Version 2004 OS Build 19041.329

I have tested the following libraries:
Nuget -> 5.58.192
Nuget -> 5.59.0-rev7
QuickOPC-2020.2-Windows-Full

If the the example is targeting Framework 4.7+ the application closes, no trace at all.
If the the example is targeting Framework 4.6.2 then, the OpcException is thrown


"The requested OPC Data Access technology 'Com' is not supported. Check the scheme \"opcda\" in server URL string \"opcda:Kepware.KEPServerEX.V6\".\r\n\r\n+ OPC specifications based on COM/DCOM are only supported under .NET Framework.\r\n+ The client method called was 'WriteMultipleItemValues'."


Now here is where it gets even stranger, if i run the Samples from the full installation, the ones that are in Windows Forms they do work.

This is happening completely new projects with zero references to anything else, and I need this EasyDAClient to be created from code behind because it will be running on a windows service.

The OPC is working and I was able to write the Tag in question using the sample application: Demo Application (OPC-DA) and running it from the Visual Studio from the samples.

These was working prior the Windows Update.

This is the simple source code (only 2 lines)
Also, the same issue if the EasyDAClient.SharedInstance is used

The Kepware OPC Server has been uninstalled / reinstalled several times.

Please advice.

This is the sample code

Reading and Writing from vba (Access 2016) to RSLinx Gateway - by: jwomacks

$
0
0
I have an Access 2016 project that I will be using to read and write data to a Rockwell PLC controller. I will be communicating to RSLinx Gateway via OPC UA and am looking for some example code to start the integration. Also please note that the server is not always in the local machine. Although due to the nature of any OPC client tool I have used , a remote connection is typical.

subscription handle value on bad connection - by: cadomanis

$
0
0
It appears that if attempting to subscribe with the following code, and a connection is not made a subscription handle of value 12586002 is returned?


Is that the expected value on a bad connection, such that that handle should be ignored? Or if after attempting the SubscribeMultipleMonitoredItems I immediately see the event handler return with a succeeded = false, should I be then throwing away the subscription handle that was received? Any pointers or extended examples on how to handle failed subscription attempts would be greatly appreciated.

Using the old version - by: Vladimir

$
0
0
Hello! How can I use an old version of quickopc with my windows 7 ? At the moment I can only change the system time to make quickopc 2019.2 work. Thank you!

SSL/TLS error calling OPC XML DA server with QuickOpc - by: georgeslegros

$
0
0
Hello,

I'm currently trying to validate the usability of the QuickOpc library and I have an issue.
I used the code available here: opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2....NET%20Core%20CLI%20Tools.html

It works like a charm!

Now I replaced with the server address of my client as well as the correct itemDescriptor and I get an SSL/TLS error (full stack trace at the end of the message).

I googled the error and it seems like the solution would be to give a special Handler to the HttpClient used to instruct it to ignore such errors.
However, I cannot get my hands on the client as it is constructed probably very deep in the library and there are no possibility for me to find it.

I know that SSL/TLS is a big deal and that proper certificates should always be used but in this case, the OPC server is sitting within a highly secure network only accessible through a VPN.

For information, I used Kassl dOPC Explorer and I can communicate with my server without any problem. I also tried multiple aother clients just to make sure it was not that one being too nice with me.

Did you ever faced this error and would you have a solution for this?

For reference, here is a stackoverflow post that seem to describe the TLS issue: stackoverflow.com/questions/1742938/how-to-solve-could-not-e...ip-for-the-ssl-tls-secure-chan

The strange thing is that, as you can see in the stacktrace below, the authority that seem to cause the SSL/TLS error is "localhost"

The code I use is identical as the one from the demo link I gave above with the serverDescriptor and itemDescriptor adapted to my server.

Anyway, the library seem to be awesome and seem to be exactly what I need but I am locked and won't purchase the product if I cannot validate that it works for my usecase.

Side Note: I'm writing the code on Windows using Rider but in production, it will be deployed in a Docker container on Linux, just in case it makes a difference.

And here is the full stacktrace (SSL ERROR HIGHLIGHTED):

Unhandled exception. OpcLabs.EasyOpc.OperationModel.OpcException: An OPC operation failure with error ID 'OpcLabs.EasyOpc.Engine.NetApiException' occurred, originating from 'System.
Private.CoreLib' and with depth of 6. The inner exception contains details about the problem.
---> OpcLabs.EasyOpc.Engine.NetApiException: An exception occurred during processing in a NET API OPC Data Access client. The inner exception contains details about the problem.
+ The client method called was 'ReadMultipleItemValues'.
---> OpcLabs.EasyOpc.Engine.NetApiException: An exception occurred during processing in a NET API OPC Data Access client. The inner exception contains details about the problem.
---> Opc.ResultIDException: E_FAIL
Could not establish trust relationship for the SSL/TLS secure channel with authority 'localhost'.
---> System.ServiceModel.Security.SecurityNegotiationException: Could not establish trust relationship for the SSL/TLS secure channel with authority 'localhost'.
---> System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.
at System.Net.Security.SslStream.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, ExceptionDispatchInfo exception)
at System.Net.Security.SslStream.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.PartialFrameCallback(AsyncProtocolRequest asyncRequest)
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Security.SslStream.ThrowIfExceptional()
at System.Net.Security.SslStream.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.Security.SslStream.EndProcessAuthentication(IAsyncResult result)
at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult)
at System.Net.Security.SslStream.<>c.<AuthenticateAsClientAsync>b__65_1(IAsyncResult iar)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean allowHttp2, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.FinishSendAsyncUnbuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpClientRequestChannel.HttpClientChannelAsyncRequest.SendRequestAsync(Message message, TimeoutHelper timeoutHelper)
--- End of inner exception stack trace ---
at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(HttpRequestException requestException, HttpRequestMessage request, HttpAbortReason abortReason)
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpClientRequestChannel.HttpClientChannelAsyncRequest.SendRequestAsync(Message message, TimeoutHelper timeoutHelper)
at System.ServiceModel.Channels.RequestChannel.RequestAsync(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.RequestAsyncInternal(Message message, TimeSpan timeout)
at System.Runtime.TaskHelpers.WaitForCompletionNoSpin[TResult](Task`1 task)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(MethodCall methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(MethodInfo targetMethod, Object[] args)
--- End of stack trace from previous location where exception was thrown ---
at System.Reflection.DispatchProxyGenerator.Invoke(Object[] args)
at generatedProxy_1.GetStatus(GetStatusRequest )
at OpcXml.Da10.ServiceReference.ServiceClient.OpcXml.Da10.ServiceReference.Service.GetStatus(GetStatusRequest request)
at OpcXml.Da10.ServiceReference.ServiceClient.GetStatus(GetStatus GetStatus1)
at OpcXml.Da10.Service.GetStatus(String LocaleID, String ClientRequestHandle, ServerStatus& Status)
at OpcXml.Da.Server.GetStatus()
at OpcXml.Da.Server.Initialize(URL url, ConnectData connectData)
at OpcXml.Factory.CreateInstance(URL url, ConnectData connectData)
--- End of inner exception stack trace ---
at Opc.Server.Connect(URL url, ConnectData connectData)
at Opc.Da.Server.Connect(URL url, ConnectData connectData)
at Opc.Server.Connect(ConnectData connectData)
at OpcLabs.EasyOpc.Implementation.NetApi.DataAccess.NetApiOpcDaServer.ServerConnect(Server server, ConnectData connectData, Exception& exception)
--- End of inner exception stack trace ---
at OpcLabs.EasyOpc.Implementation.NetApi.DataAccess.NetApiOpcDaServer.ConnectToServer(WebProxy proxy, Server server, NetworkCredential credentials, String connectionGroupName, EasyDAAdaptableParameters adaptableParameters)
at OpcLabs.EasyOpc.Implementation.NetApi.DataAccess.NetApiOpcDaServer.Connect(Boolean doOnlyIfGoodStatus, Boolean callGetStatus, Exception& exception)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at OpcLabs.EasyOpc.Internal.EasyUtilities.CheckSuccess(OperationResult operationResult)
at OpcLabs.EasyOpc.DataAccess.IEasyDAClientExtension.ReadItemValue(IEasyDAClient client, ServerDescriptor serverDescriptor, DAItemDescriptor itemDescriptor, DAReadParameters readParameters)
at OpcLabs.EasyOpc.DataAccess.IEasyDAClientExtension.ReadItemValue(IEasyDAClient client, ServerDescriptor serverDescriptor, DAItemDescriptor itemDescriptor)
at HelloWorld.Program.Main(String[] args) in C:\projects\HelloWorld\HelloWorld\Program.cs:line 34



Thanks for any support you can provide.

Network PC Running OPC Labs - by: neilcooley

$
0
0
Hi

We have a central server running the applications and in turn Easy OPC UA. The application work when they run on the server.

When i run the same applications on the clients i get a error - see attached, this is when i run the example program.

We do have a licence so its not that.

Does each client computer not the run time licence installing or can I do it within the code (VB.Net) ?

Please advise what I need to do.


Neil

Network PC Running OPC Labs - by: neilcooley

$
0
0
Hi

We have a central server running the applications and in turn Easy OPC UA. The application work when they run on the server.

When i run the same applications on the clients i get a error - see attached, this is when i run the example program.

We do have a licence so its not that.

Does each client computer not the run time licence installing or can I do it within the code (VB.Net) ?

Please advise what I need to do.


Neil

Trusting certificate with AcceptAnyCertificate - by: SolutionNow

$
0
0
Hello,

We have a program that uses your library that is launched by windows service. Being launched by a background service, the program also stays in the background. This creates a problem when at times a dialog box is opened asking for confirmation within 30 seconds of the OPC certificate like this:


Being that program is always in the background is impossible to confirm the certificate. One solution I found here was to set the property OpcLabs.EasyOpc.UA.UAEndpointDescriptor.CertificateAcceptancePolicy = true; But this does not seem to solve the problem. I saw a similar discussion here in the forum but no final conclusion was posted if the property worked correctly or not.

Do you have an update on the matter or maybe you can tell me an alternative?

Thank you

Subscribing and reading large number of tags - by: FreegE

$
0
0
Hi,

Currently im involved in a project to read about 40k tags (energy meters) and store in a database, the problem is that the read process takes to long time and now i need some help to find a better solution for this. The initial conscept was to iterate thru the OPC server and then find all leafes that match a filter criteria, then readvalue and store.

But now i'm more into something like doing a subscribe and ceep the tags active so that the poll reads from a updated memory casche instead. Im not sure the conscept of changed value events is a good way for this approuch but im interested in any good ideas.

Also i might add that the available meters changes often in the OPC server and therefore te process needs to refresh the tags about 4 times per day.

Best regards
Fredric

QuickOpc 2020.2 - com_exception: Failed to create COM object - by: gheroil

$
0
0
Plezz help ,
Quick opc Com with PHP not working in windows server 2016
Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `OpcLabs.EasyOpc.DataAccess.EasyDAClient': ' in C:\wamp64\www\PHP\Web\test.php on line 24
I have php 5.6.31 /7.1.9
Windows server 2016

Opc Da in .net Core - by: radek.huber

$
0
0
Hello,

do you have any plans to add support for the opc da into the quickOpc .net core version?

Thank you,
Radek Huber

EasyDAClient CallbackQueue Questions - by: Holbach

$
0
0
I have a few questions around the EasyDAClient CallbackQueue.

1. I know we can modify the size of the callback queue - are the units for this in events/callbacks? I would presume yes but wanted to verify.

2. In case there is overflow in this queue what would occur? I saw some posts on this forum around EasyUAClient queues and overflow being logged as a EasyUAClient LogEntry, is that still the case and accurate for EasyDAClients as well?

OLE error code 0 - by: info@software2000.it

$
0
0
Dear sirs,

We have a problem urgently enough to solve, I have already checked on the forum but I have not found anything that can help me.
We use the COM part of your application through VisualFoxPro and, if the ocpua server and the related connected machinery are turned on, everything works correctly; on the contrary, if the server is off, obviously an OLE error is returned which I can avoid by testing before communicating if the server's IP address responds.
If, however, the macchianriu are spent after the default easyOPC timeout I receive an OLE error as per attachment and despite having instanced the ON ERROR function of visulafoxpro the OCX error is constantly presented to me.
What can we do?
Thank you

installation on windows 2012 server core - by: giles

$
0
0
Hi I am trying to install OPC Labs .net tools on windows 2012 server core. Ie windows without GUI.

I see the error that oledlg.dll is missing.

So it looks like it's requiring some gui library which isn't available on server core...

I'm using 5.40

```
QuickOPC-5.40.exe /VERYSILENT /SUPPRESSMSGBOXES /NOCANCEL /TYPE=productionnet
```

Type Initializer for EasyDAClient threw an exception with ASP.NET Custom Control - by: Holbach

$
0
0
I am currently working with a customer who has written a custom ASP.NET control which makes use of the EasyDAClient object.

The problem comes up when in design mode and using the property editor for the control. The code for the editor calls and displays an OpcServerDialog to allow server browsing, and for binding the control to a specific server.

When ShowDialog is called the following error is thrown:

"The type initializer for 'OpcLabs.EasyOpc.DataAccess.EasyDAClient' threw an exception"

Since the error is thrown in design mode and not debug/runtime I am not able to find any detailed exception details unfortunately.

I've seen a few other posts on the forum regarding the Visual C++ Libraries which I have downloaded and installed, and confirmed the correct versions are present.

I have a sample app that I am happy to share if there is an email I can send it to.

Our .Net program crashes when the customer tries to browse for OPC servers or i - by: micham

$
0
0
Hi,

We have the following problem. Our customer in Malaysia is experiencing a crash each time he tries to browse for OPC Server or items.
Our program is closing without an error message when the customer tries to browse.
The OPC server is Archestra OPC server by Wonderware - OI.GATEWAY.2.

When we try it with Easy OPC Client, there is no crash.

We are using version 2020.1 build 5.57.125.1

Can we connect to the customer's server together and see the problem?

I appreciate your answer.

Best regards,
Michael Meirovitz
Control See Ltd.
Viewing all 1794 articles
Browse latest View live