diff --git a/.gitignore b/.gitignore index 7492bb7..8c20bef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ **/.apax -**/node_modules \ No newline at end of file +**/node_modules +/.vs diff --git a/00_introduction/slides/slides.md b/00_introduction/slides/slides.md index ac4f6cf..fc275c5 100644 --- a/00_introduction/slides/slides.md +++ b/00_introduction/slides/slides.md @@ -31,7 +31,7 @@ Regardless if you are coming from TIA Portal or are starting new in the SIMATIC | 06 | Unit Testing | | 07 | Tools for commissioning | | 08 | Package management | -| 09 | Versioning and Continuous Integration | +| 09 | Hardware Configuration | --- diff --git a/01_introduction_to_ax_code/slides/slides.md b/01_introduction_to_ax_code/slides/slides.md index 33f271c..4acda08 100644 --- a/01_introduction_to_ax_code/slides/slides.md +++ b/01_introduction_to_ax_code/slides/slides.md @@ -19,7 +19,7 @@ mouseWheel: true, | 06 | Unit Testing | | 07 | Tools for commissioning | | 08 | Package management | -| 09 | Versioning and Continuous Integration | +| 09 | Hardware Configuration | --- diff --git a/02_first_ax_project/slides/slides.md b/02_first_ax_project/slides/slides.md index e7b85bb..a7617c9 100644 --- a/02_first_ax_project/slides/slides.md +++ b/02_first_ax_project/slides/slides.md @@ -19,7 +19,7 @@ mouseWheel: true, | 06 | Unit Testing | | 07 | Tools for commissioning | | 08 | Package management | -| 09 | Versioning and Continuous Integration | +| 09 | Hardware Configuration | ---
diff --git a/03_loading_and_debugging/slides/slides.md b/03_loading_and_debugging/slides/slides.md index 9ec5b3d..fc76503 100644 --- a/03_loading_and_debugging/slides/slides.md +++ b/03_loading_and_debugging/slides/slides.md @@ -19,7 +19,7 @@ mouseWheel: true, | 06 | Unit Testing | | 07 | Tools for commissioning | | 08 | Package management | -| 09 | Versioning and Continuous Integration | +| 09 | Hardware Configuration | --- diff --git a/04_introduction_to_st/apax.yml b/04_introduction_to_st/apax.yml index 6096cb3..27ec710 100644 --- a/04_introduction_to_st/apax.yml +++ b/04_introduction_to_st/apax.yml @@ -7,6 +7,6 @@ variables: APAX_BUILD_ARGS: - "--debug" # Generate debug information for target "1500" devDependencies: - "@ax/sdk": 2311.0.1 + "@ax/sdk": ^2405.0.0 scripts: present: reveal-md ./slides/slides.md --theme ./slides/theme/simatic-ax.css --watch diff --git a/04_introduction_to_st/exercises/1_implement_valve/apax.yml b/04_introduction_to_st/exercises/1_implement_valve/apax.yml index 41e5015..9678ac4 100644 --- a/04_introduction_to_st/exercises/1_implement_valve/apax.yml +++ b/04_introduction_to_st/exercises/1_implement_valve/apax.yml @@ -7,4 +7,4 @@ variables: APAX_BUILD_ARGS: - "--debug" # Generate debug information for target "1500" devDependencies: - "@ax/sdk": 2311.0.1 + "@ax/sdk": ^2405.0.0 diff --git a/04_introduction_to_st/exercises/2_implement_tank/apax.yml b/04_introduction_to_st/exercises/2_implement_tank/apax.yml index de28478..bcd2d57 100644 --- a/04_introduction_to_st/exercises/2_implement_tank/apax.yml +++ b/04_introduction_to_st/exercises/2_implement_tank/apax.yml @@ -7,4 +7,4 @@ variables: APAX_BUILD_ARGS: - "--debug" # Generate debug information for target "1500" devDependencies: - "@ax/sdk": 2311.0.1 \ No newline at end of file + "@ax/sdk": ^2405.0.0 \ No newline at end of file diff --git a/04_introduction_to_st/slides/slides.md b/04_introduction_to_st/slides/slides.md index 13e9da8..63b785a 100644 --- a/04_introduction_to_st/slides/slides.md +++ b/04_introduction_to_st/slides/slides.md @@ -21,7 +21,7 @@ mouseWheel: true, | 06 | Unit Testing | | 07 | Tools for commissioning | | 08 | Package management | -| 09 | Versioning and Continuous Integration | +| 09 | Hardware Configuration | --- diff --git a/05_oop_in_st/slides/slides.md b/05_oop_in_st/slides/slides.md index 926c236..8c3103a 100644 --- a/05_oop_in_st/slides/slides.md +++ b/05_oop_in_st/slides/slides.md @@ -23,6 +23,7 @@ mermaid: | 06 | Unit Testing | | 07 | Tools for commissioning | | 08 | Package management | +| 09 | Hardware Configuration | --- diff --git a/06_unit_testing/slides/slides.md b/06_unit_testing/slides/slides.md index 8e37328..eef4ee7 100644 --- a/06_unit_testing/slides/slides.md +++ b/06_unit_testing/slides/slides.md @@ -21,6 +21,7 @@ mouseWheel: true, | **06** | **Unit Testing** | | 07 | Tools for commissioning | | 08 | Package management | +| 09 | Hardware Configuration | --- diff --git a/07_tools_for_commissioning/slides/slides.md b/07_tools_for_commissioning/slides/slides.md index 545b7e4..e40625d 100644 --- a/07_tools_for_commissioning/slides/slides.md +++ b/07_tools_for_commissioning/slides/slides.md @@ -19,6 +19,7 @@ mouseWheel: true, | 06 | Unit Testing | | **07** | **Tools for commissioning** | | 08 | Package management | +| 09 | Hardware Configuration | --- diff --git a/08_package_management/slides/slides.md b/08_package_management/slides/slides.md index c446d9d..b03e3d7 100644 --- a/08_package_management/slides/slides.md +++ b/08_package_management/slides/slides.md @@ -21,6 +21,7 @@ mouseWheel: true, | 06 | Unit Testing | | 07 | Tools for commissioning | | **08** | **Package management** | +| 09 | Hardware Configuration | --- diff --git a/09_hardware_configuration/apax.yml b/09_hardware_configuration/apax.yml new file mode 100644 index 0000000..0c5093b --- /dev/null +++ b/09_hardware_configuration/apax.yml @@ -0,0 +1,9 @@ +name: 99_template + +version: 0.0.0 +type: generic + +scripts: + present: reveal-md ./slides/slides.md --theme ./slides/theme/simatic-ax.css --watch +dependencies: + "@ax/sdk": 2405.0.0 diff --git a/09_hardware_configuration/exercises/0_create_template/README.md b/09_hardware_configuration/exercises/0_create_template/README.md new file mode 100644 index 0000000..90ae495 --- /dev/null +++ b/09_hardware_configuration/exercises/0_create_template/README.md @@ -0,0 +1 @@ +What to do? \ No newline at end of file diff --git a/09_hardware_configuration/exercises/0_create_template/apax.yml b/09_hardware_configuration/exercises/0_create_template/apax.yml new file mode 100644 index 0000000..e69de29 diff --git a/09_hardware_configuration/exercises/1_template_from_GSDML/README.md b/09_hardware_configuration/exercises/1_template_from_GSDML/README.md new file mode 100644 index 0000000..90ae495 --- /dev/null +++ b/09_hardware_configuration/exercises/1_template_from_GSDML/README.md @@ -0,0 +1 @@ +What to do? \ No newline at end of file diff --git a/09_hardware_configuration/exercises/1_template_from_GSDML/apax.yml b/09_hardware_configuration/exercises/1_template_from_GSDML/apax.yml new file mode 100644 index 0000000..e69de29 diff --git a/09_hardware_configuration/exercises/2_user_managment/README.md b/09_hardware_configuration/exercises/2_user_managment/README.md new file mode 100644 index 0000000..90ae495 --- /dev/null +++ b/09_hardware_configuration/exercises/2_user_managment/README.md @@ -0,0 +1 @@ +What to do? \ No newline at end of file diff --git a/09_hardware_configuration/exercises/2_user_managment/apax.yml b/09_hardware_configuration/exercises/2_user_managment/apax.yml new file mode 100644 index 0000000..e69de29 diff --git a/09_hardware_configuration/slides/img/AccessProtection.png b/09_hardware_configuration/slides/img/AccessProtection.png new file mode 100644 index 0000000..44e4eea Binary files /dev/null and b/09_hardware_configuration/slides/img/AccessProtection.png differ diff --git a/09_hardware_configuration/slides/img/create-hardware-file.png b/09_hardware_configuration/slides/img/create-hardware-file.png new file mode 100644 index 0000000..3dbf146 Binary files /dev/null and b/09_hardware_configuration/slides/img/create-hardware-file.png differ diff --git a/09_hardware_configuration/slides/img/hwl-json-file.png b/09_hardware_configuration/slides/img/hwl-json-file.png new file mode 100644 index 0000000..47840ed Binary files /dev/null and b/09_hardware_configuration/slides/img/hwl-json-file.png differ diff --git a/09_hardware_configuration/slides/img/securityPrinciples.png b/09_hardware_configuration/slides/img/securityPrinciples.png new file mode 100644 index 0000000..5500077 Binary files /dev/null and b/09_hardware_configuration/slides/img/securityPrinciples.png differ diff --git a/09_hardware_configuration/slides/slides.md b/09_hardware_configuration/slides/slides.md new file mode 100644 index 0000000..b50c563 --- /dev/null +++ b/09_hardware_configuration/slides/slides.md @@ -0,0 +1,299 @@ + +Agenda + +| ID | Topic | +| -- | ----- | +| 00 | Introduction to the workshop | +| 01 | Introduction to AX Code IDE | +| 02 | Get started with your first AX Project | +| 03 | Introduction to ST Programming | +| 04 | Loading and Debugging | +| 05 | OOP Elements of ST | +| 06 | Unit Testing | +| 07 | Tools for commissioning | +| 08 | Package management | +| **09** | **Hardware Configuration** | + +--- + +
+

