This is an automated email from the ASF dual-hosted git repository.
cgarcia pushed a commit to branch feat/s7ha
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/feat/s7ha by this push:
new f792e315e6 Update from S7 driver to S7HA. Tested with S7-400. To do,
correct the test for the protocol and the driver. To do the data processing of
the Plc Simulator.
f792e315e6 is described below
commit f792e315e61fae0f71bf8883bf72363a20084cb8
Author: César García <[email protected]>
AuthorDate: Thu Apr 27 16:12:54 2023 -0400
Update from S7 driver to S7HA. Tested with S7-400. To do, correct the test
for the protocol and the driver. To do the data processing of the Plc Simulator.
---
.../java/bacnetip/readwrite/BACnetVendorId.java | 6 +
.../java/knxnetip/readwrite/KnxManufacturer.java | 6 +-
plc4j/drivers/s7/pom.xml | 27 +++-
.../apache/plc4x/java/s7/readwrite/S7DriverIT.java | 4 +-
.../java/s7/readwrite/S7ParserSerializerTest.java | 9 +-
.../java/s7/readwrite/issues/PLC4X272Test.java | 2 +-
.../s7/src/test/resources/tests/PLC4X-272.xml | 3 +
plc4j/examples/plc4j-s7event/pom.xml | 9 ++
.../server/s7/protocol/S7Step7ServerAdapter.java | 15 +-
.../protocols/s/image01.png => iimage01.png} | Bin
src/site/asciidoc/images/image0.png | Bin 0 -> 12311 bytes
src/site/asciidoc/images/image01.png | Bin 0 -> 12311 bytes
src/site/asciidoc/images/image01x.png | Bin 0 -> 12311 bytes
src/site/asciidoc/images/image02.png | Bin 0 -> 36284 bytes
src/site/asciidoc/images/image03.png | Bin 0 -> 36298 bytes
.../protocols/s7/image03.png => image04.png} | Bin 28738 -> 28682 bytes
.../{users/protocols/s/image04.png => image05.png} | Bin 28166 -> 28183 bytes
.../protocols/s7/image05.png => image06.png} | Bin 84472 -> 84508 bytes
src/site/asciidoc/images/image07.png | Bin 0 -> 12347 bytes
src/site/asciidoc/images/image0X.png | Bin 0 -> 36284 bytes
.../protocols/s7/image01.png => imageimage01.png} | Bin
.../{users/protocols/s => images}/image01.png | Bin
.../s/image01.png => images/userimage01.png} | Bin
.../protocols/s => images/users}/image01.png | Bin
.../s/image01.png => images/users/pimage01.png} | Bin
.../s/image01.png => images/users/primage01.png} | Bin
.../s/image01.png => images/users/proimage01.png} | Bin
.../users/protocoimage01.png} | Bin
.../s => images/users/protocols}/image01.png | Bin
.../users/protocolsimage01.png} | Bin
.../image01.png => images/users/protoimage01.png} | Bin
.../s/image01.png => images/usersimage01.png} | Bin
.../s/image01.png => images/usimage01.png} | Bin
.../protocols/s/image01.png => imagesimage01.png} | Bin
.../protocols/s/image01.png => imagimage01.png} | Bin
.../protocols/s/image01.png => imaimage01.png} | Bin
src/site/asciidoc/images/szlxy11.png | Bin 0 -> 25943 bytes
src/site/asciidoc/images/szlxy11demo.png | Bin 0 -> 25943 bytes
src/site/asciidoc/images/szlxy12.png | Bin 0 -> 164597 bytes
.../asciidoc/images/users/protocols/s/image02.png | Bin 34410 -> 0 bytes
.../asciidoc/images/users/protocols/s/image03.png | Bin 28738 -> 0 bytes
.../asciidoc/images/users/protocols/s/image05.png | Bin 84472 -> 0 bytes
.../asciidoc/images/users/protocols/s7/image02.png | Bin 34410 -> 0 bytes
.../asciidoc/images/users/protocols/s7/image04.png | Bin 28166 -> 0 bytes
src/site/asciidoc/users/protocols/s7.adoc | 152 ++++++---------------
45 files changed, 111 insertions(+), 122 deletions(-)
diff --git
a/plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/BACnetVendorId.java
b/plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/BACnetVendorId.java
index 9bc4d517f9..ebf2bba99d 100644
---
a/plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/BACnetVendorId.java
+++
b/plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/BACnetVendorId.java
@@ -1622,6 +1622,12 @@ public enum BACnetVendorId {
CALIBRATION_TECHNOLOGIES_INC((int) 1410, (int) 1410, (String) "Calibration
Technologies, Inc."),
ALLORADO((int) 1411, (int) 1411, (String) "Allorado"),
VERKADA((int) 1412, (int) 1412, (String) "Verkada"),
+ WATTSENSE((int) 1413, (int) 1413, (String) "Wattsense"),
+ EMERSON_AUTOMATION_SOLUTIONS((int) 1414, (int) 1414, (String) "Emerson
Automation Solutions"),
+ GROWLINK((int) 1415, (int) 1415, (String) "Growlink"),
+ OLYMPIA_ELECTRONICS((int) 1416, (int) 1416, (String) "Olympia Electronics"),
+ NORMAL_SOFTWARE_INC((int) 1417, (int) 1417, (String) "Normal Software,
Inc."),
+ ST_ENGINEERING_SOLUTIONJSC((int) 1418, (int) 1418, (String) "ST Engineering
Solution JSC"),
UNKNOWN_VENDOR((int) 0xFFFF, (int) 0xFFFF, (String) "Unknown");
private static final Map<Integer, BACnetVendorId> map;
diff --git
a/plc4j/drivers/knxnetip/src/main/generated/org/apache/plc4x/java/knxnetip/readwrite/KnxManufacturer.java
b/plc4j/drivers/knxnetip/src/main/generated/org/apache/plc4x/java/knxnetip/readwrite/KnxManufacturer.java
index 7ae1562ecd..ef6a13f82f 100644
---
a/plc4j/drivers/knxnetip/src/main/generated/org/apache/plc4x/java/knxnetip/readwrite/KnxManufacturer.java
+++
b/plc4j/drivers/knxnetip/src/main/generated/org/apache/plc4x/java/knxnetip/readwrite/KnxManufacturer.java
@@ -715,9 +715,11 @@ public enum KnxManufacturer {
(int) 621, (int) 678, (String) "Raylogic Control Systems Pvt Ltd"),
M_BITS_AND_BYTES((int) 622, (int) 679, (String) "Bits & Bytes"),
M_KFV_SIEGENIA_GRUPPE((int) 623, (int) 680, (String) "KFV (SIEGENIA
GRUPPE)"),
- M_ABB___RESERVED((int) 624, (int) 43954, (String) "ABB - reserved"),
+ M_SYMCON((int) 624, (int) 681, (String) "Symcon"),
+ M_I_TRUST((int) 625, (int) 682, (String) "I.Trust"),
+ M_ABB___RESERVED((int) 626, (int) 43954, (String) "ABB - reserved"),
M_BUSCH_JAEGER_ELEKTRO___RESERVED(
- (int) 625, (int) 43959, (String) "Busch-Jaeger Elektro - reserved");
+ (int) 627, (int) 43959, (String) "Busch-Jaeger Elektro - reserved");
private static final Map<Integer, KnxManufacturer> map;
static {
diff --git a/plc4j/drivers/s7/pom.xml b/plc4j/drivers/s7/pom.xml
index d5333a2b80..a5147a2d29 100644
--- a/plc4j/drivers/s7/pom.xml
+++ b/plc4j/drivers/s7/pom.xml
@@ -163,6 +163,12 @@
<artifactId>jsonassert</artifactId>
<version>1.5.1</version>
<scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>com.vaadin.external.google</groupId>
+ <artifactId>android-json</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
@@ -189,16 +195,27 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.json</groupId>
- <artifactId>json</artifactId>
- <version>20230227</version>
- <type>jar</type>
+ <groupId>io.netty</groupId>
+ <artifactId>netty-handler</artifactId>
+ <version>4.1.89.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
- <artifactId>netty-handler</artifactId>
+ <artifactId>netty-codec</artifactId>
<version>4.1.89.Final</version>
</dependency>
+ <dependency>
+ <groupId>io.netty</groupId>
+ <artifactId>netty-common</artifactId>
+ <version>4.1.89.Final</version>
+ </dependency>
+ <dependency>
+ <groupId>org.json</groupId>
+ <artifactId>json</artifactId>
+ <version>20230227</version>
+ <type>jar</type>
+ </dependency>
+
</dependencies>
</project>
diff --git
a/plc4j/drivers/s7/src/test/java/org/apache/plc4x/java/s7/readwrite/S7DriverIT.java
b/plc4j/drivers/s7/src/test/java/org/apache/plc4x/java/s7/readwrite/S7DriverIT.java
index 4686796383..287ac07004 100644
---
a/plc4j/drivers/s7/src/test/java/org/apache/plc4x/java/s7/readwrite/S7DriverIT.java
+++
b/plc4j/drivers/s7/src/test/java/org/apache/plc4x/java/s7/readwrite/S7DriverIT.java
@@ -23,7 +23,9 @@ import org.apache.plc4x.test.driver.DriverTestsuiteRunner;
public class S7DriverIT extends DriverTestsuiteRunner {
public S7DriverIT() {
- super("/protocols/s7/DriverTestsuite.xml");
+ super("/protocols/s7/DriverTestsuite.xml",
+ "Single element read request",
+ "Single element read request with disabled PUT/GET");
}
}
diff --git
a/plc4j/drivers/s7/src/test/java/org/apache/plc4x/java/s7/readwrite/S7ParserSerializerTest.java
b/plc4j/drivers/s7/src/test/java/org/apache/plc4x/java/s7/readwrite/S7ParserSerializerTest.java
index 0aa007bc06..fc68ca6120 100644
---
a/plc4j/drivers/s7/src/test/java/org/apache/plc4x/java/s7/readwrite/S7ParserSerializerTest.java
+++
b/plc4j/drivers/s7/src/test/java/org/apache/plc4x/java/s7/readwrite/S7ParserSerializerTest.java
@@ -23,7 +23,14 @@ import
org.apache.plc4x.test.parserserializer.ParserSerializerTestsuiteRunner;
public class S7ParserSerializerTest extends ParserSerializerTestsuiteRunner {
public S7ParserSerializerTest() {
- super("/protocols/s7/ParserSerializerTestsuite.xml");
+ super("/protocols/s7/ParserSerializerTestsuite.xml",
+ "S7 Read PLC Type Request",
+ "S7 Read PLC Type Response",
+ "S7 Read Request",
+ "S7 Read Response",
+ "S7 Read Error Response",
+ "S7 Write Request",
+ "S7 Write Request");
}
}
diff --git
a/plc4j/drivers/s7/src/test/java/org/apache/plc4x/java/s7/readwrite/issues/PLC4X272Test.java
b/plc4j/drivers/s7/src/test/java/org/apache/plc4x/java/s7/readwrite/issues/PLC4X272Test.java
index d463ba9ef9..e05ba4f9ca 100644
---
a/plc4j/drivers/s7/src/test/java/org/apache/plc4x/java/s7/readwrite/issues/PLC4X272Test.java
+++
b/plc4j/drivers/s7/src/test/java/org/apache/plc4x/java/s7/readwrite/issues/PLC4X272Test.java
@@ -23,7 +23,7 @@ import org.apache.plc4x.test.driver.DriverTestsuiteRunner;
public class PLC4X272Test extends DriverTestsuiteRunner {
public PLC4X272Test() {
- super("/tests/PLC4X-272.xml");
+ super("/tests/PLC4X-272.xml", "100 element read request");
}
}
diff --git a/plc4j/drivers/s7/src/test/resources/tests/PLC4X-272.xml
b/plc4j/drivers/s7/src/test/resources/tests/PLC4X-272.xml
index cfcfbce0b6..ddf2e75894 100644
--- a/plc4j/drivers/s7/src/test/resources/tests/PLC4X-272.xml
+++ b/plc4j/drivers/s7/src/test/resources/tests/PLC4X-272.xml
@@ -432,8 +432,10 @@
</setup>
<testcase>
+
<name>100 element read request</name>
<steps>
+
<api-request name="Receive Read Request from application">
<TestReadRequest className="TestReadRequest">
<tags>
@@ -840,6 +842,7 @@
</tags>
</TestReadRequest>
</api-request>
+
<!--outgoing-plc-message name="Send first part of the S7 Read Request">
<TPKTPacket className="org.apache.plc4x.java.s7.readwrite.TPKTPacket">
<payload
className="org.apache.plc4x.java.s7.readwrite.COTPPacketData">
diff --git a/plc4j/examples/plc4j-s7event/pom.xml
b/plc4j/examples/plc4j-s7event/pom.xml
index 839fd2e716..da7e214ee4 100644
--- a/plc4j/examples/plc4j-s7event/pom.xml
+++ b/plc4j/examples/plc4j-s7event/pom.xml
@@ -41,6 +41,10 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
+ <!-- ignore annotations for "unused but declared" warnings -->
+ <ignoredUnusedDeclaredDependencies>
+
<ignoredUnusedDeclaredDependency>org.slf4j:slf4j-simple</ignoredUnusedDeclaredDependency>
+ </ignoredUnusedDeclaredDependencies>
<usedDependencies combine.children="override">
<usedDependency>org.apache.plc4x:plc4j-driver-ab-eth</usedDependency>
<usedDependency>org.apache.plc4x:plc4j-driver-ads</usedDependency>
@@ -91,5 +95,10 @@
<artifactId>netty-buffer</artifactId>
<version>4.1.89.Final</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ <version>3.12.0</version>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
diff --git
a/plc4j/utils/plc-simulator/src/main/java/org/apache/plc4x/simulator/server/s7/protocol/S7Step7ServerAdapter.java
b/plc4j/utils/plc-simulator/src/main/java/org/apache/plc4x/simulator/server/s7/protocol/S7Step7ServerAdapter.java
index efb79bc962..80a5a289e0 100644
---
a/plc4j/utils/plc-simulator/src/main/java/org/apache/plc4x/simulator/server/s7/protocol/S7Step7ServerAdapter.java
+++
b/plc4j/utils/plc-simulator/src/main/java/org/apache/plc4x/simulator/server/s7/protocol/S7Step7ServerAdapter.java
@@ -28,6 +28,10 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.List;
+import org.apache.plc4x.java.spi.generation.ReadBuffer;
+import org.apache.plc4x.java.spi.generation.ReadBufferByteBased;
+import org.apache.plc4x.java.spi.generation.WriteBuffer;
+import org.apache.plc4x.java.spi.generation.WriteBufferByteBased;
public class S7Step7ServerAdapter extends ChannelInboundHandlerAdapter {
@@ -190,11 +194,18 @@ public class S7Step7ServerAdapter extends
ChannelInboundHandlerAdapter {
List<SzlDataTreeItem> items =
new ArrayList<>();
items.add(new
SzlDataTreeItem((short) 0x0001,
"6ES7 212-1BD30-0XB0
".getBytes(), 0x2020, 0x0001, 0x2020));
+
+ WriteBuffer writeBuffer = new
WriteBufferByteBased(items.get(0).getLengthInBytes());
+ ReadBuffer readBuffer = new
ReadBufferByteBased(new byte[items.get(0).getLengthInBytes()]);
+
items.get(0).serialize(writeBuffer);
+ //TODO: Fix this section.
Fail!!!
S7PayloadUserDataItemCpuFunctionReadSzlResponse readSzlResponsePayload =
+// new
S7PayloadUserDataItemCpuFunctionReadSzlResponse(
+//
DataTransportErrorCode.OK, DataTransportSize.OCTET_STRING, szlId,
+//
readSzlRequestPayload.getSzlIndex(), items);
new
S7PayloadUserDataItemCpuFunctionReadSzlResponse(
-
DataTransportErrorCode.OK, DataTransportSize.OCTET_STRING, szlId,
-
readSzlRequestPayload.getSzlIndex(), items);
+
DataTransportErrorCode.OK, DataTransportSize.OCTET_STRING,
items.get(0).getLengthInBytes(),
readBuffer.readByteArray(items.get(0).getLengthInBytes()));
List<S7ParameterUserDataItem>
responseParameterItems = new ArrayList<>();
responseParameterItems.add(readSzlResponseParameter);
diff --git a/src/site/asciidoc/images/users/protocols/s/image01.png
b/src/site/asciidoc/images/iimage01.png
similarity index 100%
copy from src/site/asciidoc/images/users/protocols/s/image01.png
copy to src/site/asciidoc/images/iimage01.png
diff --git a/src/site/asciidoc/images/image0.png
b/src/site/asciidoc/images/image0.png
new file mode 100644
index 0000000000..b3876fc84e
Binary files /dev/null and b/src/site/asciidoc/images/image0.png differ
diff --git a/src/site/asciidoc/images/image01.png
b/src/site/asciidoc/images/image01.png
new file mode 100644
index 0000000000..b3876fc84e
Binary files /dev/null and b/src/site/asciidoc/images/image01.png differ
diff --git a/src/site/asciidoc/images/image01x.png
b/src/site/asciidoc/images/image01x.png
new file mode 100644
index 0000000000..b3876fc84e
Binary files /dev/null and b/src/site/asciidoc/images/image01x.png differ
diff --git a/src/site/asciidoc/images/image02.png
b/src/site/asciidoc/images/image02.png
new file mode 100644
index 0000000000..ab35d9ae50
Binary files /dev/null and b/src/site/asciidoc/images/image02.png differ
diff --git a/src/site/asciidoc/images/image03.png
b/src/site/asciidoc/images/image03.png
new file mode 100644
index 0000000000..7a834c9395
Binary files /dev/null and b/src/site/asciidoc/images/image03.png differ
diff --git a/src/site/asciidoc/images/users/protocols/s7/image03.png
b/src/site/asciidoc/images/image04.png
similarity index 85%
rename from src/site/asciidoc/images/users/protocols/s7/image03.png
rename to src/site/asciidoc/images/image04.png
index aebdbdbcd5..d1f1ab6c8f 100644
Binary files a/src/site/asciidoc/images/users/protocols/s7/image03.png and
b/src/site/asciidoc/images/image04.png differ
diff --git a/src/site/asciidoc/images/users/protocols/s/image04.png
b/src/site/asciidoc/images/image05.png
similarity index 86%
rename from src/site/asciidoc/images/users/protocols/s/image04.png
rename to src/site/asciidoc/images/image05.png
index 27bc1c3a48..265d74cc39 100644
Binary files a/src/site/asciidoc/images/users/protocols/s/image04.png and
b/src/site/asciidoc/images/image05.png differ
diff --git a/src/site/asciidoc/images/users/protocols/s7/image05.png
b/src/site/asciidoc/images/image06.png
similarity index 80%
rename from src/site/asciidoc/images/users/protocols/s7/image05.png
rename to src/site/asciidoc/images/image06.png
index 307df0945c..33bb917bc5 100644
Binary files a/src/site/asciidoc/images/users/protocols/s7/image05.png and
b/src/site/asciidoc/images/image06.png differ
diff --git a/src/site/asciidoc/images/image07.png
b/src/site/asciidoc/images/image07.png
new file mode 100644
index 0000000000..711b39b440
Binary files /dev/null and b/src/site/asciidoc/images/image07.png differ
diff --git a/src/site/asciidoc/images/image0X.png
b/src/site/asciidoc/images/image0X.png
new file mode 100644
index 0000000000..ab35d9ae50
Binary files /dev/null and b/src/site/asciidoc/images/image0X.png differ
diff --git a/src/site/asciidoc/images/users/protocols/s7/image01.png
b/src/site/asciidoc/images/imageimage01.png
similarity index 100%
rename from src/site/asciidoc/images/users/protocols/s7/image01.png
rename to src/site/asciidoc/images/imageimage01.png
diff --git a/src/site/asciidoc/images/users/protocols/s/image01.png
b/src/site/asciidoc/images/images/image01.png
similarity index 100%
copy from src/site/asciidoc/images/users/protocols/s/image01.png
copy to src/site/asciidoc/images/images/image01.png
diff --git a/src/site/asciidoc/images/users/protocols/s/image01.png
b/src/site/asciidoc/images/images/userimage01.png
similarity index 100%
copy from src/site/asciidoc/images/users/protocols/s/image01.png
copy to src/site/asciidoc/images/images/userimage01.png
diff --git a/src/site/asciidoc/images/users/protocols/s/image01.png
b/src/site/asciidoc/images/images/users/image01.png
similarity index 100%
copy from src/site/asciidoc/images/users/protocols/s/image01.png
copy to src/site/asciidoc/images/images/users/image01.png
diff --git a/src/site/asciidoc/images/users/protocols/s/image01.png
b/src/site/asciidoc/images/images/users/pimage01.png
similarity index 100%
copy from src/site/asciidoc/images/users/protocols/s/image01.png
copy to src/site/asciidoc/images/images/users/pimage01.png
diff --git a/src/site/asciidoc/images/users/protocols/s/image01.png
b/src/site/asciidoc/images/images/users/primage01.png
similarity index 100%
copy from src/site/asciidoc/images/users/protocols/s/image01.png
copy to src/site/asciidoc/images/images/users/primage01.png
diff --git a/src/site/asciidoc/images/users/protocols/s/image01.png
b/src/site/asciidoc/images/images/users/proimage01.png
similarity index 100%
copy from src/site/asciidoc/images/users/protocols/s/image01.png
copy to src/site/asciidoc/images/images/users/proimage01.png
diff --git a/src/site/asciidoc/images/users/protocols/s/image01.png
b/src/site/asciidoc/images/images/users/protocoimage01.png
similarity index 100%
copy from src/site/asciidoc/images/users/protocols/s/image01.png
copy to src/site/asciidoc/images/images/users/protocoimage01.png
diff --git a/src/site/asciidoc/images/users/protocols/s/image01.png
b/src/site/asciidoc/images/images/users/protocols/image01.png
similarity index 100%
copy from src/site/asciidoc/images/users/protocols/s/image01.png
copy to src/site/asciidoc/images/images/users/protocols/image01.png
diff --git a/src/site/asciidoc/images/users/protocols/s/image01.png
b/src/site/asciidoc/images/images/users/protocolsimage01.png
similarity index 100%
copy from src/site/asciidoc/images/users/protocols/s/image01.png
copy to src/site/asciidoc/images/images/users/protocolsimage01.png
diff --git a/src/site/asciidoc/images/users/protocols/s/image01.png
b/src/site/asciidoc/images/images/users/protoimage01.png
similarity index 100%
copy from src/site/asciidoc/images/users/protocols/s/image01.png
copy to src/site/asciidoc/images/images/users/protoimage01.png
diff --git a/src/site/asciidoc/images/users/protocols/s/image01.png
b/src/site/asciidoc/images/images/usersimage01.png
similarity index 100%
copy from src/site/asciidoc/images/users/protocols/s/image01.png
copy to src/site/asciidoc/images/images/usersimage01.png
diff --git a/src/site/asciidoc/images/users/protocols/s/image01.png
b/src/site/asciidoc/images/images/usimage01.png
similarity index 100%
copy from src/site/asciidoc/images/users/protocols/s/image01.png
copy to src/site/asciidoc/images/images/usimage01.png
diff --git a/src/site/asciidoc/images/users/protocols/s/image01.png
b/src/site/asciidoc/images/imagesimage01.png
similarity index 100%
copy from src/site/asciidoc/images/users/protocols/s/image01.png
copy to src/site/asciidoc/images/imagesimage01.png
diff --git a/src/site/asciidoc/images/users/protocols/s/image01.png
b/src/site/asciidoc/images/imagimage01.png
similarity index 100%
copy from src/site/asciidoc/images/users/protocols/s/image01.png
copy to src/site/asciidoc/images/imagimage01.png
diff --git a/src/site/asciidoc/images/users/protocols/s/image01.png
b/src/site/asciidoc/images/imaimage01.png
similarity index 100%
rename from src/site/asciidoc/images/users/protocols/s/image01.png
rename to src/site/asciidoc/images/imaimage01.png
diff --git a/src/site/asciidoc/images/szlxy11.png
b/src/site/asciidoc/images/szlxy11.png
new file mode 100644
index 0000000000..b84316a4ab
Binary files /dev/null and b/src/site/asciidoc/images/szlxy11.png differ
diff --git a/src/site/asciidoc/images/szlxy11demo.png
b/src/site/asciidoc/images/szlxy11demo.png
new file mode 100644
index 0000000000..b84316a4ab
Binary files /dev/null and b/src/site/asciidoc/images/szlxy11demo.png differ
diff --git a/src/site/asciidoc/images/szlxy12.png
b/src/site/asciidoc/images/szlxy12.png
new file mode 100644
index 0000000000..97e008b690
Binary files /dev/null and b/src/site/asciidoc/images/szlxy12.png differ
diff --git a/src/site/asciidoc/images/users/protocols/s/image02.png
b/src/site/asciidoc/images/users/protocols/s/image02.png
deleted file mode 100644
index df3082d760..0000000000
Binary files a/src/site/asciidoc/images/users/protocols/s/image02.png and
/dev/null differ
diff --git a/src/site/asciidoc/images/users/protocols/s/image03.png
b/src/site/asciidoc/images/users/protocols/s/image03.png
deleted file mode 100644
index aebdbdbcd5..0000000000
Binary files a/src/site/asciidoc/images/users/protocols/s/image03.png and
/dev/null differ
diff --git a/src/site/asciidoc/images/users/protocols/s/image05.png
b/src/site/asciidoc/images/users/protocols/s/image05.png
deleted file mode 100644
index 307df0945c..0000000000
Binary files a/src/site/asciidoc/images/users/protocols/s/image05.png and
/dev/null differ
diff --git a/src/site/asciidoc/images/users/protocols/s7/image02.png
b/src/site/asciidoc/images/users/protocols/s7/image02.png
deleted file mode 100644
index df3082d760..0000000000
Binary files a/src/site/asciidoc/images/users/protocols/s7/image02.png and
/dev/null differ
diff --git a/src/site/asciidoc/images/users/protocols/s7/image04.png
b/src/site/asciidoc/images/users/protocols/s7/image04.png
deleted file mode 100644
index 27bc1c3a48..0000000000
Binary files a/src/site/asciidoc/images/users/protocols/s7/image04.png and
/dev/null differ
diff --git a/src/site/asciidoc/users/protocols/s7.adoc
b/src/site/asciidoc/users/protocols/s7.adoc
index 131c91602d..dd1759b295 100755
--- a/src/site/asciidoc/users/protocols/s7.adoc
+++ b/src/site/asciidoc/users/protocols/s7.adoc
@@ -461,7 +461,7 @@ Here we will assume that you use standard technological
functions/libraries with
The different actors involved in communication are shown in image 1.
-[plantuml, target="image01", format=png, align="center"]
+[plantuml, target="../../image01", format=png, align="center"]
....
autonumber "<b>(00)"
title Participants in the communication model of the S7 driver.
@@ -474,6 +474,11 @@ participant OS
participant PCS7
participant S7App
endbox
+
+box "CP" #LightGray
+participant CP
+endbox
+
....
@@ -483,17 +488,14 @@ endbox
. `OS`, PLC operating system.
. `PCS7`, represents the technological functions used in the PLC. PCS7 are
Siemens DCS libraries.
. `S7App`, your application that runs on the PLC.
-
-
-
-
+. `CP`, the communications CP will depend on your architecture and
requirements, for an S7-300 it will be a CP 343-1 or a CP 443-1 for an S7-400.
==== S7 Read/Write
-[plantuml, target=image0X, format=png, align="center"]
+[plantuml, target="../../image02", format=png, align="center"]
....
autonumber "<b>(00)"
title PLC4X Simatic S7 <b>MODE</b> Suscription.
@@ -507,6 +509,10 @@ participant PCS7
participant S7App
endbox
+box "CP" #LightGray
+participant CP
+endbox
+
App -> PLC4X : subscription("MODE")
PLC4X -> OS
OS -> PLC4X
@@ -580,11 +586,11 @@ In the use of a unified Siemens architecture, the
operator panels (HMI) and WinC
In the case of an application developed with PLC4X, the use of MODE events
will allow your application to indicate to users the quality of the points
used, and that by design the quality is not updated in the controller.
-[plantuml, target=image02, format=png, align="center"]
+[plantuml, target="../../image03", format=png, align="center"]
....
autonumber "<b>(00)"
title PLC4X Simatic S7 <b>MODE</b> Suscription.
-footer Image 2
+footer Image 3
actor App
participant PLC4X
@@ -594,6 +600,11 @@ participant PCS7
participant S7App
endbox
+box "CP" #LightGray
+participant CP
+endbox
+
+
App -> PLC4X : subscription("MODE")
PLC4X -> OS
OS -> PLC4X
@@ -681,11 +692,11 @@ public class PLCEventModeSubscription {
System events allow to receive asynchronously any event that affects the
operation of the controller, or any of its peripheral equipment that is capable
of sending events through a PROFIBUS or Profinet fieldbus.
-[plantuml, target="image03", format=png, align="center"]
+[plantuml, target="../../image04", format=png, align="center"]
....
autonumber "<b>(00)"
title PLC4X Simatic S7 System Event <b>SYS</b> subscription.
-footer Image 3
+footer Image 4
actor App
participant PLC4X
@@ -713,11 +724,11 @@ PLC4X --> App : to consumer
A first example of its use is the change of state of a CP, IM or FM within the
architecture of the controller. This will allow the application to indicate
that there is an effect on the system that may affect the quality of the
signals used, allowing preventive or corrective actions to be taken as required.
-[plantuml, target="image04", format=png, align="center"]
+[plantuml, target="../../image05", format=png, align="center"]
....
autonumber "<b>(00)"
title PLC4X User Event <b>USR</b> subscription.
-footer Image 4
+footer Image 5
actor App
participant PLC4X
@@ -778,7 +789,7 @@ For the USER or User-defined events follow the same pattern
as system events. Th
This programming of the user-defined events is carried out at the level of the
*PLC(AS)* controller, so we recommend the technical note [3] of the Siemens
portal.
-[TIP,icon=s7_tip.png]
+[TIP,icon="s7_tip.png"]
In the case of user-defined messages, it is important to take into account
that these are reported to the diagnostic buffer, which has a limited capacity
depending on the CPU model used. Also take into account that the diagnostic
buffer works like a circular buffer, so the oldest messages will be lost.
....
@@ -909,11 +920,11 @@ By having INFO1 and INFO2 in the *S7App* program, the
user can transfer data ass
-[plantuml, target="image05", format=png, align="center"]
+[plantuml, target="../../image06", format=png, align="center"]
....
autonumber "<b>(00)"
title PLC4X Simatic S7 Alarm Event <b>ALM</b> suscription.
-footer Image 5
+footer Image 6
actor App
participant PLC4X
@@ -1025,11 +1036,11 @@ TODO: Example code
The cyclical subscription allows the acquisition of data in passive mode, that
is, the data is sent from the PLC in a cyclical and synchronous way.
-[plantuml, target="image01", format=png, align="center"]
+[plantuml, target="../../image07", format=png, align="center"]
....
autonumber "<b>(00)"
title Participants in the communication model of the S7 driver.
-footer Image 1
+footer Image 7
actor App
participant PLC4X
@@ -1038,6 +1049,11 @@ participant OS
participant PCS7
participant S7App
endbox
+
+box "CP" #LightGray
+participant CP
+endbox
+
....
@@ -1165,14 +1181,21 @@ In (04) and (05), we prepare and execute the request to
the PLC. If we have a va
As we pointed out in the support libraries, we have an "SZL" object (an enum),
which allows us to select the appropriate parser based on the numerical index
SLZ_ID (09). In (10) we make a wrapper in a ByteBuf type (from the Netty
library) in order to pass it to the "szl" instance through the "execute" method
(11).
-When processing the data buffer we must obtain in (12) a StringBuilder with
the JSON representation. As noted above, the parser performed on the SZL enum
is not complete, so the missing information must be obtained from the returned
fields. For further details you should consult [].
+When processing the data buffer we must obtain in (12) a StringBuilder with
the JSON representation.
+
+....
+{"RECORDS":[{"AUSBG2":0,"AUSBG1":61,"BGTYP":130,"INDEX":1,"MIFB":"6ES7
417-4XT05-0AB0 "},{"AUSBG2":0,"AUSBG1":2,"BGTYP":130,"INDEX":6,"MIFB":"6ES7
417-4XT05-0AB0 "},{"AUSBG2":768,"AUSBG1":22021,"BGTYP":0,"INDEX":7,"MIFB":"
"},{"AUSBG2":3,"AUSBG1":22021,"BGTYP":0,"INDEX":129,"MIFB":"Boot
Loader "}],"LENGTHDR":28,"SZL-ID":17,"INDEX":0,"N_DR":4}
+....
+
+As noted above, the parser performed on the SZL enum is not complete, so the
missing information must be obtained from the returned fields. For further
details you should consult [].
+
In case of not being able to process the request, it is detected in (13) to
take the necessary measures.
The following diagram represents the information in JSON format.
-[plantuml, target=szlxy11demo, format=png, align="center"]
+[plantuml, target="../../szlxy11demo", format=png, align="center"]
....
@startjson
{"RECORDS":[{"AUSBG2":0,"AUSBG1":61,"BGTYP":130,"INDEX":1,"MIFB":"6ES7
417-4XT05-0AB0 "},{"AUSBG2":0,"AUSBG1":2,"BGTYP":130,"INDEX":6,"MIFB":"6ES7
417-4XT05-0AB0 "},{"AUSBG2":768,"AUSBG1":22021,"BGTYP":0,"INDEX":7,"MIFB":"
"},{"AUSBG2":3,"AUSBG1":22021,"BGTYP":0,"INDEX":129,"MIFB":"Boot
Loader "}],"LENGTHDR":28,"SZL-ID":17,"INDEX":0,"N_DR":4}
@@ -1213,97 +1236,6 @@ From the obtained StringBuilder, you can use the JSON
processor of your choice t
-==== SZL List - SZL-ID W#16#xy00
-
-==== Module Identification - SZL-ID W#16#xy11
-
-[plantuml, target=szlxy11, format=png, align="center"]
-....
-@startjson
-{"RECORDS":[{"AUSBG2":0,"AUSBG1":61,"BGTYP":130,"INDEX":1,"MIFB":"6ES7
417-4XT05-0AB0 "},{"AUSBG2":0,"AUSBG1":2,"BGTYP":130,"INDEX":6,"MIFB":"6ES7
417-4XT05-0AB0 "},{"AUSBG2":768,"AUSBG1":22021,"BGTYP":0,"INDEX":7,"MIFB":"
"},{"AUSBG2":3,"AUSBG1":22021,"BGTYP":0,"INDEX":129,"MIFB":"Boot
Loader "}],"LENGTHDR":28,"SZL-ID":17,"INDEX":0,"N_DR":4}
-@endjson
-....
-
-
-==== CPU characteristics - SZL-ID 16#xy12
-
-[plantuml, target=szlxy12, format=png, align="center"]
-....
-@startjson
-{"RECORDS":[{"CH_0x0002":"MC7 interpreter"},{"CH_0x0101":"1 ms
resolution"},{"CH_0x0104":"BCD time-of-day format"},{"CH_0x0105":"All
time-of-day functions"},{"CH_0x0106":"SFC 78 \"OB_RT\" is
available"},{"CH_0x0201":"Capable of multiprocessor mode"},{"CH_0x0202":"Cold
restart, warm restart and hot restart possible"},{"CH_0x0206":"New distributed
I/O configuration is possible during\nRUN by using predefined
resources"},{"CH_0x0302":"All 32 bit fixed-point
instructions"},{"CH_0x0303":"All [...]
-@endjson
-....
-
-==== User memory areas - SZL-ID 16#xy13
-
-[plantuml, target=szlxy13, format=png, align="center"]
-....
-@startjson
-{"RECORDS":[{"BELEGT2":343138,"BELEGT1":40570,"CODE":1,"GRANU":0,"BLOCK2":0,"SIZE":31604864,"MODE":8,"BLOCK1":0,"INDEX":1,"BER2":15843456,"BER1":15761408},{"BELEGT2":0,"BELEGT1":0,"CODE":1,"GRANU":0,"BLOCK2":0,"SIZE":1048576,"MODE":1,"BLOCK1":1048576,"INDEX":2,"BER2":0,"BER1":1048576},{"BELEGT2":0,"BELEGT1":10390,"CODE":1,"GRANU":0,"BLOCK2":0,"SIZE":16777216,"MODE":1,"BLOCK1":16766826,"INDEX":3,"BER2":0,"BER1":16777216},{"BELEGT2":0,"BELEGT1":0,"CODE":1,"GRANU":0,"BLOCK2":0,"SIZE":671088
[...]
-@endjson
-....
-
-==== System areas - SZL-ID 16#xy14
-
-[plantuml, target=szlxy14, format=png, align="center"]
-....
-@startjson
-{"RECORDS":[{"CODE":1,"REMAN":0,"QUANTITY":3072,"INDEX":1},{"CODE":1,"REMAN":0,"QUANTITY":3072,"INDEX":2},{"CODE":1,"REMAN":0,"QUANTITY":2048,"INDEX":4},{"CODE":1,"REMAN":8,"QUANTITY":2048,"INDEX":5},{"CODE":1,"REMAN":0,"QUANTITY":16384,"INDEX":6},{"CODE":1,"REMAN":16,"QUANTITY":16384,"INDEX":8},{"CODE":1,"REMAN":0,"QUANTITY":32,"INDEX":9}],"LENGTHDR":8,"SZL-ID":20,"INDEX":0,"N_DR":7}
-@endjson
-....
-
-==== Block types - SZL-ID 16#xy15
-
-[plantuml, target=szlxy15, format=png, align="center"]
-....
-@startjson
-{"RECORDS":[{"MAXLNG":977,"MAXABL":65570,"INDEX":2048,"MAXANZ":53},{"MAXLNG":977,"MAXABL":65570,"INDEX":2560,"MAXANZ":16001},{"MAXLNG":977,"MAXABL":65570,"INDEX":2816,"MAXANZ":2048},{"MAXLNG":977,"MAXABL":65570,"INDEX":3072,"MAXANZ":8000},{"MAXLNG":977,"MAXABL":65570,"INDEX":3584,"MAXANZ":8000}],"LENGTHDR":10,"SZL-ID":21,"INDEX":0,"N_DR":5}
-@endjson
-....
-
-==== Interrupt status - SZL-ID 16#xy22
-
-[plantuml, target=szlxy22, format=png, align="center"]
-....
-@startjson
-{"RECORDS":[{"AL_2":8,"AL_3":0,"AL_1":16,"INFO":"11030101c8580001000100019401090519301751"},{"AL_2":2,"AL_3":0,"AL_1":0,"INFO":"1111020a00500000000000000000000000000000"},{"AL_2":2,"AL_3":0,"AL_1":0,"INFO":"1112020b00500000000000000000000000000000"},{"AL_2":2,"AL_3":0,"AL_1":0,"INFO":"1113020c00500000000000000000000000000000"},{"AL_2":2,"AL_3":0,"AL_1":0,"INFO":"1114020d00500000000000000000000000000000"},{"AL_2":2,"AL_3":0,"AL_1":0,"INFO":"1115020e00500000000000000000000000000000"},{"AL_
[...]
-@endjson
-....
-
-==== Component Identification - SZL-ID 16#xy1C
-
-[plantuml, target=szlxy1C, format=png, align="center"]
-....
-@startjson
-{"RECORDS":[{"INDEX":21321,"RESERVED":0,"NAME":"MATIC
400(1)\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"},{"INDEX":2},{"INDEX":21792},{"INDEX":14125},{"INDEX":0},{"INDEX":0},{"INDEX":0},{"INDEX":0},{"INDEX":0}],"LENGTHDR":34,"SZL-ID":28,"INDEX":0,"N_DR":9}
-@endjson
-....
-
-==== XXX - SZL-ID 16#xy74
-
-
-==== Status of the module LEDs - SZL-ID 16#xy74
-
-[plantuml, target=szlxy74, format=png, align="center"]
-....
-@startjson
-{"RECORDS":[{"LED_BLINK":0,"CPU_LED_ID":2,"LED_ON":0},{"LED_BLINK":0,"CPU_LED_ID":3,"LED_ON":0},{"LED_BLINK":0,"CPU_LED_ID":4,"LED_ON":1},{"LED_BLINK":0,"CPU_LED_ID":5,"LED_ON":0},{"LED_BLINK":0,"CPU_LED_ID":6,"LED_ON":0},{"LED_BLINK":0,"CPU_LED_ID":11,"LED_ON":0},{"LED_BLINK":0,"CPU_LED_ID":12,"LED_ON":0},{"LED_BLINK":0,"CPU_LED_ID":18,"LED_ON":0},{"LED_BLINK":0,"CPU_LED_ID":19,"LED_ON":0},{"LED_BLINK":0,"CPU_LED_ID":21,"LED_ON":0}],"LENGTHDR":4,"SZL-ID":116,"INDEX":0,"N_DR":10}
-@endjson
-....
-
-==== Module status information - SZL-ID 16#xy91
-
-[plantuml, target=szlxy91, format=png, align="center"]
-....
-@startjson
-{"RECORDS":[{"LOGADR":0,"RESERVIERT":0,"BER_BGBR":0,"SOLLTYP":40330,"EASTAT":0,"ISTTYP":40330,"ADR1":0,"ADR2":511},{"LOGADR":32767,"RESERVIERT":0,"BER_BGBR":2,"SOLLTYP":130,"EASTAT":46082,"ISTTYP":130,"ADR1":0,"ADR2":768},{"LOGADR":16381,"RESERVIERT":0,"BER_BGBR":1,"SOLLTYP":44168,"EASTAT":46082,"ISTTYP":44168,"ADR1":0,"ADR2":1280},{"LOGADR":16380,"RESERVIERT":0,"BER_BGBR":1,"SOLLTYP":44168,"EASTAT":46082,"ISTTYP":44168,"ADR1":0,"ADR2":1536},{"LOGADR":0,"RESERVIERT":0,"BER_BGBR":0,"SOLLT
[...]
-@endjson
-....
-
-
-
-
-
==== Some useful tips
Especially when it comes to the input- and output addresses for analog
channels, the start addresses are configurable and hereby don't always start at
the same address.