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

riemer pushed a commit to branch improve-docs-for-s7-and-modbus
in repository https://gitbox.apache.org/repos/asf/streampipes.git

commit 293e465859a47e86abb2f1dc3d228e4196f12ed6
Author: Dominik Riemer <[email protected]>
AuthorDate: Mon Sep 11 21:55:21 2023 +0200

    Add documentation for S7 and Modbus adapters
---
 .../documentation.md                               | 32 ++++++++++--
 .../documentation.md                               | 60 ++++++++++++++++++++--
 2 files changed, 86 insertions(+), 6 deletions(-)

diff --git 
a/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/resources/org.apache.streampipes.connect.iiot.adapters.plc4x.modbus/documentation.md
 
b/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/resources/org.apache.streampipes.connect.iiot.adapters.plc4x.modbus/documentation.md
index c3da505dd..c95b3ca0f 100644
--- 
a/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/resources/org.apache.streampipes.connect.iiot.adapters.plc4x.modbus/documentation.md
+++ 
b/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/resources/org.apache.streampipes.connect.iiot.adapters.plc4x.modbus/documentation.md
@@ -16,7 +16,7 @@
   ~
   -->
 
-## ISS Adapter
+## Modbus
 
 <p align="center"> 
     <img src="icon.png" width="150px;" class="pe-image-documentation"/>
@@ -26,8 +26,34 @@
 
 ## Description
 
-Shows the live position of the International Space Station (ISS), updated 
every two seconds.
-
+The Modbus adapter allows to connect to a PLC using the Modbus specification.
 
 ***
 
+## Configuration
+
+The following configuration options are available when creating the adapter:
+
+### PLC Address
+
+The IP address of the Modbus device without any prefix, which will be added 
automatically when creating the adapter.
+
+### PLC Port
+
+The PLC port refers to the port of the PLC, such as 502.
+
+### Node ID
+
+The Node ID refers to the ID of the specific device.
+
+### Nodes
+
+The `Nodes` section requires configuration options for the individual nodes.
+Nodes can be either imported from a comma-separated CSV file, or can be 
directly assigned in the configuration menu.
+
+The following fields must be provided for each node:
+
+* Runtime Name: Refers to the field to internally identify the node, e.g., in 
the data explorer or pipeline editor.
+* Node Address: Refers to the address of the Node in Modbus, e.g., 1
+* Object Type: Can be selected from the available options `DiscreteInput`, 
`Coil`, `InputRegister`,
+  or `HoldingRegister`. 
diff --git 
a/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/resources/org.apache.streampipes.connect.iiot.adapters.plc4x.s7/documentation.md
 
b/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/resources/org.apache.streampipes.connect.iiot.adapters.plc4x.s7/documentation.md
index c3da505dd..2210c22b7 100644
--- 
a/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/resources/org.apache.streampipes.connect.iiot.adapters.plc4x.s7/documentation.md
+++ 
b/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/resources/org.apache.streampipes.connect.iiot.adapters.plc4x.s7/documentation.md
@@ -16,7 +16,7 @@
   ~
   -->
 
-## ISS Adapter
+## Siemens S7
 
 <p align="center"> 
     <img src="icon.png" width="150px;" class="pe-image-documentation"/>
@@ -26,8 +26,62 @@
 
 ## Description
 
-Shows the live position of the International Space Station (ISS), updated 
every two seconds.
-
+The adapter allows to connect with a Siemens S7 PLC.
 
 ***
 
+## Configuration
+
+The following configuration options are available when creating an adapter:
+
+### PLC Address
+
+This field requires the PLC address in form of the IP without the prefixed 
protocol (e.g., 192.168.34.56).
+
+In addition to the pure IP, other parameters supported by Apache PLC4X can be 
provided as an URL parameter:
+
+* `local-rack`
+* `local-slot`
+* `local-tsap`
+* `remote-rack`
+* `remote-slot`
+
+Additional configs are separated by `&`.
+
+Example address: 
`192.68.34.56?remote-rack=0&remote-slot=3&controller-type=S7_400`
+
+See the <a href="https://plc4x.apache.org/users/protocols/s7.html";>Apache 
PLC4X documentation</a> for more information.
+
+### Polling Interval
+
+The polling interval requires a number in milliseconds, which represents the 
interval in which the adapter will poll the
+PLC for new data. For instance, a polling interval of 1000 milliseconds will 
configure the adapter to send a request to
+the PLC every second.
+
+### Nodes
+
+In the Nodes section, the PLC nodes that should be gathered are defined.
+There are two options to define the nodes:
+
+* Manual configuration: The address must be assigned manually by providing a 
runtime name, the node name and the
+  datatype. The `Runtime Name` will be the StreamPipes-internal name of the 
field, which will also show up in the data
+  explorer and pipeline editor. The `Node Name` refers to the node address of 
the PLC, e.g., `%Q0.4`. Finally, the data
+  type can be selected from the available selection. Currently available data 
types
+  are `Bool`, `Byte`, `Int`, `Word`, `Real`, `Char`, `String`, `Date`, `Time 
of Day` and `Date and Time`.
+* Instead of providing the node information manually, a CSV file can be 
uploaded. The CSV file can, for instance, be
+  exported from TIA and then be enriched with the appropriate runtime names. 
This is especially useful when many fields
+  should be added as nodes. Here is an example export enriched with the 
runtime name:
+
+```
+Runtime Name,Path,Data Type,Node Name,Comment,Hmi Visible,Hmi Accessible,Hmi 
Writeable,Typeobject ID,Version ID
+I_High_sensor,Tag table_1,Bool,%I0.0,,True,True,True,,
+I_Low_sensor,Tag table_1,Bool,%I0.1,,True,True,True,,
+I_Pallet_sensor,Tag table_1,Bool,%I0.2,,True,True,True,,
+I_Loaded,Tag table_1,Bool,%I0.3,,True,True,True,,
+```
+
+## Best Practices
+
+Instead of creating a large event containing all nodes that should be 
available in StreamPipes, consider to group the
+fields logically into smaller adapters.
+This will ease the definition of pipelines for users and eases future 
modifications.

Reply via email to