Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "BaSyx / Introductory Examples"

m
m
 
(34 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 +
= Setting up a digital production with Eclipse BaSyx =
 +
 +
The introductory examples provide a starting point for getting started with the Eclipse BaSyx Java SDK. The overall rationale of Eclipse BaSyx is to enable digital manufacturing processes. Digital manufacturing processes are fully digitized, i.e. they have digital representatives for assets, for the process itself, and for the products. Digital representatives cover all relevant aspects of their real-world counterpart. Eclipse BaSyx realizes these digital representatives with the Asset Administration Shell (AAS). The AAS is therefore a digital substitute for an entity that is relevant for a production process. The following examples introduce Eclipse BaSyx and illustrate the use of our middleware to create a digital representative of a manufacturing process.
 +
 
In the following, for each SDK there are introductory examples provided, showcasing the different concepts in the respective SDK.
 
In the following, for each SDK there are introductory examples provided, showcasing the different concepts in the respective SDK.
= Java =
 
The goal of the following examples is, to introduce core concepts and the respective infrastructure components of the Java SDK. These are:
 
# [[BaSyx_/_Documentation_/_VAB | Virtual Automation Bus]]
 
# [[ BaSyx_Control_Components | Control Components]]
 
# [[ BaSyx.HowTo.AAS | Asset Administration Shell]]
 
  
The examples require a succesful installation of the [[ BaSyx_/_Download_/_Java_Setup | SDK]] and the [[ BaSyx_/_Download_/_Components_Setup | components]].
+
== Hello World via Docker ==
 +
 +
'''[Disclaimer: development branch]''' To get a first impression of the look and feel of the BaSyx infrastructure, within the examples a docker compose file is provided. It lets you build a basic BaSys infrastructure, consisting of a registry server, an AAS server and an AAS Web GUI.
 +
Setting it up is as simple as
 +
# checkout  [https://github.com/eclipse-basyx/basyx-java-examples basyx-java-examples]
 +
#: <code>$ git clone https://github.com/eclipse-basyx/basyx-java-examples</code>
 +
# navigate to basyx-java-examples <!--TODO: Merge this step with the next step when removing the development branch disclaimer; Next step should be: navigate to basyx-java-examples/basyx.docker/simple-deployment-with-gui-->
 +
#: <code>$ cd basyx-java-examples</code>
 +
#* switch to development branch
 +
#: <code>git checkout development</code>
 +
# navigate to basyx.docker/simple-deployment-with-gui
 +
#: <code>$ cd basyx.docker/simple-deployment-with-gui</code>
 +
# run <code>$ docker compose up</code>
 +
#:
 +
This deploys
 +
* A registry server at http://localhost:4000/registry
 +
* An AAS server at http://localhost:4001/aasServer
 +
* An AAS Web GUI at http://localhost:3000/
 +
 
 +
To setup the AAS Web GUI with the registry, visit http://localhost:3000/ and paste the url http://localhost:4000/registry into the appropriate input field inside the main menu of the application.<br>
 +
More details can be found at[[ BaSyx_/_Introductory_Examples_/_Java_/_Step_5  | Introductory Examples/Java/Step 5]]
 +
 
 +
== Java ==
 +
The goal of the following examples is to introduce core concepts and the respective infrastructure components of the Eclipse BaSyx Java SDK in 8 steps. In these steps we will illustrate:
 +
* [[BaSyx_/_Documentation_/_VAB | Virtual Automation Bus]]
 +
* [[ BaSyx.HowTo.AAS | Asset Administration Shell]]
 +
* [[ BaSyx_Control_Components | Control Components]]
 +
 
 +
 
 +
The Virtual Automation Bus enables end-to-end connectivity. The Asset Administration Shell is the digital representative of a device. If the AAS only provides access to sensor data then it will be a digital shadow. If it also enables controlling of the real device, it is a digital twin. The control component can be implemented in a PLC controller, and provides a unified device interface.
 +
 
 +
'''Precondition:''' The example requires a successful installation of the [[ BaSyx_/_Download_/_Java_Setup | SDK]] and the [[ BaSyx_/_Download_/_Components_Setup | components]].
 +
 
 +
The following example illustrates Eclipse BaSyx by creating a digital twin for one device. The device is an oven that consists of a temperature sensor and of a heater. An application will display the current state of the oven and control its operation. The following links lead to a set of classes that we will be using for simulating the behavior of the oven and its devices to enable the self-contained execution of this example:
 +
 
 +
* [[ BaSyx_/_Introductory_Examples_/_Java_/_Example_Oven | Oven]]
 +
* [[ BaSyx_/_Introductory_Examples_/_Java_/_Example_Heater | Heater]]
 +
* [[ BaSyx_/_Introductory_Examples_/_Java_/_Example_Temperature | Temperature sensor]]
 +
 
 +
 
 +
'''Basic Example:''' There are currently 6 steps that illustrate the use of Eclipse BaSyx, each building upon the previous one. In the end, there will be a digitized oven with the ability to access its current state and to control its operation using Asset Administration Shells and Control Components.
 +
 
 +
* [[ BaSyx_/_Introductory_Examples_/_Java_/_Step_1  | Step 1]] - Creating the digital manufacturing concept
 +
* [[ BaSyx_/_Introductory_Examples_/_Java_/_Step_2 | Step 2]] - Setting up the Eclipse BaSyx infrastructure
 +
* [[ BaSyx_/_Introductory_Examples_/_Java_/_Step_3  | Step 3]] - Creating (and testing) the oven Submodel
 +
* [[ BaSyx_/_Introductory_Examples_/_Java_/_Step_4  | Step 4]] - Providing the Submodel in the network via HTTP
 +
* [[ BaSyx_/_Introductory_Examples_/_Java_/_Step_5  | Step 5]] - Assembling the oven Asset Administration Shell and deploying it on the AAS server
 +
* [[ BaSyx_/_Introductory_Examples_/_Java_/_Step_6  | Step 6]] - Creating an application to connect to the oven through its AAS
 +
* [[ BaSyx_/_Introductory_Examples_/_Java_/_Step_7  | Step 7]] - Eventing via MQTT
 +
* [[ BaSyx_/_Introductory_Examples_/_Java_/_Step_8  | Step 8]] - Protect the Server from unauthorized access
  
There are currently 5 examples, each building upon the previous one. In the end, there will be a control and data access of an oven using Asset Administration Shells and Control Components.
+
''' Additional steps:''' The following steps illustrate additional activities and capabilities of the Eclipse BaSyx Java SDK in context of the oven example.  
  
* [[ BaSyx_/_Introductory_Examples_/_Java_/_Example_1 | Example 1]] - Creating the oven model and using it with the VAB
+
* [[ BaSyx_/_Introductory_Examples_/_Java_/_Example_1 | Step 1]] - Creating and accessing an oven model with local VAB access
* [[ BaSyx_/_Introductory_Examples_/_Java_/_Example_2 | Example 2]] - Providing the model via HTTP/REST and using the Registry
+
* [[ BaSyx_/_Introductory_Examples_/_Java_/_Example_2 | Step 2]] - Providing the model via HTTP/REST and accessing the model remotely
** [[ BaSyx_/_Introductory_Examples_/_Java_/_Example_2a | Example 2a]] - Providing the model via [[ BaSyx_/_Documentation_/_VAB_/_TCP_Mapping | BaSyxTCP ]]
+
** [[ BaSyx_/_Introductory_Examples_/_Java_/_Example_2a | Step 2a]] - Providing the model via [[ BaSyx_/_Documentation_/_VAB_/_TCP_Mapping | BaSyxTCP ]]
** [[ BaSyx_/_Introductory_Examples_/_Java_/_Example_2b | Example 2b]] - Providing the model via [[ BaSyx_/_Documentation_/_VAB_/_TCP_Mapping | BaSyxTCP]] and connecting via a [[ BaSyx.Gateway.Overview | gateway]]
+
** [[ BaSyx_/_Introductory_Examples_/_Java_/_Example_2b | Step 2b]] - Providing the model via [[ BaSyx_/_Documentation_/_VAB_/_TCP_Mapping | BaSyxTCP]] and connecting via a [[ BaSyx.Gateway.Overview | gateway]]
* [[ BaSyx_/_Introductory_Examples_/_Java_/_Example_3 | Example 3]] - Using a Control Component for unified service interfacing
+
* [[ BaSyx_/_Introductory_Examples_/_Java_/_Example_3 | Step 3]] - Using a Control Component for unified service interfacing
* [[ BaSyx_/_Introductory_Examples_/_Java_/_Example_4 | Example 4]] - Creating the AAS, registering it and exploring the HTTP-REST interface  
+
* [[ BaSyx_/_Introductory_Examples_/_Java_/_Example_4 | Step 4]] - Creating the AAS, registering it and exploring the HTTP-REST interface  
* [[ BaSyx_/_Introductory_Examples_/_Java_/_Example_5 | Example 5]] - Accessing the remote AAS through the SDK
+
* [[ BaSyx_/_Introductory_Examples_/_Java_/_Example_5 | Step 5]] - Accessing the remote AAS through the SDK
 +
* [[ BaSyx_/_Introductory_Examples_/_Java_/_Example_6 | Step 6]] - Using the Off-the-Shelf-Components

Latest revision as of 09:54, 9 October 2023

Setting up a digital production with Eclipse BaSyx

The introductory examples provide a starting point for getting started with the Eclipse BaSyx Java SDK. The overall rationale of Eclipse BaSyx is to enable digital manufacturing processes. Digital manufacturing processes are fully digitized, i.e. they have digital representatives for assets, for the process itself, and for the products. Digital representatives cover all relevant aspects of their real-world counterpart. Eclipse BaSyx realizes these digital representatives with the Asset Administration Shell (AAS). The AAS is therefore a digital substitute for an entity that is relevant for a production process. The following examples introduce Eclipse BaSyx and illustrate the use of our middleware to create a digital representative of a manufacturing process.

In the following, for each SDK there are introductory examples provided, showcasing the different concepts in the respective SDK.

Hello World via Docker

[Disclaimer: development branch] To get a first impression of the look and feel of the BaSyx infrastructure, within the examples a docker compose file is provided. It lets you build a basic BaSys infrastructure, consisting of a registry server, an AAS server and an AAS Web GUI. Setting it up is as simple as

  1. checkout basyx-java-examples
    $ git clone https://github.com/eclipse-basyx/basyx-java-examples
  2. navigate to basyx-java-examples
    $ cd basyx-java-examples
    • switch to development branch
    git checkout development
  3. navigate to basyx.docker/simple-deployment-with-gui
    $ cd basyx.docker/simple-deployment-with-gui
  4. run $ docker compose up

This deploys

To setup the AAS Web GUI with the registry, visit http://localhost:3000/ and paste the url http://localhost:4000/registry into the appropriate input field inside the main menu of the application.
More details can be found at Introductory Examples/Java/Step 5

Java

The goal of the following examples is to introduce core concepts and the respective infrastructure components of the Eclipse BaSyx Java SDK in 8 steps. In these steps we will illustrate:


The Virtual Automation Bus enables end-to-end connectivity. The Asset Administration Shell is the digital representative of a device. If the AAS only provides access to sensor data then it will be a digital shadow. If it also enables controlling of the real device, it is a digital twin. The control component can be implemented in a PLC controller, and provides a unified device interface.

Precondition: The example requires a successful installation of the SDK and the components.

The following example illustrates Eclipse BaSyx by creating a digital twin for one device. The device is an oven that consists of a temperature sensor and of a heater. An application will display the current state of the oven and control its operation. The following links lead to a set of classes that we will be using for simulating the behavior of the oven and its devices to enable the self-contained execution of this example:


Basic Example: There are currently 6 steps that illustrate the use of Eclipse BaSyx, each building upon the previous one. In the end, there will be a digitized oven with the ability to access its current state and to control its operation using Asset Administration Shells and Control Components.

  • Step 1 - Creating the digital manufacturing concept
  • Step 2 - Setting up the Eclipse BaSyx infrastructure
  • Step 3 - Creating (and testing) the oven Submodel
  • Step 4 - Providing the Submodel in the network via HTTP
  • Step 5 - Assembling the oven Asset Administration Shell and deploying it on the AAS server
  • Step 6 - Creating an application to connect to the oven through its AAS
  • Step 7 - Eventing via MQTT
  • Step 8 - Protect the Server from unauthorized access

Additional steps: The following steps illustrate additional activities and capabilities of the Eclipse BaSyx Java SDK in context of the oven example.

  • Step 1 - Creating and accessing an oven model with local VAB access
  • Step 2 - Providing the model via HTTP/REST and accessing the model remotely
  • Step 3 - Using a Control Component for unified service interfacing
  • Step 4 - Creating the AAS, registering it and exploring the HTTP-REST interface
  • Step 5 - Accessing the remote AAS through the SDK
  • Step 6 - Using the Off-the-Shelf-Components

Back to the top