You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2024/01/31 09:59:29 UTC

(plc4x) branch fix/DATE_AND_TIME_2 updated (877a79aa3c -> afcea07e00)

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a change to branch fix/DATE_AND_TIME_2
in repository https://gitbox.apache.org/repos/asf/plc4x.git


    from 877a79aa3c fix: Updated the definition of the IEC61131_DATE_AND_TIME datatype feat: Added support for 'BCD' formatted unsigned numbers in read- and write-buffer.
     new a7b0a073a0 feat: Got the RealIdentifitationRequest working for my Adam devices in the new Profinet driver
     new afcea07e00 feat: Continued working on getting the datatype test for the L-types working for S7-1500

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../profinet/protocol/ProfinetProtocolLogic.java   | 72 ++++++++++++----------
 ...PN.java => ManualProfinetIoTestAdam6117PN.java} | 23 ++++---
 ...st.java => ManualProfinetIoTestAdam6150PN.java} | 10 +--
 ...de.java => ManualProfinetIoTestSimocodePN.java} | 15 ++++-
 ...oupler.java => ManualProfinetIoTestWagoPN.java} | 23 ++++---
 .../src/test/resources/logback-test.xml            |  2 +-
 ...etIoTest.java => ManualProfinetIoAdamTest.java} |  9 +--
 ...Test.java => ManualProfinetIoSimocodeTest.java} |  4 +-
 .../java/profinet/ManualProfinetPcapTest.java      | 54 +++++++++++-----
 .../java/s7/readwrite/ManualS71200DriverTest.java  |  2 +-
 .../java/s7/readwrite/ManualS71500DriverTest.java  | 18 ++++--
 .../java/spi/generation/WriteBufferByteBased.java  |  5 ++
 .../s7/src/main/resources/protocols/s7/s7.mspec    |  1 +
 13 files changed, 146 insertions(+), 92 deletions(-)
 rename plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/{ManualProfinetIoTestAdamPN.java => ManualProfinetIoTestAdam6117PN.java} (62%)
 copy plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/{ManualProfinetIoBrowseTest.java => ManualProfinetIoTestAdam6150PN.java} (82%)
 rename plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/{ManualProfinetIoTestSimocode.java => ManualProfinetIoTestSimocodePN.java} (70%)
 rename plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/{ManualProfinetIoTestWagoPNCoupler.java => ManualProfinetIoTestWagoPN.java} (61%)
 copy plc4j/drivers/profinet/src/test/java/org/apache/plc4x/java/profinet/{ManualProfinetIoTest.java => ManualProfinetIoAdamTest.java} (93%)
 rename plc4j/drivers/profinet/src/test/java/org/apache/plc4x/java/profinet/{ManualProfinetIoTest.java => ManualProfinetIoSimocodeTest.java} (98%)


(plc4x) 02/02: feat: Continued working on getting the datatype test for the L-types working for S7-1500

Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch fix/DATE_AND_TIME_2
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit afcea07e0086134c7930d43de7747fd55185707e
Author: Christofer Dutz <cd...@apache.org>
AuthorDate: Tue Jan 30 21:20:51 2024 +0100

    feat: Continued working on getting the datatype test for the L-types working for S7-1500
---
 .../java/s7/readwrite/ManualS71200DriverTest.java      |  2 +-
 .../java/s7/readwrite/ManualS71500DriverTest.java      | 18 ++++++++++++------
 .../java/spi/generation/WriteBufferByteBased.java      |  5 +++++
 protocols/s7/src/main/resources/protocols/s7/s7.mspec  |  1 +
 4 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/plc4j/drivers/s7/src/test/java/org/apache/plc4x/java/s7/readwrite/ManualS71200DriverTest.java b/plc4j/drivers/s7/src/test/java/org/apache/plc4x/java/s7/readwrite/ManualS71200DriverTest.java
