# s7connector
**Repository Path**: skyflycode/s7connector
## Basic Information
- **Project Name**: s7connector
- **Description**: 同步来自github的仓库
https://github.com/s7connector/s7connector.git
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 1
- **Created**: 2023-12-11
- **Last Updated**: 2024-06-18
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
S7 PLC Connector for Java

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
```java
//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](http://htmlpreview.github.io/?https://github.com/s7connector/s7connector/blob/master/index.html)
Maven directions
------------------------
```xml
com.github.s7connector
s7connector
2.1
```
Need Help? Found a bug?
------------------------
Feel free to [submit an issue](https://github.com/s7connector/s7connector/issues). And, of course, feel free to submit pull requests with bug fixes or changes.
Contributors
------------
Pull requests are always welcome.
See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
License
-------
See [LICENSE.txt](LICENSE.txt) file.
Special Thanks
--------------
This project is based on [libnodave](https://sourceforge.net/projects/libnodave/)