资源简介
java 连接opc服务源码两种方式Utgard,Jeasyopc;
亲测Utgard可远程连接opc服务只需知道opc服务器用户名密码
代码片段和文件信息
package com.freud.opc.jeasyopc;
import javafish.clients.opc.JOpc;
/**
* 连接到OPC Server 每隔200毫秒查看一次状态,1秒钟之后关闭连接
*
* @author Freud
*
*/
public class JeasyopcTest01 {
public static int iter = 0;
public static void main(String[] args) throws Exception {
JOpc.coInitialize();
JOpc jopc = new JOpc(“localhost“ “Matrikon.OPC.Simulation“
“JCustomOPC“);
jopc.connect();
while (true) {
Thread.sleep(200);
System.out.println(“Client is connected: “ + jopc.ping());
iter++;
if (iter == 5) {
break;
}
}
JOpc.coUninitialize();
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
I.A.... 1271145 2016-04-14 15:08 OPC_Client-master_java\j-Interop_3_0_0.tar.gz
....... 207 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\.gitignore
....... 11325 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\LICENSE
....... 710 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\.classpath
....... 548 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\.project
....... 485376 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\lib\JCustomOpc.dll
....... 89954 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\lib\jeasyopc.jar
....... 1076 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\pom.xm
....... 613 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\src\main\java\com\freud\opc\jeasyopc\JeasyopcTest01.java
....... 898 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\src\main\java\com\freud\opc\jeasyopc\JeasyopcTest02.java
....... 572 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\src\main\java\com\freud\opc\jeasyopc\JeasyopcTest03.java
....... 642 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\src\main\java\com\freud\opc\jeasyopc\JeasyopcTest04.java
....... 731 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\src\main\java\com\freud\opc\jeasyopc\JeasyopcTest05.java
....... 1368 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\src\main\java\com\freud\opc\jeasyopc\JeasyopcTest06.java
....... 1323 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\src\main\java\com\freud\opc\jeasyopc\JeasyopcTest07.java
....... 2108 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\src\main\java\com\freud\opc\jeasyopc\JeasyopcTest08.java
....... 1971 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\src\main\java\com\freud\opc\jeasyopc\JeasyopcTest09.java
....... 2086 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\src\main\java\com\freud\opc\jeasyopc\JeasyopcTest10.java
....... 2106 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\src\main\java\com\freud\opc\jeasyopc\JeasyopcTest11.java
....... 584 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\src\main\java\com\freud\opc\jeasyopc\JeasyopcTest12.java
....... 1810 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\src\main\java\com\freud\opc\jeasyopc\JeasyopcTest13.java
....... 827 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\src\main\java\com\freud\opc\jeasyopc\listener\OpcAsynchListener.java
....... 148 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\src\main\resources\javafish\clients\opc\JCustomOpc.properties
....... 21 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\src\main\resources\javafish\clients\opc\lang\resource_cs.properties
....... 0 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\src\main\resources\javafish\clients\opc\lang\resource_de.properties
....... 2705 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\src\main\resources\javafish\clients\opc\lang\resource_en.properties
....... 2750 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\src\main\resources\javafish\clients\opc\lang\resource_pt.properties
....... 80 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\src\main\resources\javafish\clients\opc\lang\Translate.properties
....... 3723730 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc\src\main\resources\jeasyopc-2.3.2.zip
....... 710 2015-03-27 01:05 OPC_Client-master_java\OPC_Client-master\OPC_Client_Jeasyopc_Performance\.classpath
............此处省略409个文件信息
评论
共有 条评论