index 57c75417ef..0a80b693b5 100644
--- a/plc4j/drivers/s7/src/test/java/org/apache/plc4x/java/s7/readwrite/ManualS71200DriverTest.java
+++ b/plc4j/drivers/s7/src/test/java/org/apache/plc4x/java/s7/readwrite/ManualS71200DriverTest.java
@@ -105,7 +105,7 @@ public class ManualS71200DriverTest extends ManualTest {
         test.addTestCase("%DB4:72:TIME_OF_DAY", new PlcTIME_OF_DAY(LocalTime.parse("15:36:30.123")));
         //test.addTestCase("%DB4:62:LTIME_OF_DAY", new PlcLTIME_OF_DAY(Duration.parse(""));
         // Not supported in S7 1200
-        test.addTestCase("%DB4:96:DATE_AND_TIME", new PlcDATE_AND_TIME(LocalDateTime.parse("1996-05-06T15:36:30")));
+        //test.addTestCase("%DB4:96:DATE_AND_TIME", new PlcDATE_AND_TIME(LocalDateTime.parse("1996-05-06T15:36:30")));
         // Not supported in S7 1200
         //test.addTestCase("%DB4:124:LDT", "1978-03-28T15:36:30");
 
diff --git a/plc4j/drivers/s7/src/test/java/org/apache/plc4x/java/s7/readwrite/ManualS71500DriverTest.java b/plc4j/drivers/s7/src/test/java/org/apache/plc4x/java/s7/readwrite/ManualS71500DriverTest.java
index e240744921..50bbc25f1d 100644
--- a/plc4j/drivers/s7/src/test/java/org/apache/plc4x/java/s7/readwrite/ManualS71500DriverTest.java
+++ b/plc4j/drivers/s7/src/test/java/org/apache/plc4x/java/s7/readwrite/ManualS71500DriverTest.java
@@ -38,17 +38,21 @@ public class ManualS71500DriverTest extends ManualTest {
         test.addTestCase("%DB1:1:BYTE", new PlcBYTE(42));
         test.addTestCase("%DB1:2:WORD", new PlcWORD(42424));
         test.addTestCase("%DB1:4:DWORD", new PlcDWORD(4242442424L));
-        test.addTestCase("%DB1:4:LWORD", new PlcLWORD(4242442424424244242L));
+        // TODO: Currently: Invalid Datatype ... needs to be fixed
+        //test.addTestCase("%DB1:4:LWORD", new PlcLWORD(4242442424424244242L));
         test.addTestCase("%DB1:16:SINT", new PlcSINT(-42));
         test.addTestCase("%DB1:17:USINT", new PlcUSINT(42));
         test.addTestCase("%DB1:18:INT", new PlcINT(-2424));
         test.addTestCase("%DB1:20:UINT", new PlcUINT(42424));
         test.addTestCase("%DB1:22:DINT", new PlcDINT(-242442424));
         test.addTestCase("%DB1:26:UDINT", new PlcUDINT(4242442424L));
-        test.addTestCase("%DB1:30:LINT", new PlcLINT(-4242442424424244242L));
-        test.addTestCase("%DB1:38:ULINT", new PlcULINT(4242442424424244242L));
+        // TODO: Currently: Invalid Datatype ... needs to be fixed
+        //test.addTestCase("%DB1:30:LINT", new PlcLINT(-4242442424424244242L));
+        // TODO: Currently: Invalid Datatype ... needs to be fixed
+        //test.addTestCase("%DB1:38:ULINT", new PlcULINT(4242442424424244242L));
         test.addTestCase("%DB1:46:REAL", new PlcREAL(3.141593F));
-        test.addTestCase("%DB1:50:LREAL", new PlcLREAL(2.71828182846D));
+        // TODO: Currently: Invalid Datatype ... needs to be fixed
+        //test.addTestCase("%DB1:50:LREAL", new PlcLREAL(2.71828182846D));
         test.addTestCase("%DB1:58:CHAR", new PlcCHAR("H"));
         test.addTestCase("%DB1:60:WCHAR", new PlcWCHAR("w"));
         test.addTestCase("%DB1:62:STRING(10)", new PlcSTRING("hurz"));
@@ -56,11 +60,13 @@ public class ManualS71500DriverTest extends ManualTest {
         test.addTestCase("%DB1:830:STRING", new PlcSTRING("hurz"));
         test.addTestCase("%DB1:1086:WSTRING", new PlcWSTRING("wolf"));
         test.addTestCase("%DB1:1598:TIME", new PlcTIME(Duration.parse("PT1.234S")));
-        test.addTestCase("%DB1:1602:LTIME", new PlcLTIME(Duration.parse("PT589H23M12.034002044S")));
+        // TODO: Currently: Invalid Datatype ... needs to be fixed
+        //test.addTestCase("%DB1:1602:LTIME", new PlcLTIME(Duration.parse("PT589H23M12.034002044S")));
         test.addTestCase("%DB1:1610:DATE", new PlcDATE(LocalDate.parse("1998-03-28")));
         test.addTestCase("%DB1:1612:TIME_OF_DAY", new PlcTIME_OF_DAY(LocalTime.parse("15:36:30.123")));
         // TODO: Make this value a bit more challenging.
-        test.addTestCase("%DB1:1616:LTIME_OF_DAY", new PlcLTIME_OF_DAY(LocalTime.parse("15:36:30")));
+        // TODO: Currently: No enum constant for LTIME_OF_DAY
+        //test.addTestCase("%DB1:1616:LTIME_OF_DAY", new PlcLTIME_OF_DAY(LocalTime.parse("15:36:30")));
         test.addTestCase("%DB1:1624:DATE_AND_TIME", new PlcDATE_AND_TIME(LocalDateTime.parse("1996-05-06T15:36:30")));
         test.addTestCase("%DB1:1632:LDT", new PlcLDATE_AND_TIME(LocalDateTime.parse("1978-03-28T15:36:30")));
 
diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/generation/WriteBufferByteBased.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/generation/WriteBufferByteBased.java
index e90860a6b7..f99dcdcdcd 100644
--- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/generation/WriteBufferByteBased.java
+++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/generation/WriteBufferByteBased.java
@@ -119,8 +119,10 @@ public class WriteBufferByteBased implements WriteBuffer, BufferCommons {
                         throw new SerializationException("'BCD' encoded value must be only one hexadecimal digit long");
                     }
                     bo.writeByte(true, bitLength, value);
+                    break;
                 case "default":
                     bo.writeByte(true, bitLength, value);
+                    break;
                 default:
                     throw new ParseException("unsupported encoding '" + encoding + "'");
             }
@@ -173,6 +175,7 @@ public class WriteBufferByteBased implements WriteBuffer, BufferCommons {
                     }
                     // Write the last digit.
                     bo.writeByte(false, 4, (byte) (value % 10));
+                    break;
                 }
                 case "default":
                     bo.writeShort(true, bitLength, value);
@@ -229,6 +232,7 @@ public class WriteBufferByteBased implements WriteBuffer, BufferCommons {
                     }
                     // Write the last digit.
                     bo.writeByte(false, 4, (byte) (value % 10));
+                    break;
                 }
                 case "default":
                     if (byteOrder == ByteOrder.LITTLE_ENDIAN) {
@@ -288,6 +292,7 @@ public class WriteBufferByteBased implements WriteBuffer, BufferCommons {
                     }
                     // Write the last digit.
                     bo.writeByte(false, 4, (byte) (value % 10));
+                    break;
                 }
                 case "default":
                     if (byteOrder == ByteOrder.LITTLE_ENDIAN) {
diff --git a/protocols/s7/src/main/resources/protocols/s7/s7.mspec b/protocols/s7/src/main/resources/protocols/s7/s7.mspec
index 7e34fa569a..bd7a558425 100644
--- a/protocols/s7/src/main/resources/protocols/s7/s7.mspec
+++ b/protocols/s7/src/main/resources/protocols/s7/s7.mspec
@@ -803,6 +803,7 @@
         ]
         // - Date & Time: interpreted as individual components.
         //   Format description: https://support.industry.siemens.com/cs/document/36479/date_and_time-format-bei-s7-?dti=0&lc=de-DE