Prerequisites

+
+ +
+
+

To get started, you need to have SIMATIC AX, apax and all its prerequisites installed.

+

In addition you should know the basics on how to use AX Code as well as have a starting project and know the basics of hardware configuration.

+
+

With this you are set up to continue with this learning path.

+
+
+--- + +
+

+ What will you learn in this chapter +

+
+ +
+
+

After you completed this training section you will

+
    +
  • know how to create and hardware configuration
  • +
  • using templates in hardware context
  • +
  • know how to do GSDML handling
  • +
  • able to administrate Users over User Managment
  • +
+
+
+
+ +--- + +
+

IT Like Hardware Engineer

+

The description of the configuration

+
+ +
+
+

+ In order to be able to create hardware for a plc, the first step we need to take is how the hardware configuration is described in a textual declaration for a IT like context.

+
+

The format in which the hardware configuration is created is Json. Json has the following advantages as a format: +

    +
  • text based
  • +
  • readable by humans
  • +
  • can be easily edited with a text editor
  • +
+

+
+

The devices and dependent modules, including all properties, can be easily defined and set.

+
+ +
+ +
+
    +
  1. Definition of JSON:
    ECMA-404
  2. +
+
+ +--- + +
+

IT Like Hardware Engineer

+

Create a hardware configuration

+
+ +
+
+

+ To create your own hardware configuration, you just have to create a file with the ending ".hwl.sjon" or you can simply use the template that is provided via the hardware laguage server. +

+
+

There are a few points here that need to be taken into account: +

    +
  • The entry point is always the device
  • +
  • The name of the device will be used later for identification. If it is changed, some things have to be initialized again.
  • +
  • A piece of hardware can consist of several files
  • +
+

+
+
+ +
+ +
+
    +
  1. Definition of:
    The SIMATIC AX Hardware Declaration Language
  2. +
+
+ +--- + +
+

IT Like Hardware Engineer

+

Security by default

+
+ +
+
+

+ In order to be able to create hardware for a plc, the first step we need to take is how the hardware configuration is described in a textual declaration for a IT like context.

+
+

Security consists of two aspects: Authentication and Authorization: +

    +
  • Authentication ensures that you are communicating with the expected PLC
  • +
  • Authorization ensures operations are only performed by users permitted to do so.
  • +
+

+
+

The devices and dependent modules, including all properties, can be easily defined and set.

+
+ +
+ +
+
    +
  1. Informations about:
    Security
  2. +
+
+ +---- + +
+

Set Up PLC Security Configuration

+
+ +
+
+

+ In order to be able to create hardware for a plc, the first step we need to take is how the hardware configuration is described in a textual declaration for a IT like context.

+
+

Security consists of two aspects: Authentication and Authorization: +

    +
  • Authentication ensures that you are communicating with the expected PLC
  • +
  • Authorization ensures operations are only performed by users permitted to do so.
  • +
+

+
+

The devices and dependent modules, including all properties, can be easily defined and set.

+
+ +
+ +
+
    +
  1. Informations about:
    PLC Configuration Data Protection
  2. +
+
+ +---- + +
+

Set Up PLC Access Protection

+
+ +
+
+

+ In order to be able to create hardware for a plc, the first step we need to take is how the hardware configuration is described in a textual declaration for a IT like context.

+
+

Security consists of two aspects: Authentication and Authorization: +

    +
  • Authentication ensures that you are communicating with the expected PLC
  • +
  • Authorization ensures operations are only performed by users permitted to do so.
  • +
+

+
+

The devices and dependent modules, including all properties, can be easily defined and set.

+
+ +
+ +
+
    +
  1. Informations about:
    PLC Access Protection
  2. +
+
+ +--- + +
+

IT Like Hardware Engineer

+

Using of Templates

+
+ +
+
+

+ In order to be able to create hardware for a plc, the first step we need to take is how the hardware configuration is described in a textual declaration for a IT like context.

+
+

The format in which the hardware configuration is created is Json. Json has the following advantages as a format: +

    +
  • text based
  • +
  • readable by humans
  • +
  • can be easily edited with a text editor
  • +
+

+
+

The devices and dependent modules, including all properties, can be easily defined and set.

+
+ +
+ +
+
    +
  1. More informations about:
    Templates
  2. +
+
+ +--- + +
+

IT Like Hardware Engineer

+

Integration of GSDMLs

+
+ +
+
+

+ In order to be able to create hardware for a plc, the first step we need to take is how the hardware configuration is described in a textual declaration for a IT like context.

+
+

The format in which the hardware configuration is created is Json. Json has the following advantages as a format: +

    +
  • text based
  • +
  • readable by humans
  • +
  • can be easily edited with a text editor
  • +
+

+
+

The devices and dependent modules, including all properties, can be easily defined and set.

+
+ +
+ +
+
    +
  1. More informations about:
    GSDMLs in AX
  2. +
+
+ +--- + + +
+

IT Like Hardware Engineer

+

User Managment

+
+ +
+
+

+ In order to be able to create hardware for a plc, the first step we need to take is how the hardware configuration is described in a textual declaration for a IT like context.

+
+

The format in which the hardware configuration is created is Json. Json has the following advantages as a format: +

    +
  • text based
  • +
  • readable by humans
  • +
  • can be easily edited with a text editor
  • +
+

+
+

The devices and dependent modules, including all properties, can be easily defined and set.

+
+ +
+ +
+
    +
  1. More informations about:
    User Management Access Control (UMAC)
  2. +
