kimguo1993 / iot-communication

Now, it is a tool for iot communication. It includes Siemens S7 protocol, it can access to S1500 S1200 S200smart .(包含西门子S7协议,目前可以访问西门子S1500 S1200 S200smart)It includes ModbusTCP protocol.(包含modbusTCP通信协议)It can parse byte array data.(可以进行字节数组数据解析)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IOT-COMMUNICATION

Maven-v1.2.7 Language-java8 Idea-2022.02.03 CopyRight-Oscura License

English(英文) | Chinese(中文)

Overview

If this helps you, please give the author a ⭐ .

Now, it is a tool for iot communication, it includes

  • Siemens S7 protocol, it can access to S1500, S1200, S200smart.
  • ModbusTCP protocol.
  • Parse byte array data.

Getting Started

1. How to get

Add the dependency to pom.xml in the JAVA project

<dependency>
    <groupId>com.github.xingshuangs</groupId>
    <artifactId>iot-communication</artifactId>
    <version>1.2.7</version>
</dependency>

2. Basic examples

class Demo {
    public static void main(String[] args) {
        // create PLC instance
        S7PLC s7PLC = new S7PLC(EPlcType.S1200, "127.0.0.1");
        // read and write boolean
        s7PLC.writeBoolean("DB1.2.0", true);
        boolean boolData = s7PLC.readBoolean("DB1.2.0");
        // read and write byte
        s7PLC.writeByte("DB2.1", (byte) 0x11);
        byte byteData = s7PLC.readByte("DB2.1");
        // close
        s7PLC.close();
    }
}

Tutorial

Contact

If you have any questions, please contact the author in the following ways, and the author will give answers in his spare time.

License

Distributed under the MIT License. See LICENSE for more information.
@2019 - 2099 Oscura, All Rights Reserved

Sponsor

WeChat (Please note your name)
微信

About

Now, it is a tool for iot communication. It includes Siemens S7 protocol, it can access to S1500 S1200 S200smart .(包含西门子S7协议,目前可以访问西门子S1500 S1200 S200smart)It includes ModbusTCP protocol.(包含modbusTCP通信协议)It can parse byte array data.(可以进行字节数组数据解析)

License:MIT License


Languages

Language:Java 100.0%