+        //   https://lothar-michaelis.de/sps-tutorial/datentypen.html
         ['"IEC61131_DATE_AND_TIME"' DATE_AND_TIME
             // One byte with 2 4-bit BCD encoded values representing 90-99 = 1990-1999 and 00-89 = 2000-2089
             [simple uint 8  year         encoding='"BCD"']


(plc4x) 01/02: feat: Got the RealIdentifitationRequest working for my Adam devices in the new Profinet driver

Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch fix/DATE_AND_TIME_2
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit a7b0a073a04db939e97311bc80f3007de8769211
Author: Christofer Dutz <cd...@apache.org>
AuthorDate: Tue Jan 30 21:19:23 2024 +0100

    feat: Got the RealIdentifitationRequest working for my Adam devices in the new Profinet driver
    
    Also tried getting the old driver working with my Adam devices.
---
 .../profinet/protocol/ProfinetProtocolLogic.java   | 72 ++++++++++++----------
 ...PN.java => ManualProfinetIoTestAdam6117PN.java} | 23 ++++---
 ...de.java => ManualProfinetIoTestAdam6150PN.java} | 24 +++++---
 ...de.java => ManualProfinetIoTestSimocodePN.java} | 15 ++++-
 ...oupler.java => ManualProfinetIoTestWagoPN.java} | 23 ++++---
 .../src/test/resources/logback-test.xml            |  2 +-
 ...etIoTest.java => ManualProfinetIoAdamTest.java} |  9 +--
 ...Test.java => ManualProfinetIoSimocodeTest.java} |  4 +-
 .../java/profinet/ManualProfinetPcapTest.java      | 54 +++++++++++-----
 9 files changed, 136 insertions(+), 90 deletions(-)

diff --git a/plc4j/drivers/profinet-ng/src/main/java/org/apache/plc4x/java/profinet/protocol/ProfinetProtocolLogic.java b/plc4j/drivers/profinet-ng/src/main/java/org/apache/plc4x/java/profinet/protocol/ProfinetProtocolLogic.java
index 142d078e63..169bfca6be 100644
--- a/plc4j/drivers/profinet-ng/src/main/java/org/apache/plc4x/java/profinet/protocol/ProfinetProtocolLogic.java
+++ b/plc4j/drivers/profinet-ng/src/main/java/org/apache/plc4x/java/profinet/protocol/ProfinetProtocolLogic.java
@@ -254,17 +254,21 @@ public class ProfinetProtocolLogic extends Plc4xProtocolBase<Ethernet_Frame> imp
                                             submoduleIndex.get(curSlot).put(curSubslot, curSubmodule);
 
                                             // Replace the text-ids with readable values
