| |
|
|
| |
| 主 题: |
HaiGrang.Package.OpcNetApiChs.NET OPC客户端开发工具包 V4.2 - 关于连接远程OPC数据源。 |
| 反馈内容: |
|
您好,我是印步软件的开发工程师,使用了你们网站提供的HaiGrang.Package.OpcNetApiChs.NET OPC客户端开发工具包 V4.2 来开发OPC接口,但我发现该API远程连接到远程OPC数据源,能提供一下帮助吗?我使用.net 2005开发。
我的代码如下:
try
{
OpcServer opcserv = new OpcServer();
string strmachinename = "";
string strservname = "Matrikon.OPC.Simulation.1";
int ret = 0;
try
{
ret = opcserv.Connect(strmachinename , strservname );
}
catch
{
throw new Exception("OPC服务连接不上!");
}
在上面的例子当中,如果strmachinename 为空时,代表连接本机,可以连接上OPC数据源,但如果是远程主机,用以下4种方式都连接不上:
strmachinename = "ZHITENG";
strmachinename = \\ZHITENG;
strmachinename = "192.168.1.101";
strmachinename = "\\192.168.1.101";
那请问这个strmachinename 代表远程主机的计算机名,到底应该怎么书写?
请问有没有关于这个为类库的帮助文档?如果有,可以给我一份吗?谢谢。
zhitenglin@163.com
|
|
|
| 留言者: |
林志腾
|
留言时间: |
2007-12-15 |
回复时间: |
2008-2-11 |
| 管理员回复: |
|
 |
| 主 题: |
opc client 的说明书有吗? |
| 反馈内容: |
|
| 留言者: |
|
留言时间: |
2007-11-25 |
回复时间: |
2007-11-25 |
| 管理员回复: |
|
 |
|
|
| |
| 当前页1/1
共有2条信息,每页5条 首页 |
下页 |
尾页 | 转到第
页 |
|
|
| |
|
|
|