2016-04-20
那位有知道tcp/ip plc下位机与上位机通讯程序应该怎么写或者有些例子什么的 现在实在不知道该怎么写了,请求大家帮帮忙吧,在这先谢过了
评论5
楼主 2016/4/20 10:36:28
用MODBUS通信协议来写就OK了.贝加莱 plc x20为MODBUS从站,上位机为MODBUS主站
楼主 2016/4/21 9:18:50
那你用C语言按MODBUS的通信协议格式来写一段C的程序不就OK了,下位机本来就支持MODBUS从站的通信,你不是用来下载程序吧,如果不是,这是最好的办法呀.
楼主 2016/4/22 20:12:41
是支持modbus,但是要求是上位机用C#写tcp/ip的tcpclient端,plc做下位机写tcpserver端用c的socket库,功能程序都已经写好transfer到plc里,现在要做个上下位的通讯。上位机客户端发命令,下位机做服务器端接收并解析后给反馈信息给上位机。automation studio里有ASTCP库和ethsocket库,感觉好像要用ASTCP。知道您好像特别熟悉贝加莱PLC,可不可以向您请教请教这方面的知识?因为要做,又不是特别懂,先谢了。
楼主 2016/5/3 19:47:02
在AS3.0 有具体例子,主要看帮助,帮助的例子越来越多!
Executable examples are available for this project in the form of a package.
Theme | Description | Package name |
---|---|---|
TCP Communication | Example of simple TCP client/server communication. A section of data is exchanged between two controllers via the Ethernet interface. | LibAsTCP1_ST |
The sample package can be inserted into the Automation Studio project by the name of the package.
楼主 2016/5/3 19:47:37
Executable examples are available for this project in the form of a package.
Theme | Description | Package name |
---|---|---|
UDP Communication | Example of simple TCP client/server communication. A section of data is exchanged between two controllers via the Ethernet interface. | LibAsUDP1_ST |
The sample package can be insertedinto the Automation Studio project by the name of the package