Coder Social home page Coder Social logo

opcsample's People

Contributors

seayxu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

opcsample's Issues

Cannot connect to OPC server

I have registered the opcdaauto.dll and now I am seeing another exception in the logs:

System.Runtime.InteropServices.COMException (0x800706BA): The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
at OPCAutomation.IOPCAutoServer.Connect(String ProgID, Object Node)
at GodSharp.Opc.Da.OpcAutomationClient.OnConnect()
at GodSharp.Opc.Da.OpcDaClient.Connect()
at RigCLOUDOPCDA.Reader.Program.EstablishOPCConnection(Boolean disconnect)

Please advise.

error on OpcUaClientBuider::BuildAsync

hi,
when trying to connect to an opc server I receive this exception

System.TypeLoadException: 'Could not load type 'RenewUserIdentityEventHandler' from assembly 'Opc.Ua.Client, Version=1.4.371.0,

the code is very simple, it's exactly as the example provided.

            OpcUaClientBuider buider = new OpcUaClientBuider();
            buider
                .WithEndpoint(@"opc.tcp://10.10.10.12:4840")
                .WithAnonymous()
                .WithClientId("myClientID");

            var client = await buider.BuildAsync();

my application targets .net framework 4.8

any suggestions?

thank you

Opc.Ua.ServiceResultException: 'SHA1 signed certificates are not trusted.' when I try to connect with user and password.

When I try to connect with user and password I get a Opc.Ua.ServiceResultException with this message:
"SHA1 signed certificates are not trusted."

This is my code

`
OpcUaClientBuilder builder = new OpcUaClientBuilder()
.WithEndpoint(url)
.WithAutoAcceptUntrustedCertificate(true)
.WithAccount(user, password)
.WithEventCertificateValidationHandler(new CertificateValidationEventHandler(OnCertificateValidation))
.WithClientId(clientName);

private void OnCertificateValidation(CertificateValidator validator, CertificateValidationEventArgs e)
{
if (e.Error.StatusCode == StatusCodes.BadCertificateUntrusted)
{
e.Accept = true;
}
}
`

How can I connect to my opc with just user and passowrd?
How I can set RejectSHA1SignedCertificates to false?

Regards.

x64应用程序报错

Hello GodSharpOpcDaSample!
connect to server ...

未经处理的异常: System.AggregateException: 发生一个或多个错误。 ---> System.Exception: The tag with item name 'Channel1.Device1.Bool' add failed. ---> System.Runtime.InteropServices.COMException: 异常来自 HRESULT:0xC0040007
在 OPCAutomation.OPCItems.AddItem(String ItemID, Int32 ClientHandle)
在 GodSharp.Opc.Da.OpcAutomationGroupSubscription.Add(Tag[] tags)
--- 内部异常堆栈跟踪的结尾 ---
--- 内部异常堆栈跟踪的结尾 ---
在 GodSharp.Opc.Da.OpcAutomationGroupSubscription.Add(Tag[] tags)
在 GodSharp.Opc.Da.OpcDaClient.Connect()
在 GodSharpOpcDaSample.Program.Main(String[] args)

Unable to cast object,group订阅错误

运行环境
windows xp professional 2002 sp 3
.net framework 4.0

程序集 GodSharp.Opc.Da.OpcAutomation, Version=2021.204.23.0,

System.InvalidCastException: Unable to cast object of type 'OPCAutomation.OPCServerClass' to type 'OPCAutomation.IOPCGroups'.
at System.StubHelpers.InterfaceMarshaler.ConvertToManaged(IntPtr pUnk, IntPtr itfMT, IntPtr classMT, Int32 flags)
at OPCAutomation.OPCServerClass.get_OPCGroups()
at GodSharp.Opc.Da.OpcAutomationClient.CreateSubscription(Group group)
at GodSharp.Opc.Da.OpcDaClient.Add(Group group)
at GodSharp.Opc.Da.OpcDaClient.Connect()

System.Runtime.InteropServices.COMException

I am following the code provided in the opcsample/Program.cs and I am getting the below exception. Should I register any of the com dll's using regsvr?
Please advise.

System.Runtime.InteropServices.COMException: 'Retrieving the COM class factory for component with CLSID {28E68F9A-8D75-11D1-8DC3-3C302A000000} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).'

These are the dll's inside the bin folder:

image

cannot connect KeepServerEx6.1

when i use opcsample to connect my keepserverEx6.1 and I get the following error:

System.InvalidCastException:“无法将类型为“System.__ComObject”的 COM 对象强制转换为接口类型“OpcRcw.Comn.IOPCServerList2”。此操作失败的原因是对 IID 为“{9DD0B56C-AD9E-43EE-8305-487F3188BF7A}”的接口的 COM 组件调用 QueryInterface 因以下错误而失败: 拒绝访问。 (异常来自 HRESULT:0x80070005 (E_ACCESSDENIED))。”

图片

here is my code:

图片

my tag name:

图片

my opcserver:
图片

Unable to cast object,group订阅错误

运行环境
windows xp professional 2002 sp 3
.net framework 4.0

程序集 GodSharp.Opc.Da.OpcAutomation, Version=2021.204.23.0,

System.InvalidCastException: Unable to cast object of type 'OPCAutomation.OPCServerClass' to type 'OPCAutomation.IOPCGroups'.
at System.StubHelpers.InterfaceMarshaler.ConvertToManaged(IntPtr pUnk, IntPtr itfMT, IntPtr classMT, Int32 flags)
at OPCAutomation.OPCServerClass.get_OPCGroups()
at GodSharp.Opc.Da.OpcAutomationClient.CreateSubscription(Group group)
at GodSharp.Opc.Da.OpcDaClient.Add(Group group)
at GodSharp.Opc.Da.OpcDaClient.Connect()

Data Change Event is not in Sequence

We are using GodSharp OPC DA to read Kepware tags and have subscribed to the data change event but we suspect data change event is not getting triggered in sequential order.

Is DataChangedOutput output.Data.Timestamp denotes the time the data actually changed in Kepware or it it the time it is received by the handler event for processing?

We also tried to disconnect and connect back but it is waiting for the disconnect and it seems like that is never happening.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.