Skip to content

Commit

Permalink
Updated for the 2405 release
Browse files Browse the repository at this point in the history
  • Loading branch information
ingoeichner committed Jun 3, 2024
1 parent ff100d2 commit 65e0f78
Show file tree
Hide file tree
Showing 12 changed files with 437 additions and 454 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
bin
gsd/hwc/import-cache
hwbin

obj
testresult
803 changes: 382 additions & 421 deletions apax-lock.json

Large diffs are not rendered by default.

31 changes: 20 additions & 11 deletions apax.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,30 @@ variables:
APAX_BUILD_ARGS:
- "--debug" # Generate debug information for target "1500"
PLC_IP: 192.168.0.15
TLS_PFX_CERTFILE: hwcfg/cert/TLS_Server_Certificate_for_S71500.pfx #this is a archive file including a privat and a public key
# SIMATIC PLCs support TLS/certificate based communication (secure communication between the PLC and Enginieering System/SIMATIC AX or and HMI, web server and OPC UA server)
# At least one TLS certificate must be provided and can be used for all PLC communication services.
# Alternatively, a separate certificate can be provided for each service.
# This is a archive file (PKCS #12) used to bundle a private key with its X.509 certificate (public key)
TLS_PFX_CERTFILE: hwcfg/cert/TLS_Server_Certificate_for_S71500.pfx
# this is the password to open the file TLS_Server_Certificate_for_S71500.pfx
PFX_CERT_PW: S71500
# this is the X.509 certificate (public key) to be passed with a call accessing the PLC (e.g. hwld, sld) to let AX verifying the PLCs idendity (authentication)
TLS_PUBLIC_KEY_CERTFILE: hwcfg/cert/TLS_Server_Certificate_for_S71500.crt

# SIMATIC PLCs support role based user management
# In this example I configure 2 users (I call them "Admin" and "Operator") with different roles and rights
USER1: Admin
USER1_PW: Demo#123
USER2: Operator
USER2_PW: Demo#123

# The master passwort is known as "Passwort for protection of confidential PLC configuration data".
# 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
FULL_ACCESS_PW: Demo#123
PFX_CERT_PW: S71500 # this is the password to open the file TLS_Server_Certificate_for_S71500.pfx

devDependencies:
"@ax/sdk": 2311.1.1
"@ax/hwc": 0.13.375
"@ax/hwld": 0.9.479
"@ax/opcua-server-config": 0.7.0
"@ax/sdk": ^2405.0.0-rc.9
"@ax/opcua-server-config": ^1.0.0

scripts:
# install the GSDML files of the PROFINET IO devices that the PLC is to operate
Expand All @@ -38,10 +47,10 @@ scripts:
# 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
# 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
- 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
- hwc manage-users set-password -u $USER1 -p "$USER1_PW" --moduleName cpu1516 -i hwcfg/cpu1516.hwl.json
- hwc manage-users set-password -u $USER2 -p "$USER2_PW" --moduleName cpu1516 -i hwcfg/cpu1516.hwl.json

Expand Down
11 changes: 0 additions & 11 deletions hw_catalog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1204,14 +1204,3 @@
xB6 AC400V/0.5A || GsdFileName: GSDML-V2.25-SIEMENS-ET200S-20191007.XML || OrderNumber: 3RK1 903-0CK00 || GsdId: 286
xB6 AC400V/0.5A* || GsdFileName: GSDML-V2.25-SIEMENS-ET200S-20191007.XML || OrderNumber: 3RK1 903-0CK00 || GsdId: 553

**CPPNDriver
PN Driver CP1625 Host Submodule Interface || OrderNumber: CP1625 Host || FwVersion: V3.0
PN Driver CP1627 Submodule Interface || OrderNumber: CP1627 || FwVersion: V3.0
PN Driver Linux Native Submodule Interface || OrderNumber: Linux Native || FwVersion: V3.0
PN Driver Linux Native Submodule Interface || OrderNumber: Linux Native || FwVersion: V2.2
PN Driver Windows Submodule Interface || OrderNumber: Windows || FwVersion: V3.0

**PNDriver
PROFINET Driver || OrderNumber: 6ES7 195-3AA00-0YA1 || FwVersion: V3.0
PROFINET Driver || OrderNumber: PROFINET-JUPITER || FwVersion: V2.2

8 changes: 4 additions & 4 deletions hwcfg/cpu1516.hwl.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
"Interfaces": [ // This module has interfaces, they can be configured and parametrized
{
"Name": "profinet_interface_x1", // This is the name I assigned to a PLC Profinet interface
"Label": "X1", // this selects the concrete interface since a module migth have more then one
"Label": "X1", // This selects the concrete interface since a module migth have more then one
"Addresses": {
"Configured": [ //this means, the interface address I configure here is the one to be used after the configuration gets loaded to the PLC
"Configured": [ //This means, the interface address I configure here is the one to be used after the configuration gets loaded to the PLC
{
"IPv4": "192.168.0.15/24" // The
"IPv4": "192.168.0.15/24" // The IP address (host address and subnet mask in CIDR notation)
}
]
},
Expand Down Expand Up @@ -105,7 +105,7 @@
"AccessProtectionReadAccess", // by granting this function right the user has read only access to the PLC
"QueryDiagnostics" //..
]
},
}
]
},
"Parameters": { // Here I add parameter I want to change from default to a user value
Expand Down
2 changes: 1 addition & 1 deletion hwcfg/et200s.hwl.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"Name": "x1p1",
"Label": "X1 P1"
}
],
]
},
{
"Name": "PM",
Expand Down
2 changes: 1 addition & 1 deletion hwcfg/et200sp1.hwl.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"Name": "x1p2",
"Label": "X1 P2"
}
],
]
},
{
"Apply": {
Expand Down
4 changes: 2 additions & 2 deletions hwcfg/hwc.gen/cpu1516.SecurityConfiguration.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion hwcfg/scalance.hwl.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"Name": "x1p8",
"Label": "X1 P8"
}
],
]
}
]
}
Expand Down
6 changes: 5 additions & 1 deletion hwcfg_templates/templ_et200sp_di8x24vdc.hwl.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@
"GsdId": "DI 8x24VDC ST V1.1",
"FileName": "GSDML-V2.42-SIEMENS-ET200SP-20230812.XML"
},
// Parameters for Profinet devices are grouped together in parameter record data, which are arrays of bytes.
"Parameters": {
"RecordDataList": [
{
//A parameter record data is identified by an index value, given by the device's vendor
"Index": 243,
//"RawValue": "0x01 00 00 00" //Light base module
// By this line the whole parameter record data was constructed as raw byt array. By aware, that by notation this there is no check if the parameter record data is correct
//"RawValue": "0x01 00 00 00" //"Enable new potential group (light BaseUnit)"
// It is better readable to type each parameter in the form of "OffsetName" and "ValueName".
"Values": [
{
"OffsetName": "Potential group", //0.0
Expand Down
Binary file added params.txt
Binary file not shown.
21 changes: 21 additions & 0 deletions plc_certificate.cer
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----BEGIN CERTIFICATE-----
MIIEGzCCAwOgAwIBAgIIQZkCnF7iSTcwDQYJKoZIhvcNAQELBQAwgYAxCzAJBgNVBAYTAkRFMRAw
DgYDVQQIEwdCYXZhcmlhMREwDwYDVQQHEwhFcmxhbmdlbjETMBEGA1UEChMKU0lFTUVOUyBBRzEL
MAkGA1UECxMCQVgx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