GithubHelp home page GithubHelp logo

kimguo1993 / iot-communication Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xingshuangs/iot-communication

1.0 0.0 0.0 488 KB

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

Java 100.00%

iot-communication's Introduction

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)
微信

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.