代码拉取完成,页面将自动刷新
同步操作将从 极度懒惰/s7connector 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
S7 PLC Connector for Java
Connect to Siemens S7 PLCs using TCP Connection
Reading and Writing data from/to S7 PLCs
OSGi Support
PROFINET Support
Use directly from Maven Central
Apache License
//Create connection
S7Connector connector =
S7ConnectorFactory
.buildTCPConnector()
.withHost("10.0.0.220")
.withType(1) //optional
.withRack(0) //optional
.withSlot(2) //optional
.build();
//Read from DB100 10 bytes
byte[] bs = connector.read(DaveArea.DB, 100, 10, 0);
//Set some bytes
bs[0] = 0x00;
//Write to DB100 10 bytes
connector.write(DaveArea.DB, 101, 0, bs);
//Close connection
connector.close();
More in the Documentation
<dependency>
<groupId>com.github.s7connector</groupId>
<artifactId>s7connector</artifactId>
<version>2.1</version>
</dependency>
Feel free to submit an issue. And, of course, feel free to submit pull requests with bug fixes or changes.
Pull requests are always welcome. See CONTRIBUTING.md for details.
See LICENSE.txt file.
This project is based on libnodave
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。