您的位置:首页 > 其它

使用libnodave采集西门子840D数控系统S7-300 PLC数据

2015-09-07 22:51 543 查看

使用libnodave采集西门子840D数控系统PLC S7-300 数据。S7-200的没有试验

版本:libnodave-0.8.5

测试了几天终于成功了,特别注意localMPI和PlcMPI的地址,我的机器不是0或2,可以使用S7软件查询。

需要把840D的HMI关了,直接进入windowsXp系统进行测试成功。

使用libnodave自带的例子,C语言的和C#的测试成功,Delphi的没成功

获得到了

daveListReachablePartners list length:126

PDU length:240

FD0:26836456

FD4:0

FD8:0

FD12:0

res 7:0 0

之前 Libnodave: connectPLC 总返回-1 returns -1

参考这个,没起作用
http://stackoverflow.com/questions/14247313/libnodave-connectplc-returns-1

I'm trying to connect to a Siemens CPU315-2 DP via Ethernet by a CP 343-1 Lean using Libnodave dll.

I've tried the example program "simpleISO_TCP.cs" contained in the download file. The function openSocket works just fine but the function connectPLC always returns -1 wich means that the connection to the PLC fails.

Anyone knows what could cause this problem?

PS: I'm using Visual Studio 2012 in Windows 7 64 bit.


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: