Skip to content

Commit

Permalink
Merge pull request #2 from simatic-ax/chore/update_sdk_to_version_2405
Browse files Browse the repository at this point in the history
Chore/update sdk to version 2405
  • Loading branch information
BeckerStS authored Jun 20, 2024
2 parents 65e0f78 + a3c076a commit a3fcac2
Show file tree
Hide file tree
Showing 15 changed files with 251 additions and 27 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `.gitattributes` reclassify `.st` files as iec-st:
** linguist-vendored
# *.ppjs linguist-language=ST
4 changes: 4 additions & 0 deletions .github/workflows/lint-repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
on: push
jobs:
lint-repo-and-markdown:
uses: simatic-ax/actions/.github/workflows/check-repository.yml@stable
16 changes: 16 additions & 0 deletions .github/workflows/release-applicationexample.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
on:
push:
# Pattern matched against refs/tags
tags:
- "*"

jobs:
release-apax-lib:
uses: simatic-ax/actions/.github/workflows/apax-publish-applicationexample.yml@stable
secrets:
APAX_TOKEN: ${{ secrets.APAX_TOKEN }}
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}

with:
VERSION: ${{ github.ref_name }}
PROJECT_NAME: ae-hw-engineering
11 changes: 11 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# markdownlint YAML configuration
---

# Default state for all rules
default: true

# ignored rules
line-length: false
no-inline-html: false
first-line-h1: false
no-emphasis-as-header: false
4 changes: 4 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These owners will be the default owners for everything in the repo.
# Unless a later match takes precedence, the listed user will be
# requested for review when someone opens a pull request.
* @ingoeichner @ReinerSchinkoethe
5 changes: 3 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Application Example Hardware Engineering Demo
# Application Example Hardware Engineering

## Description
This repo contains an example project to demonstrate how to IT-like hardware configuration with SIMATIX AX.

This repository contains an example project to demonstrate how to IT-like hardware configuration with SIMATIX AX.

## Contribution

Expand Down
13 changes: 13 additions & 0 deletions apax-files-section.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# this files section will be used for the github workflow
# the apax.yml will be created dynamically in the workflow - also the files section
# here you can define the content

