项目作者: s7connector

项目描述 :
S7 PLC Connector for java
高级语言: HTML
项目地址: git://github.com/s7connector/s7connector.git
创建时间: 2015-02-04T10:44:54Z
项目社区:https://github.com/s7connector/s7connector

开源协议:Other

下载



S7 PLC Connector for Java


Build Status

S7 PLC Connector for Java

Screenshot of Example Documentation created with Slate

Features

  • 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

Getting Started

Simple read/write example

  1. //Create connection
  2. S7Connector connector =
  3. S7ConnectorFactory
  4. .buildTCPConnector()
  5. .withHost("10.0.0.220")
  6. .withType(1) //optional
  7. .withRack(0) //optional
  8. .withSlot(2) //optional
  9. .build();
  10. //Read from DB100 10 bytes
  11. byte[] bs = connector.read(DaveArea.DB, 100, 10, 0);
  12. //Set some bytes
  13. bs[0] = 0x00;
  14. //Write to DB100 10 bytes
  15. connector.write(DaveArea.DB, 101, 0, bs);
  16. //Close connection
  17. connector.close();

More in the Documentation

Maven directions

  1. <dependency>
  2. <groupId>com.github.s7connector</groupId>
  3. <artifactId>s7connector</artifactId>
  4. <version>2.1</version>
  5. </dependency>

Need Help? Found a bug?

Feel free to submit an issue. And, of course, feel free to submit pull requests with bug fixes or changes.

Contributors

Pull requests are always welcome.
See CONTRIBUTING.md for details.

License

See LICENSE.txt file.

Special Thanks

This project is based on libnodave