-                                            for (ProfinetIoDataInput profinetIoDataInput : curSubmodule.getIoData().getInput()) {
-                                                for (ProfinetDataItem profinetDataItem : profinetIoDataInput.getDataItemList()) {
-                                                    if (textMapping.containsKey(profinetDataItem.getTextId())) {
-                                                        profinetDataItem.setTextId(textMapping.get(profinetDataItem.getTextId()));
+                                            if(curSubmodule.getIoData().getInput() != null) {
+                                                for (ProfinetIoDataInput profinetIoDataInput : curSubmodule.getIoData().getInput()) {
+                                                    for (ProfinetDataItem profinetDataItem : profinetIoDataInput.getDataItemList()) {
+                                                        if (textMapping.containsKey(profinetDataItem.getTextId())) {
+                                                            profinetDataItem.setTextId(textMapping.get(profinetDataItem.getTextId()));
+                                                        }
                                                     }
                                                 }
                                             }
-                                            for (ProfinetIoDataOutput profinetIoDataOutput : curSubmodule.getIoData().getOutput()) {
-                                                for (ProfinetDataItem profinetDataItem : profinetIoDataOutput.getDataItemList()) {
-                                                    if (textMapping.containsKey(profinetDataItem.getTextId())) {
-                                                        profinetDataItem.setTextId(textMapping.get(profinetDataItem.getTextId()));
+                                            if(curSubmodule.getIoData().getOutput() != null) {
+                                                for (ProfinetIoDataOutput profinetIoDataOutput : curSubmodule.getIoData().getOutput()) {
+                                                    for (ProfinetDataItem profinetDataItem : profinetIoDataOutput.getDataItemList()) {
+                                                        if (textMapping.containsKey(profinetDataItem.getTextId())) {
+                                                            profinetDataItem.setTextId(textMapping.get(profinetDataItem.getTextId()));
+                                                        }
                                                     }
                                                 }
                                             }
@@ -341,34 +345,38 @@ public class ProfinetProtocolLogic extends Plc4xProtocolBase<Ethernet_Frame> imp
                     ProfinetVirtualSubmoduleItem subslotModule = subslotEntry.getValue();
 
                     // Add all the input tags.
-                    for (ProfinetIoDataInput profinetIoDataInput : subslotModule.getIoData().getInput()) {
-                        for (int i = 0; i < profinetIoDataInput.getDataItemList().size(); i++) {
-                            ProfinetDataItem profinetDataItem = profinetIoDataInput.getDataItemList().get(i);
-                            ProfinetDataTypeMapper.DataTypeInformation dataTypeInformation =
-                                ProfinetDataTypeMapper.getPlcValueType(profinetDataItem);
-                            // The ids have been replaced by real textual values in the connection phase.
-                            String name = profinetDataItem.getTextId();
-                            items.add(new DefaultPlcBrowseItem(new ProfinetTag(
-                                slot, subslot, ProfinetTag.Direction.INPUT,
-                                i, dataTypeInformation.getPlcValueType(), dataTypeInformation.getNumElements()),
-                                name, false, true, true,
-                                Collections.emptyMap(), Collections.emptyMap()));
+                    if(subslotModule.getIoData().getInput() != null) {
+                        for (ProfinetIoDataInput profinetIoDataInput : subslotModule.getIoData().getInput()) {
+                            for (int i = 0; i < profinetIoDataInput.getDataItemList().size(); i++) {
+                                ProfinetDataItem profinetDataItem = profinetIoDataInput.getDataItemList().get(i);
+                                ProfinetDataTypeMapper.DataTypeInformation dataTypeInformation =
+                                    ProfinetDataTypeMapper.getPlcValueType(profinetDataItem);
+                                // The ids have been replaced by real textual values in the connection phase.
+                                String name = profinetDataItem.getTextId();
+                                items.add(new DefaultPlcBrowseItem(new ProfinetTag(
+                                    slot, subslot, ProfinetTag.Direction.INPUT,
+                                    i, dataTypeInformation.getPlcValueType(), dataTypeInformation.getNumElements()),
+                                    name, false, true, true,
+                                    Collections.emptyMap(), Collections.emptyMap()));
+                            }
                         }
                     }
 
                     // Add all the output tags.
-                    for (ProfinetIoDataOutput profinetIoDataOutput : subslotModule.getIoData().getOutput()) {
-                        for (int i = 0; i < profinetIoDataOutput.getDataItemList().size(); i++) {
-                            ProfinetDataItem profinetDataItem = profinetIoDataOutput.getDataItemList().get(i);
-                            ProfinetDataTypeMapper.DataTypeInformation dataTypeInformation =
-                                ProfinetDataTypeMapper.getPlcValueType(profinetDataItem);
-                            // The ids have been replaced by real textual values in the connection phase.
-                            String name = profinetDataItem.getTextId();
-                            items.add(new DefaultPlcBrowseItem(new ProfinetTag(
-                                slot, subslot, ProfinetTag.Direction.OUTPUT,
-                                i, dataTypeInformation.getPlcValueType(), dataTypeInformation.getNumElements()),
-                                name, false, true, true,
-                                Collections.emptyMap(), Collections.emptyMap()));
+                    if(subslotModule.getIoData().getOutput() != null) {
+                        for (ProfinetIoDataOutput profinetIoDataOutput : subslotModule.getIoData().getOutput()) {
+                            for (int i = 0; i < profinetIoDataOutput.getDataItemList().size(); i++) {
+                                ProfinetDataItem profinetDataItem = profinetIoDataOutput.getDataItemList().get(i);
+                                ProfinetDataTypeMapper.DataTypeInformation dataTypeInformation =
+                                    ProfinetDataTypeMapper.getPlcValueType(profinetDataItem);
+                                // The ids have been replaced by real textual values in the connection phase.
+                                String name = profinetDataItem.getTextId();
+                                items.add(new DefaultPlcBrowseItem(new ProfinetTag(
+                                    slot, subslot, ProfinetTag.Direction.OUTPUT,
+                                    i, dataTypeInformation.getPlcValueType(), dataTypeInformation.getNumElements()),
+                                    name, false, true, true,
+                                    Collections.emptyMap(), Collections.emptyMap()));
+                            }
                         }
                     }
                 }
diff --git a/plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTestAdamPN.java b/plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTestAdam6117PN.java
similarity index 62%
rename from plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTestAdamPN.java
rename to plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTestAdam6117PN.java
index 8f5352d8eb..6c122538d9 100644
--- a/plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTestAdamPN.java
+++ b/plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTestAdam6117PN.java
@@ -21,24 +21,27 @@ package org.apache.plc4x.java.profinet;
 
 import org.apache.plc4x.java.DefaultPlcDriverManager;
 import org.apache.plc4x.java.api.PlcConnection;
-import org.apache.plc4x.java.api.messages.PlcSubscriptionRequest;
-import org.apache.plc4x.java.api.messages.PlcSubscriptionResponse;
+import org.apache.plc4x.java.api.messages.*;
 
 import java.time.Duration;
+import java.util.List;
 import java.util.concurrent.TimeUnit;
 
-public class ManualProfinetIoTestAdamPN {
+public class ManualProfinetIoTestAdam6117PN {
 
     public static void main(String[] args) throws Exception {
+        // Advantech Adam 6150PN (8 chanel 16 bit analog inputs)
         // WireShark filter: "eth.addr == 74:fe:48:63:f6:c2"
         try(PlcConnection connection =  new DefaultPlcDriverManager().getConnection("profinet:raw://192.168.24.41")) {
-            // Create and execute the subscription request.
-            PlcSubscriptionRequest subscriptionRequest = connection.subscriptionRequestBuilder()
-                .addCyclicTagAddress("inputs", "1.1.INPUT.0:BYTE[10]", Duration.ofMillis(400))
-                .addCyclicTagAddress("output", "1.1.OUTPUT.0:DWORD", Duration.ofMillis(400))
-                .build();
-            PlcSubscriptionResponse subscriptionResponse = subscriptionRequest.execute().get(10000, TimeUnit.MILLISECONDS);
-            System.out.println(subscriptionResponse);
+            // List up all resources found in the remote device.
+            PlcBrowseRequest browseRequest = connection.browseRequestBuilder().addQuery("all", "*").build();
+            PlcBrowseResponse plcBrowseResponse = browseRequest.execute().get();
+            for (String queryName : plcBrowseResponse.getQueryNames()) {
+                List<PlcBrowseItem> values = plcBrowseResponse.getValues(queryName);
+                for (PlcBrowseItem value : values) {
+                    System.out.println(value.getName() + ": " + value.getTag().getAddressString());
+                }
+            }
         }
     }
 
diff --git a/plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTestSimocode.java b/plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTestAdam6150PN.java
similarity index 58%
copy from plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTestSimocode.java
copy to plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTestAdam6150PN.java
index 95072070d8..70b65d0587 100644
--- a/plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTestSimocode.java
+++ b/plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTestAdam6150PN.java
@@ -24,20 +24,24 @@ import org.apache.plc4x.java.api.PlcConnection;
 import org.apache.plc4x.java.api.messages.*;
 
 import java.time.Duration;
+import java.util.List;
 import java.util.concurrent.TimeUnit;
 
-public class ManualProfinetIoTestSimocode {
+public class ManualProfinetIoTestAdam6150PN {
 
     public static void main(String[] args) throws Exception {
-        // WireShark filter: "eth.addr == 88:3f:99:00:06:ef"
-        try(PlcConnection connection =  new DefaultPlcDriverManager().getConnection("profinet:raw://192.168.24.31")) {
-            // Create and execute the subscription request.
-            PlcSubscriptionRequest subscriptionRequest = connection.subscriptionRequestBuilder()
-                .addCyclicTagAddress("inputs", "1.1.INPUT.0:BYTE[10]", Duration.ofMillis(400))
-                .addCyclicTagAddress("output", "1.1.OUTPUT.0:DWORD", Duration.ofMillis(400))
-                .build();
-            PlcSubscriptionResponse subscriptionResponse = subscriptionRequest.execute().get(100000, TimeUnit.MILLISECONDS);
-            System.out.println(subscriptionResponse);
+        // Advantech Adam 6150PN (8 channel digital input, 7 chanel digital output)
+        // WireShark filter: "eth.addr == 74:fe:48:82:4a:7c"
+        try(PlcConnection connection =  new DefaultPlcDriverManager().getConnection("profinet:raw://192.168.24.42")) {
+            // List up all resources found in the remote device.
+            PlcBrowseRequest browseRequest = connection.browseRequestBuilder().addQuery("all", "*").build();
+            PlcBrowseResponse plcBrowseResponse = browseRequest.execute().get();
+            for (String queryName : plcBrowseResponse.getQueryNames()) {
+                List<PlcBrowseItem> values = plcBrowseResponse.getValues(queryName);
+                for (PlcBrowseItem value : values) {
+                    System.out.println(value.getName() + ": " + value.getTag().getAddressString());
+                }
+            }
         }
     }
 
diff --git a/plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTestSimocode.java b/plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTestSimocodePN.java
similarity index 70%
rename from plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTestSimocode.java
rename to plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTestSimocodePN.java
index 95072070d8..7b1c82b1bc 100644
--- a/plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTestSimocode.java
+++ b/plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTestSimocodePN.java
@@ -24,17 +24,28 @@ import org.apache.plc4x.java.api.PlcConnection;
 import org.apache.plc4x.java.api.messages.*;
 
 import java.time.Duration;
+import java.util.List;
 import java.util.concurrent.TimeUnit;
 
-public class ManualProfinetIoTestSimocode {
+public class ManualProfinetIoTestSimocodePN {
 
     public static void main(String[] args) throws Exception {
         // WireShark filter: "eth.addr == 88:3f:99:00:06:ef"
         try(PlcConnection connection =  new DefaultPlcDriverManager().getConnection("profinet:raw://192.168.24.31")) {
+            // List up all resources found in the remote device.
+            PlcBrowseRequest browseRequest = connection.browseRequestBuilder().addQuery("all", "*").build();
+            PlcBrowseResponse plcBrowseResponse = browseRequest.execute().get();
+            for (String queryName : plcBrowseResponse.getQueryNames()) {
+                List<PlcBrowseItem> values = plcBrowseResponse.getValues(queryName);
+                for (PlcBrowseItem value : values) {
+                    System.out.println(value.getName() + ": " + value.getTag().getAddressString());
+                }
+            }
+
             // Create and execute the subscription request.
             PlcSubscriptionRequest subscriptionRequest = connection.subscriptionRequestBuilder()
                 .addCyclicTagAddress("inputs", "1.1.INPUT.0:BYTE[10]", Duration.ofMillis(400))
-                .addCyclicTagAddress("output", "1.1.OUTPUT.0:DWORD", Duration.ofMillis(400))
+//                .addCyclicTagAddress("output", "1.1.OUTPUT.0:DWORD", Duration.ofMillis(400))
                 .build();
             PlcSubscriptionResponse subscriptionResponse = subscriptionRequest.execute().get(100000, TimeUnit.MILLISECONDS);
             System.out.println(subscriptionResponse);
diff --git a/plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTestWagoPNCoupler.java b/plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTestWagoPN.java
similarity index 61%
rename from plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTestWagoPNCoupler.java
rename to plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTestWagoPN.java
index aed2d41140..895f46843d 100644
--- a/plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTestWagoPNCoupler.java
+++ b/plc4j/drivers/profinet-ng/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTestWagoPN.java
@@ -21,24 +21,23 @@ package org.apache.plc4x.java.profinet;
 
 import org.apache.plc4x.java.DefaultPlcDriverManager;
 import org.apache.plc4x.java.api.PlcConnection;
-import org.apache.plc4x.java.api.messages.PlcSubscriptionRequest;
-import org.apache.plc4x.java.api.messages.PlcSubscriptionResponse;
+import org.apache.plc4x.java.api.messages.*;
 
-import java.time.Duration;
-import java.util.concurrent.TimeUnit;
+import java.util.List;
 
-public class ManualProfinetIoTestWagoPNCoupler {
+public class ManualProfinetIoTestWagoPN {
 
     public static void main(String[] args) throws Exception {
         // WireShark filter: "eth.addr == 00:30:de:61:37:79"
         try(PlcConnection connection =  new DefaultPlcDriverManager().getConnection("profinet:raw://00:30:de:61:37:79?ip-address=192.168.24.51")) {
-            // Create and execute the subscription request.
-            PlcSubscriptionRequest subscriptionRequest = connection.subscriptionRequestBuilder()
-                .addCyclicTagAddress("inputs", "1.1.INPUT.0:BYTE[10]", Duration.ofMillis(400))
-                .addCyclicTagAddress("output", "1.1.OUTPUT.0:DWORD", Duration.ofMillis(400))
-                .build();
-            PlcSubscriptionResponse subscriptionResponse = subscriptionRequest.execute().get(10000, TimeUnit.MILLISECONDS);
-            System.out.println(subscriptionResponse);
+            PlcBrowseRequest browseRequest = connection.browseRequestBuilder().addQuery("all", "*").build();
+            PlcBrowseResponse plcBrowseResponse = browseRequest.execute().get();
+            for (String queryName : plcBrowseResponse.getQueryNames()) {
+                List<PlcBrowseItem> values = plcBrowseResponse.getValues(queryName);
+                for (PlcBrowseItem value : values) {
+                    System.out.println(value.getName() + ": " + value.getTag().getAddressString());
+                }
+            }
         }
     }
 
diff --git a/plc4j/drivers/profinet-ng/src/test/resources/logback-test.xml b/plc4j/drivers/profinet-ng/src/test/resources/logback-test.xml
index d5ea1081e7..7465159b17 100644
--- a/plc4j/drivers/profinet-ng/src/test/resources/logback-test.xml
+++ b/plc4j/drivers/profinet-ng/src/test/resources/logback-test.xml
@@ -29,7 +29,7 @@
     </encoder>
   </appender>
 
-  <logger name="org.apache.plc4x.java.spi.Plc4xNettyWrapper" level="TRACE"/>
+  <logger name="org.apache.plc4x.java.spi.Plc4xNettyWrapper" level="WARN"/>
 
   <root level="info">
     <appender-ref ref="STDOUT" />
diff --git a/plc4j/drivers/profinet/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTest.java b/plc4j/drivers/profinet/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoAdamTest.java
similarity index 93%
copy from plc4j/drivers/profinet/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTest.java
copy to plc4j/drivers/profinet/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoAdamTest.java
index eac8db3f34..aa89d13262 100644
--- a/plc4j/drivers/profinet/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTest.java
+++ b/plc4j/drivers/profinet/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoAdamTest.java
@@ -29,21 +29,18 @@ import org.slf4j.LoggerFactory;
 
 import java.util.concurrent.TimeUnit;
 
-public class ManualProfinetIoTest {
+public class ManualProfinetIoAdamTest {
 
-    private static final Logger LOGGER = LoggerFactory.getLogger(ManualProfinetIoTest.class);
+    private static final Logger LOGGER = LoggerFactory.getLogger(ManualProfinetIoAdamTest.class);
 
     public static void main(String[] args) throws Exception {
         // eth.addr == 88:3f:99:03:ef:b0
 
-        // Zylk device name = simocodexbpn156e
-        // Chris device name = cdxb195b3
-
         // In this example 192.168.54.2 is the local IP of the computer running PLC4J and 192.168.54.23 is the IP of the PN device.
         //final PlcConnection connection = new DefaultPlcDriverManager().getConnection("profinet://192.168.54.2?gsddirectory=~/.gsd&devices=[[simocodexbpn156e,DAP%201,(1,),192.168.54.23]]&reductionratio=16&sendclockfactor=32&dataholdfactor=3&watchdogfactor=3");
         // REMARK: The driver would use the local network device with the given IP address and to an auto-discovery, trying to find any devices returned with the matching name.
         // If this device is then found and an IP address is provided, it would use PN-DCP to set the IP address of that device to the given value.
-        final PlcConnection connection = new DefaultPlcDriverManager().getConnection("profinet://192.168.54.220?gsddirectory=~/.gsd&devices=[[simocodexbpn156e,DAP%201,(1,)]]&reductionratio=128&sendclockfactor=128&dataholdfactor=3&watchdogfactor=3");
+        final PlcConnection connection = new DefaultPlcDriverManager().getConnection("profinet://192.168.54.220?gsddirectory=~/.gsd&devices=[[adam-6117pn,ID_DAP1,(1,)]]&reductionratio=64&sendclockfactor=64&dataholdfactor=3&watchdogfactor=3");
 
         PlcBrowseRequest browseRequest = connection.browseRequestBuilder().addQuery("all", "*").build();
         PlcBrowseResponse plcBrowseResponse = browseRequest.execute().get(4000, TimeUnit.MILLISECONDS);
diff --git a/plc4j/drivers/profinet/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTest.java b/plc4j/drivers/profinet/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoSimocodeTest.java
similarity index 98%
rename from plc4j/drivers/profinet/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTest.java
rename to plc4j/drivers/profinet/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoSimocodeTest.java
index eac8db3f34..e1ba5b5b47 100644
--- a/plc4j/drivers/profinet/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoTest.java
+++ b/plc4j/drivers/profinet/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetIoSimocodeTest.java
@@ -29,9 +29,9 @@ import org.slf4j.LoggerFactory;
 
 import java.util.concurrent.TimeUnit;
 
-public class ManualProfinetIoTest {
+public class ManualProfinetIoSimocodeTest {
 
-    private static final Logger LOGGER = LoggerFactory.getLogger(ManualProfinetIoTest.class);
+    private static final Logger LOGGER = LoggerFactory.getLogger(ManualProfinetIoSimocodeTest.class);
 
     public static void main(String[] args) throws Exception {
         // eth.addr == 88:3f:99:03:ef:b0
diff --git a/plc4j/drivers/profinet/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetPcapTest.java b/plc4j/drivers/profinet/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetPcapTest.java
index 684c11ffd0..596114b087 100644
--- a/plc4j/drivers/profinet/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetPcapTest.java
+++ b/plc4j/drivers/profinet/src/test/java/org/apache/plc4x/java/profinet/ManualProfinetPcapTest.java
@@ -30,20 +30,25 @@ import org.pcap4j.packet.Packet;
 import org.pcap4j.packet.UnknownPacket;
 
 import java.io.EOFException;
+import java.sql.Timestamp;
 import java.util.Arrays;
 import java.util.concurrent.TimeoutException;
 
 public class ManualProfinetPcapTest {
 
     public static void main(String[] args) throws Exception {
-        try (PcapHandle handle = Pcaps.openOffline("/Users/cdutz/Projects/Apache/PLC4X/profinet-slow.pcapng", PcapHandle.TimestampPrecision.NANO);){
-            int lastIncomingCycleTime = 0;
-            int lastOutgoingCycleTime = 0;
-            int minDelay = 65000;
-            int maxDelay = 0;
+        try (PcapHandle handle = Pcaps.openOffline("/Users/cdutz/Projects/Apache/PLC4X/profinet.pcapng", PcapHandle.TimestampPrecision.NANO);){
+            int lastIncomingCycleCounter = 0;
+            double averageIncomingCycleCounter = 0.0;
+            int numberIncomingPackets = 0;
+            Timestamp lastIncomingCycleTime = null;
+            int lastOutgoingCycleCounter = 0;
+            Timestamp lastOutgoingCycleTime = null;
             while (true) {
                 try {
                     Packet packet = handle.getNextPacketEx();
+                    Timestamp timestamp = handle.getTimestamp();
+
                     EthernetPacket.EthernetHeader packetHeader = (EthernetPacket.EthernetHeader) packet.getHeader();
                     boolean fromDevice = Arrays.equals(new byte[]{(byte) 0xF8, (byte) 0xE4, (byte) 0x3B, (byte) 0xB6, (byte) 0x9B, (byte) 0xBF}, packetHeader.getSrcAddr().getAddress());
 
@@ -56,8 +61,24 @@ public class ManualProfinetPcapTest {
                             PnDcp_Pdu pnDcpPdu = PnDcp_Pdu.staticParse(readBuffer);
                             if(pnDcpPdu instanceof PnDcp_Pdu_RealTimeCyclic) {
                                 PnDcp_Pdu_RealTimeCyclic pnDcpPdu1 = (PnDcp_Pdu_RealTimeCyclic) pnDcpPdu;
-                                lastIncomingCycleTime = pnDcpPdu1.getCycleCounter();
-                                //System.out.printf("--> %d\n", pnDcpPdu1.getCycleCounter());
+
+                                if(lastIncomingCycleCounter != 0) {
+                                    int lastCycles;
+                                    if(pnDcpPdu1.getCycleCounter() > lastIncomingCycleCounter) {
+                                        lastCycles = pnDcpPdu1.getCycleCounter() - lastIncomingCycleCounter;
+                                    } else {
+                                        lastCycles = (pnDcpPdu1.getCycleCounter() + 0xFFFF) - lastIncomingCycleCounter;
+                                    }
+                                    averageIncomingCycleCounter = (numberIncomingPackets * averageIncomingCycleCounter + lastCycles) / (numberIncomingPackets + 1);
+
+                                    if (lastIncomingCycleTime != null) {
+                                        System.out.printf("--> %3d %3d            %f\n", lastCycles, (timestamp.getNanos() - lastIncomingCycleTime.getNanos()) / 1000000, averageIncomingCycleCounter);
+                                    }
+                                }
+
+                                numberIncomingPackets++;
+                                lastIncomingCycleCounter = pnDcpPdu1.getCycleCounter();
+                                lastIncomingCycleTime = timestamp;
                             }
                         } else {
                             System.out.println("Other packet");
@@ -68,17 +89,20 @@ public class ManualProfinetPcapTest {
                         PnDcp_Pdu pnDcpPdu = PnDcp_Pdu.staticParse(readBuffer);
                         if(pnDcpPdu instanceof PnDcp_Pdu_RealTimeCyclic) {
                             PnDcp_Pdu_RealTimeCyclic pnDcpPdu1 = (PnDcp_Pdu_RealTimeCyclic) pnDcpPdu;
-                            int difference = (pnDcpPdu1.getCycleCounter() < lastIncomingCycleTime) ? lastIncomingCycleTime - pnDcpPdu1.getCycleCounter() : pnDcpPdu1.getCycleCounter() - lastIncomingCycleTime;
-                            if(difference < 60000 && difference > 100) {
-                                if (difference < minDelay) {
-                                    minDelay = difference;
+                            if(lastOutgoingCycleCounter != 0) {
+                                int lastCycles;
+                                if(pnDcpPdu1.getCycleCounter() > lastOutgoingCycleCounter) {
+                                    lastCycles = pnDcpPdu1.getCycleCounter() - lastOutgoingCycleCounter;
+                                } else {
+                                    lastCycles = (pnDcpPdu1.getCycleCounter() + 0xFFFF) - lastOutgoingCycleCounter;
                                 }
-                                if (difference > maxDelay) {
-                                    maxDelay = difference;
+
+                                if (lastOutgoingCycleTime != null) {
+                                    System.out.printf("<--          %3d %3d\n", lastCycles, (timestamp.getNanos() - lastOutgoingCycleTime.getNanos()) / 1000000);
                                 }
-                                System.out.printf("<-- %10d %10d   %10d-%10d\n", difference, pnDcpPdu1.getCycleCounter() - lastOutgoingCycleTime, minDelay, maxDelay);
                             }
-                            lastOutgoingCycleTime = pnDcpPdu1.getCycleCounter();
+                            lastOutgoingCycleCounter = pnDcpPdu1.getCycleCounter();
+                            lastOutgoingCycleTime = timestamp;
                         }
                     } else {
                         System.out.println("Other packet");