files:
- template
- '!**/.git'
- '!**/.vscode'
- '!**/.github'
- '!**/.gitattributes'
- '!**/.markdownlint.yml'
- '!template/CODEOWNERS'
- '!template/apax-files-section.yml'
26 changes: 13 additions & 13 deletions apax-lock.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"name": "ae-hw-engineering-demo",
"version": "0.0.0",
"name": "ae-hw-engineering",
"version": "1.0.0",
"lockFileVersion": "2",
"installStrategy": "strict",
"root": {
"name": "ae-hw-engineering-demo",
"version": "0.0.0",
"name": "ae-hw-engineering",
"version": "1.0.0",
"devDependencies": {
"@ax/sdk": "^2405.0.0-rc.9",
"@ax/opcua-server-config": "^1.0.0"
"@ax/sdk": "2405.0.0",
"@ax/opcua-server-config": "1.0.0"
}
},
"packages": {
"@ax/sdk": {
"name": "@ax/sdk",
"version": "2405.0.0-rc.9",
"integrity": "sha512-wZ3vay/SzX0YXk4H0Xpgg5oKPK95dQrz5KXjhdhu8BpPpyPcKwFnbAdFF/o+JSbSuWkW/YG/pWHEtBpNuCrleA==",
"resolved": "https://registry.simatic-ax.siemens.io/@ax/sdk/-/sdk-2405.0.0-rc.9.tgz",
"version": "2405.0.0",
"integrity": "sha512-Gm+Et1l37wDwHr4tpa0TqB71TwudQaXJpR53NI7PGh+uEljyu1xzArZorj0NUiMSi/GMj2xi//JWsfS8iWDkbg==",
"resolved": "https://registry.simatic-ax.siemens.io/@ax/sdk/-/sdk-2405.0.0.tgz",
"dependencies": {
"@ax/apax-build": "1.0.0",
"@ax/axunitst": "5.0.74",
Expand All @@ -31,7 +31,7 @@
"@ax/plc-info": "2.4.0",
"@ax/sdb": "1.2.2",
"@ax/simatic-pragma-stc-plugin": "4.0.18",
"@ax/sld": "2.5.6",
"@ax/sld": "2.5.7",
"@ax/st-ls": "7.0.52",
"@ax/stc": "7.0.52",
"@ax/target-llvm": "7.0.52",
Expand Down Expand Up @@ -177,9 +177,9 @@
},
"@ax/sld": {
"name": "@ax/sld",
"version": "2.5.6",
"integrity": "sha512-o/yd/POIqXB8Ov0CUYddrDVzLnOH7iPrld+OE/hn/oI9r8S8EKqfK6dgImMsjvBx9MZKOxoT5K2k7lhXu8pzpA==",
"resolved": "https://registry.simatic-ax.siemens.io/@ax/sld/-/sld-2.5.6.tgz",
"version": "2.5.7",
"integrity": "sha512-LSa6MtCF/l1J/S5c8NsaQTE84X+nAHoLjdqwRRLX97zHs3GVuan6sfC+VhyniiXrI201Bvwky4po18pT7IeY2Q==",
"resolved": "https://registry.simatic-ax.siemens.io/@ax/sld/-/sld-2.5.7.tgz",
"cpu": [
"x64"
],
Expand Down
28 changes: 19 additions & 9 deletions apax.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
name: "ae-hw-engineering-demo"
version: 0.0.0
# General information
name: "ae-hw-engineering"
version: 1.0.0
type: app
# Description will be displayed in the apax extension
description: This reposetory contains an example project to demonstrate how to IT-like hardware configuration with SIMATIX AX.
# Build targets
targets:
- "1500"
- plcsim

# Install Setting
installStrategy: strict
apaxVersion: 3.2.1
# Dependencies
devDependencies:
"@ax/sdk": 2405.0.0
"@ax/opcua-server-config": 1.0.0

# Project variables
variables:
APAX_BUILD_ARGS:
- "--debug" # Generate debug information for target "1500"
Expand All @@ -29,25 +42,22 @@ variables:
# To transfer it to the PLC, it must be passed as an argument during the first hardware download. It can be omitted in further hardware download calls.
MASTER_PW: Demo#123

devDependencies:
"@ax/sdk": ^2405.0.0-rc.9
"@ax/opcua-server-config": ^1.0.0

# Apax scripts
scripts:
# install the GSDML files of the PROFINET IO devices that the PLC is to operate
hw_install_gsdml: hwc install-gsd -i hwcfg/gsd

# create a text file containing all modules can be used. Pls. recall after you've added further GSDML files
hw_print_catalog: hwc get-supported-devices > hw_catalog.txt

# setup all security relevant data for a specific PLC
# setup all security relevant data for a specific PLC - when you want to run it in the project again you need to delte the folder hwcfg/hwc.gen/cpu1516.SecurityConfiguration.json
hw_setup_security:
# create a file made to stores all confidential data (certificates, passwords, users, rights etc.) in a secure format so that it can be added to Git
- hwc setup-secure-communication --name cpu1516 --input hwcfg/cpu1516.hwl.json --password $MASTER_PW
# add a TLS certificate for the PLC as a server, that allows a client (e.g. SIMATIC AX, or an HMI) to verify the PLC's identity when accessing it
- hwc import-certificate --name cpu1516 --input hwcfg/cpu1516.hwl.json --certificate $TLS_PFX_CERTFILE --password $PFX_CERT_PW --purpose TLS
# add a certificate for the PLC's Web server, that allows a Web client (e.g. a browser) to verify the server identity
- hwc import-certificate --name cpu1516 --input hwcfg/cpu1516.hwl.json --certificate $TLS_PFX_CERTFILE --password $PFX_CERT_PW --purpose WebServer
- hwc import-certificate --name cpu1516 --input hwcfg/cpu1516.hwl.json --certificate $TLS_PFX_CERTFILE --password $PFX_CERT_PW --purpose WebServer
# add a certificate for the PLC's OPC UA server, that allows an OPC UA client (e.g. a HMI) to verify the server identity
- hwc import-certificate --name cpu1516 --input hwcfg/cpu1516.hwl.json --certificate $TLS_PFX_CERTFILE --password $PFX_CERT_PW --purpose OpcUAServer
# add a password for a users who can access the PLC and it services (Webs erver, OPC UA server) according to the access authorizations after logging on with his password
Expand Down
1 change: 1 addition & 0 deletions docs/projectstate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
In the checked-in project status, the “hw_setup_security” command has already been executed for initialization.
158 changes: 158 additions & 0 deletions repolint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
{
"$schema": "./schema.json",
"version": 2,
"axioms": {
"linguist": "language",
"licensee": "license",
"packagers": "packager"
},
"rules": {
"license-file-exists": {
"level": "error",
"rule": {
"type": "file-existence",
"options": {
"globsAny": [ "LICENSE.md" ],
"nocase": true
}
}
},
"readme-file-exists": {
"level": "error",
"rule": {
"type": "file-existence",
"options": {
"globsAny": [ "README*.md" ],
"nocase": true
}
}
},
"readme-references-license": {
"level": "error",
"rule": {
"type": "file-contents",
"options": {
"globsAll": [ "README*" ],
"content": "license",
"flags": "i"
}
}
},
"binaries-not-present": {
"level": "warning",
"rule": {
"type": "file-type-exclusion",
"options": {
"type": [ "**/*.exe", "**/*.dll", "!node_modules/**" ]
}
}
},
"test-directory-exists": {
"level": "warning",
"rule": {
"type": "directory-existence",
"options": {
"globsAny": [ "**/test*" ],
"nocase": true
}
}
},
"source-directory-exists": {
"level": "warning",
"rule": {
"type": "directory-existence",
"options": {
"globsAny": [ "**/src*" ],
"nocase": true
}
}
},
"additional-docs-directory-exists": {
"level": "warning",
"rule": {
"type": "directory-existence",
"options": {
"globsAny": [ "**/docs*" ],
"nocase": true
}
}
},
"integrates-with-ci": {
"level": "error",
"rule": {
"type": "file-existence",
"options": {
"globsAny": [
".github/workflows/*"
]
}
}
},
"markdownlint-config-exit": {
"level": "error",
"rule": {
"type": "file-existence",
"options": {
"globsAny": [
".markdownlint.yml"
]
}
}
},
"apax-yml-exit": {
"level": "error",
"rule": {
"type": "file-existence",
"options": {
"globsAny": [
"apax.yml"
]
}
}
},
"gitignore-exit": {
"level": "error",
"rule": {
"type": "file-existence",
"options": {
"globsAny": [
".gitignore"
]
}
}
},
"gitattributes-exit": {
"level": "error",
"rule": {
"type": "file-existence",
"options": {
"globsAny": [
".gitattributes"
]
}
}
},
"apax-files-section-exit": {
"level": "error",
"rule": {
"type": "file-existence",
"options": {
"globsAny": [
"apax-files-section.yml"
]
}
}
},
"CODEOWNERS-exit": {
"level": "error",
"rule": {
"type": "file-existence",
"options": {
"globsAny": [
"CODEOWNERS"
]
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/program.st → src/MainProgram.st
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROGRAM MyProgram
PROGRAM MainProgram
VAR_EXTERNAL
et200sp1_device_dq8_OutputAddress : BYTE;
et200sp2_device_dq8_OutputAddress : BYTE;
Expand Down
4 changes: 2 additions & 2 deletions src/configuration.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CONFIGURATION MyConfiguration
TASK Main(Interval := T#1000ms, Priority := 1);
PROGRAM P1 WITH Main: MyProgram;
PROGRAM P1 WITH Main: MainProgram;

VAR_GLOBAL
et200s_device_2DI_1_InputAddress AT %IB1: BYTE;
Expand All @@ -16,4 +16,4 @@ CONFIGURATION MyConfiguration
{OpcUA = ReadWrite}
set_output : BOOL;
END_VAR
END_CONFIGURATION
END_CONFIGURATION
File renamed without changes.
3 changes: 3 additions & 0 deletions watchlist/mon.mon
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
et200sp1_device_dq8_OutputAddress
et200sp2_device_dq8_OutputAddress
set_output

0 comments on commit a3fcac2

Please sign in to comment.