vb.net 通过PC以太网口与西门子S7300 PLC通讯

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18672918/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-17 14:59:03  来源:igfitidea点击:

Communication With Siemens S7300 PLC through PC Ethernet Port

vb.netplc

提问by nandgate

I have got a Siemens PLC (S7 315-2 PN/DP PLC), which has got a built in Ethernet port.

我有一个西门子 PLC(S7 315-2 PN/DP PLC),它有一个内置的以太网端口。

I want to establish communication between PLC and my PC through TCP/IP (VB.NET based program).

我想通过 TCP/IP(基于 VB.NET 的程序)在 PLC 和我的 PC 之间建立通信。

How can it be done ? is any demo or example program available for this ?

怎么做到呢 ?是否有任何演示或示例程序可用于此?

回答by Dave Nardella

Try also Snap7, 32/64 bit with .NET/mono wrappers ready

也可以尝试Snap7,32/64 位,准备好 .NET/mono 包装器

回答by avra

Libnodavehas examples for many languages and VB.NET is one of them. I have used it a lot my self with Pascal and C.

Libnodave有许多语言的例子,VB.NET 就是其中之一。我自己和 Pascal 和 C 一起使用了很多。

回答by Bigman74066

If you want to send data based on events you could also use the 315's build-in Ethernet cummunication blocks and send a data packet (like emulated XML or JSON) each time something interresting happens. I did it a few times and it works very well.

如果您想根据事件发送数据,您还可以使用 315 的内置以太网 cummunication 块,并在每次发生相关事件时发送数据包(如模拟 XML 或 JSON)。我做了几次,效果很好。