English(英文) | Chinese(中文)
If this helps you, please give the author a .
Now, it is a tool for iot communication, it includes
Add the dependency to pom.xml in the JAVA project
<dependency>
<groupId>com.github.xingshuangs</groupId>
<artifactId>iot-communication</artifactId>
<version>1.3.0</version>
</dependency>
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();
}
}
If you have any questions, please contact the author in the following ways, and the author will give answers in his spare time.
Distributed under the MIT License. See LICENSE
for more information.
@2019 - 2099 Oscura, All Rights Reserved
WeChat (Please note your name)
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Комментарии ( 0 )