+
+ + +--- + +What did you learn \ No newline at end of file diff --git a/09_hardware_configuration/slides/theme/.DS_Store b/09_hardware_configuration/slides/theme/.DS_Store new file mode 100644 index 0000000..511d5cc Binary files /dev/null and b/09_hardware_configuration/slides/theme/.DS_Store differ diff --git a/09_hardware_configuration/slides/theme/siemens.svg b/09_hardware_configuration/slides/theme/siemens.svg new file mode 100644 index 0000000..765e8d4 --- /dev/null +++ b/09_hardware_configuration/slides/theme/siemens.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + diff --git a/09_hardware_configuration/slides/theme/simatic-ax.css b/09_hardware_configuration/slides/theme/simatic-ax.css new file mode 100644 index 0000000..f2f9392 --- /dev/null +++ b/09_hardware_configuration/slides/theme/simatic-ax.css @@ -0,0 +1,293 @@ +/*! modern-normalize v2.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */ + +/* +Document +======== +*/ + +/** +Use a better box model (opinionated). +*/ + +*, +::before, +::after { + box-sizing: border-box; +} + +html { + /* Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3) */ + font-family: + system-ui, + 'Segoe UI', + Roboto, + Helvetica, + Arial, + sans-serif, + 'Apple Color Emoji', + 'Segoe UI Emoji'; + line-height: 1.15; /* 1. Correct the line height in all browsers. */ + -webkit-text-size-adjust: 100%; /* 2. Prevent adjustments of font size after orientation changes in iOS. */ + -moz-tab-size: 4; /* 3. Use a more readable tab size (opinionated). */ + tab-size: 4; /* 3 */ +} + +/* +Sections +======== +*/ + +body { + margin: 0; /* Remove the margin in all browsers. */ +} +body { + background: rgb(0,0,40); + background-color: rgb(0,0,40); + /* Siemens Stone light 35%. White background makes index page unreadable (white links). */ +} + +/* ugly trick to use white background for normal slides */ +.js body { + background: rgb(0,0,40); + background-color: rgb(0,0,40); +} + +section.has-dark-background, +section.has-dark-background h1, +section.has-dark-background h2, +section.has-dark-background h3, +section.has-dark-background h4, +section.has-dark-background h5, +section.has-dark-background h6 { + color: #fff; +} + +section { + display: flex!important; + flex-direction: column; + align-items: left; + text-align: left; + height: 100%; + margin: 1em 1em; + overflow: hidden; +} + +section.centered { + display: flex!important; + flex-direction: column; + align-items: center; + justify-content: center; + text-align: center; +} + +h1, h2, h3, h4, h5, p, td, li { + text-shadow: transparent 0px 0px; + font-family: "Siemens Sans Global", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; + font-weight: 700; + line-height: 0.9; +} + +p, td, li { + font-weight: 500; +} + +h1 { + font-size: 5em; + letter-spacing: -0.05em; + background: linear-gradient(90deg, rgb(0, 190, 220), rgb(0, 215, 160)); + -webkit-background-clip: text; /* clip the background to the text inside the tag*/ + background-clip: text; + -webkit-text-fill-color: transparent; /* make the text transparent so the background shows through*/ + padding: 0 0 0.25em 0; + margin: 0 0 0.25em 0; +} + +h2 { + font-size: 3em; + letter-spacing: -0.05em; + background: linear-gradient(90deg, rgb(0, 190, 220), rgb(0, 215, 160)); + -webkit-background-clip: text; /* clip the background to the text inside the tag*/ + background-clip: text; + -webkit-text-fill-color: transparent; /* make the text transparent so the background shows through*/ + padding: 0 0 0.25em 0; + margin: 0 0 0.25em 0; +} + +h3 { + font-size: 2em; + margin: -0.5em 0 0.25em 0; +} + +h4 { + font-size: 1.25em; + font-weight: 900; +} + +p, li { + line-height: 1.75rem; + font-size: 1.2rem; +} + +table { + +} + +th, tr { + line-height: 4rem; + padding: 0.75rem 0rem; +} +td { + padding: 0.5rem 0.05rem; + font-size: 1.25rem; + text-align: left; +} + +.slide_header{ + margin-bottom: 3rem; +} + +.flex-row { + display: flex; + flex-direction: row; +} + + +.flex-col { + display: flex; + flex-direction: column; +} + +.items-stretch{ + align-items: stretch; +} + +.items-center { + align-items: center; +} + +.justify-center { + justify-content: center; +} + +.justify-start { + justify-content: start; +} + +.grid-two-col-eq { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + grid-column-gap: 4rem; +} + +br { + margin: 2rem; +} + +ul { + margin-top: 0.75rem; + margin-left: 2rem; +} + +li { + margin: 0.25rem 0; +} + +/* +Grouping content +================ +*/ + +/** +1. Add the correct height in Firefox. +2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) +*/ + +hr { + height: 0; /* 1 */ + color: inherit; /* 2 */ +} + +/* +Text-level semantics +==================== +*/ + +/** +Add the correct text decoration in Chrome, Edge, and Safari. +*/ + +abbr[title] { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; +} + +/** +Add the correct font weight in Edge and Safari. +*/ + +b, +strong { + font-weight: bolder; +} + +/** +1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3) +2. Correct the odd 'em' font sizing in all browsers. +*/ + +code, +kbd, +samp, +pre { + font-family: + ui-monospace, + SFMono-Regular, + Consolas, + 'Liberation Mono', + Menlo, + monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** +Add the correct font size in all browsers. +*/ + +small { + font-size: 80%; +} + +/** +Prevent 'sub' and 'sup' elements from affecting the line height in all browsers. +*/ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* +Tabular data +============ +*/ + +/** +1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) +2. Correct table border color inheritance in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) +*/ + +table { + text-indent: 0; /* 1 */ + border-color: inherit; /* 2 */ +}