luoyan35714 / opc_client Goto Github PK
View Code? Open in Web Editor NEWOPC client examples
Home Page: https://www.hifreud.com/tag/#OPC-ref
License: Apache License 2.0
OPC client examples
Home Page: https://www.hifreud.com/tag/#OPC-ref
License: Apache License 2.0
使用KingVIew做opc server,调用Jeasyopc库尝试读取点位数据,调用jopc.registerGroups()时会报异常
Exception in thread "main" javafish.clients.opc.exception.UnableAddItemException: Unable to register some item to group.
at javafish.clients.opc.JOpc.registerGroups(JOpc.java:296)
at com.freud.opc.jeasyopc.JeasyopcTest06.main(JeasyopcTest06.java:36)
请问一下,是咋回事呢?
同步读取可以数据,异步读取就不可以
您好,我在linux系统上运行DCOMTest程序都没有运行起来,都报错:The RPC server is unavailable. Please check if the COM server is up and running and that route to the COM Server is accessible (A simple "Ping" to the Server machine would do). Also please confirm if the Windows Firewall is not blocking DCOM access. [0x800706BA],你知道这是为什么吗?
大佬,您好:
我有一台仅支持OPC DA3.0的仪器,我需要在linux平台上连接到它。我在网上找到了utgard,我认为它有可能实现,因为它依赖的是J-interop。
由于我没有找到utgard的详细说明,但是我看到您曾经使用过它来实现客户端。
我想问下:1、utgard 1.4/1.5是否支持OPC DA3.0的连接?2、我的这个想法(使用utgard来跨平台连接)是否现实?3、我看您在博客中写道 utgard和OPC通信分为两种方式OPC DPI和DCOM DPI,我想了解二者的区别?4、如果utgard不支持OPC DA3.0,我想要实现utgard支持OPC DA3.0通信,我需要修改哪部分的代码,据我所知OPC DA2.0和3.0之间也就增删了一些接口,我需要的改动量大吗?
大致的代码如下:
tagList.foreach({tag -> {
access.addItem(tag, (Item item, ItemState state) -> {
System.out.println(state.toString());
}
}});
access.bind();
在tag点比较少的时候没什么问题(80个以内),在tag点多的时候access.bind()
之后就没反应了。看DEBUG日志也把item给激活了,能看到所有的tag点都有这样的日志:
2017-11-03 09:47:26,566 DEBUG org.openscada.opc.lib.da.AccessBase - Realizing item: [DKZC4]DZB6[137]
2017-11-03 09:47:26,586 DEBUG org.openscada.opc.lib.da.Item - Adding new item '[DKZC4]DZB6[137]' (0x1188E4A0) for group org.openscada.opc.lib.da.Group@3726d7c5
2017-11-03 09:47:26,586 DEBUG org.openscada.opc.lib.da.Group - Adding item: '[DKZC4]DZB6[137]', 294184096
我分析了下源码,这里应该是没问题的,都成功通过DCOM连接到opc server了,并且将group和item都设置为active,但是量一大就没有任何返回,不知道朋友你遇到过吗?
使用 SynchReadItemExample类,读取组态王里面的字符串类型汉字是乱码.
有遇到过么.
错误:
Exception in thread "main" org.jinterop.dcom.common.JIException: Access is denied. [0x80070005]
at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:664)
at org.jinterop.dcom.core.JIComServer.initialise(JIComServer.java:561)
at org.jinterop.dcom.core.JIComServer.(JIComServer.java:524)
at org.openscada.opc.lib.da.Server.connect(Server.java:108)
at cn.dst.opc.App.main(App.java:41)
Caused by: org.jinterop.dcom.common.JIRuntimeException: Access is denied. [0x80070005]
at org.jinterop.dcom.core.JIRemActivation.read(JIRemActivation.java:225)
at ndr.NdrObject.decode(NdrObject.java:41)
at rpc.ConnectionOrientedEndpoint.call(ConnectionOrientedEndpoint.java:141)
at rpc.Stub.call(Stub.java:134)
at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:649)
... 4 more
测试代码:
ConnectionInformation ci = new ConnectionInformation();
ci.setHost("192.168.254.119");
ci.setDomain("");
// 这里是电脑登录账号密码
ci.setUser("OPCServer");
ci.setPassword("12345678");
ci.setClsid("21C3E5E0-B7E4-11d4-8BE0-0050BACFBB99");
Server server = new Server(ci, Executors.newSingleThreadScheduledExecutor());
server.connect();
请问一下,原因是啥?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.