Skip to content

Commit 1b6441f

Browse files
Merge pull request #33 - add aditional diagnostic scripts for ibs in apax,yml
add aditional diagnostic scripts for ibs in apax,yml
2 parents 5bb48fc + 282a517 commit 1b6441f

File tree

11 files changed

+394
-119
lines changed

11 files changed

+394
-119
lines changed

.vscode/launch.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
// This is the configuration file for local debugging. This is not needed in a remote environment and can be deleted
3+
// Use IntelliSense to learn about possible attributes.
4+
// Hover to view descriptions of existing attributes.
5+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
6+
"version": "0.2.0",
7+
"configurations": [
8+
{
9+
"name": "Adam-DebugSession",
10+
"type": "plc-debug",
11+
"request": "launch",
12+
"program": "${workspaceFolder}",
13+
"ip": "192.168.0.10",
14+
"certificate": "${workspaceFolder}/certificate/reference_x509.crt",
15+
"username": "Adam",
16+
"password": "A123456z"
17+
},
18+
{
19+
"name": "Otto-DebugSession",
20+
"type": "plc-debug",
21+
"request": "launch",
22+
"program": "${workspaceFolder}",
23+
"ip": "192.168.0.10",
24+
"certificate": "${workspaceFolder}/certificate/reference_x509.crt",
25+
"username": "Otto",
26+
"password": "O123456z"
27+
}
28+
]
29+
}

Readme.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,18 @@ The hardware configuration presented here is highly modular and utilizes the tem
2727

2828
The central apax.yml file contains scripts that exemplify the entire workflow step by step
2929

30+
31+
## Usage
32+
33+
If you want to create a new project based on this application example, you may use the provided apax template package. Simply enter the following command in the terminal:
34+
35+
```bash
36+
apax create @simatic-ax/ae-hw-engineering --registry https://npm.pkg.github.com
37+
```
38+
3039
## Contribution
3140

32-
Thanks for your interest in contributing. Anybody is free to report bugs, unclear documentation, and other problems regarding this repository in the Issues section or, even better, is free to propose any changes to this repository using Merge Requests.
41+
Thanks for your interest in contributing. Everybody is free to report bugs, unclear documentation, and other problems regarding this repository in the Issues section or, even better, is free to propose any changes to this repository using Merge Requests.
3342

3443
## License and Legal information
3544

SystemConstants/cpu1516v31_HwIdentifiers.st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ CONFIGURATION HardwareIDs
2121
et200sp1_device_im155hfv33_PN_IO_HwID : UINT := UINT#292;
2222
et200sp1_device_im155hfv33_Port_1_HwID : UINT := UINT#294;
2323
et200sp1_device_im155hfv33_Port_2_HwID : UINT := UINT#295;
24-
et200sp1_device_servermodule_Server_module_V1_1_0_bytes_HwID : UINT := UINT#298;
24+
et200sp1_device_servermodule_Servermodul_V1_1_0_Bytes_HwID : UINT := UINT#298;
2525
et200sp2_device_HwID : UINT := UINT#283;
2626
et200sp2_device_Rack_HwID : UINT := UINT#286;
2727
et200sp2_device_di8_DI_8x24VDC_ST_V1_1_HwID : UINT := UINT#290;
@@ -31,7 +31,7 @@ CONFIGURATION HardwareIDs
3131
et200sp2_device_im155stv41_PN_IO_HwID : UINT := UINT#282;
3232
et200sp2_device_im155stv41_Port_1_HwID : UINT := UINT#284;
3333
et200sp2_device_im155stv41_Port_2_HwID : UINT := UINT#285;
34-
et200sp2_device_servermodule_Server_module_V1_1_0_bytes_HwID : UINT := UINT#288;
34+
et200sp2_device_servermodule_Servermodul_V1_1_0_Bytes_HwID : UINT := UINT#288;
3535
plc_device_HwID : UINT := UINT#32;
3636
plc_device_Rail_0_HwID : UINT := UINT#302;
3737
plc_device_cpu1516v31_HwID : UINT := UINT#48;

apax-lock.json

Lines changed: 59 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
"version": "1.0.0",
99
"devDependencies": {
1010
"@ax/sdk": "2504.0.0",
11-
"@ax/hwc": "3.0.0",
12-
"@ax/hwld": "3.0.0",
13-
"@ax/hw-s7-1500": "3.0.0"
11+
"@ax/hardware-diagnostics": "0.3.0"
1412
},
1513
"catalogs": {
1614
"@ax/simatic-ax": "2504.0.0"
@@ -48,33 +46,16 @@
4846
"@ax/trace": "2.9.0"
4947
}
5048
},
51-
"@ax/hwc": {
52-
"name": "@ax/hwc",
53-
"version": "3.0.0",
54-
"integrity": "sha512-kMgipV3XWLt3VpP8G5EDu+Vv3ki2eQLpBwUtt49CBuWXGYs4Rajeb37kML/k4gs/i9TQBRcSBQZHBZti8us1xQ==",
55-
"resolved": "https://registry.simatic-ax.siemens.io/@ax/hwc/-/hwc-3.0.0.tgz",
56-
"dependencies": {
57-
"@ax/hwc-win-x64": "3.0.0",
58-
"@ax/hwc-linux-x64": "3.0.0"
59-
}
60-
},
61-
"@ax/hwld": {
62-
"name": "@ax/hwld",
63-
"version": "3.0.0",
64-
"integrity": "sha512-l84LaJJUY6/ztD9ikFFZNbqv8Z6+KnNaoqWkZqtzHRjS+W/wU9NBkoTu9dR4leQsoSgSWKa9cFtSHyzdfTPuCg==",
65-
"resolved": "https://registry.simatic-ax.siemens.io/@ax/hwld/-/hwld-3.0.0.tgz",
49+
"@ax/hardware-diagnostics": {
50+
"name": "@ax/hardware-diagnostics",
51+
"version": "0.3.0",
52+
"integrity": "sha512-owNWmcPq0cKHr1WsWOlAnY9d3kWO0MdQSjSFYNLiF7kagDBXGtmZvbzFKn4Kwoyq8Hdw7UgCOJcDPIbq3gHnXw==",
53+
"resolved": "https://registry.simatic-ax.siemens.io/@ax/hardware-diagnostics/-/hardware-diagnostics-0.3.0.tgz",
6654
"cpu": [
6755
"x64"
6856
],
6957
"dependencies": {}
7058
},
71-
"@ax/hw-s7-1500": {
72-
"name": "@ax/hw-s7-1500",
73-
"version": "3.0.0",
74-
"integrity": "sha512-iAyTgiwcjdkb25ofPz0UNtMAtTBXOfoaTq/60gjGAV9LeJQ+Dx4v5JkRNcMSCz1bX2TyKYfhTJSxtqdgJj5Xhg==",
75-
"resolved": "https://registry.simatic-ax.siemens.io/@ax/hw-s7-1500/-/hw-s7-1500-3.0.0.tgz",
76-
"dependencies": {}
77-
},
7859
"@ax/apax-build": {
7960
"name": "@ax/apax-build",
8061
"version": "2.0.20",
@@ -124,6 +105,33 @@
124105
"@ax/diagnostic-buffer-linux-x64": "1.3.2"
125106
}
126107
},
108+
"@ax/hw-s7-1500": {
109+
"name": "@ax/hw-s7-1500",
110+
"version": "3.0.0",
111+
"integrity": "sha512-iAyTgiwcjdkb25ofPz0UNtMAtTBXOfoaTq/60gjGAV9LeJQ+Dx4v5JkRNcMSCz1bX2TyKYfhTJSxtqdgJj5Xhg==",
112+
"resolved": "https://registry.simatic-ax.siemens.io/@ax/hw-s7-1500/-/hw-s7-1500-3.0.0.tgz",
113+
"dependencies": {}
114+
},
115+
"@ax/hwc": {
116+
"name": "@ax/hwc",
117+
"version": "3.0.0",
118+
"integrity": "sha512-kMgipV3XWLt3VpP8G5EDu+Vv3ki2eQLpBwUtt49CBuWXGYs4Rajeb37kML/k4gs/i9TQBRcSBQZHBZti8us1xQ==",
119+
"resolved": "https://registry.simatic-ax.siemens.io/@ax/hwc/-/hwc-3.0.0.tgz",
120+
"dependencies": {
121+
"@ax/hwc-win-x64": "3.0.0",
122+
"@ax/hwc-linux-x64": "3.0.0"
123+
}
124+
},
125+
"@ax/hwld": {
126+
"name": "@ax/hwld",
127+
"version": "3.0.0",
128+
"integrity": "sha512-l84LaJJUY6/ztD9ikFFZNbqv8Z6+KnNaoqWkZqtzHRjS+W/wU9NBkoTu9dR4leQsoSgSWKa9cFtSHyzdfTPuCg==",
129+
"resolved": "https://registry.simatic-ax.siemens.io/@ax/hwld/-/hwld-3.0.0.tgz",
130+
"cpu": [
131+
"x64"
132+
],
133+
"dependencies": {}
134+
},
127135
"@ax/mod": {
128136
"name": "@ax/mod",
129137
"version": "1.7.6",
@@ -269,32 +277,6 @@
269277
"@ax/trace-linux-x64": "2.9.0"
270278
}
271279
},
272-
"@ax/hwc-win-x64": {
273-
"name": "@ax/hwc-win-x64",
274-
"version": "3.0.0",
275-
"integrity": "sha512-rqU2J1fccx+sbM/ZQFJzM0gCD7BxIGP1r3Tzih3q9PRSVuKrIs8srFArMiDjN1KAP4BtZFix9knWGb7djlj6bQ==",
276-
"resolved": "https://registry.simatic-ax.siemens.io/@ax/hwc-win-x64/-/hwc-win-x64-3.0.0.tgz",
277-
"os": [
278-
"win32"
279-
],
280-
"cpu": [
281-
"x64"
282-
],
283-
"dependencies": {}
284-
},
285-
"@ax/hwc-linux-x64": {
286-
"name": "@ax/hwc-linux-x64",
287-
"version": "3.0.0",
288-
"integrity": "sha512-apyeDcxX0XD3q/9Oc0SfPIO9GLn60owsDg/xlu4WNVVjP20OhMnoc5l1f+p1nOJMf0I/tMfe4UIPxKQ6LxSTVQ==",
289-
"resolved": "https://registry.simatic-ax.siemens.io/@ax/hwc-linux-x64/-/hwc-linux-x64-3.0.0.tgz",
290-
"os": [
291-
"linux"
292-
],
293-
"cpu": [
294-
"x64"
295-
],
296-
"dependencies": {}
297-
},
298280
"@ax/axunitst-library": {
299281
"name": "@ax/axunitst-library",
300282
"version": "8.0.33",
@@ -350,6 +332,32 @@
350332
],
351333
"dependencies": {}
352334
},
335+
"@ax/hwc-win-x64": {
336+
"name": "@ax/hwc-win-x64",
337+
"version": "3.0.0",
338+
"integrity": "sha512-rqU2J1fccx+sbM/ZQFJzM0gCD7BxIGP1r3Tzih3q9PRSVuKrIs8srFArMiDjN1KAP4BtZFix9knWGb7djlj6bQ==",
339+
"resolved": "https://registry.simatic-ax.siemens.io/@ax/hwc-win-x64/-/hwc-win-x64-3.0.0.tgz",
340+
"os": [
341+
"win32"
342+
],
343+
"cpu": [
344+
"x64"
345+
],
346+
"dependencies": {}
347+
},
348+
"@ax/hwc-linux-x64": {
349+
"name": "@ax/hwc-linux-x64",
350+
"version": "3.0.0",
351+
"integrity": "sha512-apyeDcxX0XD3q/9Oc0SfPIO9GLn60owsDg/xlu4WNVVjP20OhMnoc5l1f+p1nOJMf0I/tMfe4UIPxKQ6LxSTVQ==",
352+
"resolved": "https://registry.simatic-ax.siemens.io/@ax/hwc-linux-x64/-/hwc-linux-x64-3.0.0.tgz",
353+
"os": [
354+
"linux"
355+
],
356+
"cpu": [
357+
"x64"
358+
],
359+
"dependencies": {}
360+
},
353361
"@ax/mod-win-x64": {
354362
"name": "@ax/mod-win-x64",
355363
"version": "1.7.6",

apax.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ catalogs:
1515
# Dependencies
1616
devDependencies:
1717
"@ax/sdk": 2504.0.0
18-
"@ax/hwc": 3.0.0
19-
"@ax/hwld": 3.0.0
20-
"@ax/hw-s7-1500": 3.0.0
18+
"@ax/hardware-diagnostics": 0.3.0
2119

2220
# Project variables
2321
variables:
@@ -104,9 +102,8 @@ scripts:
104102
# Compile the hardware description (input:sources) to target specific data (output:binaries) and update the IO- and HwIdent mapping (SystemConstants)
105103
hw_compile: hwc compile --input hwc --output $HW_BIN_FOLDER
106104
# load the target specific hardware data (binaries) to the PLC
107-
init_hw_load: hwld --input $HW_BIN_FOLDER/$PLC_NAME -t $IP_ADDRESS --accept-security-disclaimer -M:$MASTER_PW
108-
hw_load: hwld --input $HW_BIN_FOLDER/$PLC_NAME -t $IP_ADDRESS --accept-security-disclaimer -C $TLS_CONNECT_CERTFILE -u:$USER_1_NAME -p:"$USER_1_PASSWORD" -r
109-
105+
init_hw_load: hwld load --input $HW_BIN_FOLDER/$PLC_NAME -t $IP_ADDRESS --accept-security-disclaimer -M:$MASTER_PW
106+
hw_load: hwld load --input $HW_BIN_FOLDER/$PLC_NAME -t $IP_ADDRESS --accept-security-disclaimer -C $TLS_CONNECT_CERTFILE -u:$USER_1_NAME -p:"$USER_1_PASSWORD" -r
110107
hw_compile_and_load:
111108
- apax hw_compile
112109
- apax hw_load
@@ -122,3 +119,20 @@ scripts:
122119
- apax hw_compile
123120
- apax hw_load
124121
- apax dlplc
122+
123+
# basic plc operation
124+
plc-run: plc-info set-mode run -t $IP_ADDRESS -C $TLS_CONNECT_CERTFILE -u:$USER_1_NAME -p:"$USER_1_PASSWORD"
125+
plc-stop: plc-info set-mode stop -t $IP_ADDRESS -C $TLS_CONNECT_CERTFILE -u:$USER_1_NAME -p:"$USER_1_PASSWORD"
126+
plc-mres: plc-info memory-reset -t $IP_ADDRESS -C $TLS_CONNECT_CERTFILE -u:$USER_1_NAME -p:"$USER_1_PASSWORD"
127+
plc-reset: hwld load --reset-plc KeepOnlyIP --target $IP_ADDRESS -u:$USER_1_NAME -p:"$USER_1_PASSWORD" --accept-security-disclaimer
128+
# basic plc diagnostics
129+
plc-info: plc-info inspect -t $IP_ADDRESS -C $TLS_CONNECT_CERTFILE -u:$USER_1_NAME -p:"$USER_1_PASSWORD"
130+
plc-perf-cylce: perf-info cycle-time -t $IP_ADDRESS -C $TLS_CONNECT_CERTFILE -u:$USER_1_NAME -p:"$USER_1_PASSWORD"
131+
plc-perf-memory: perf-info memory -t $IP_ADDRESS -C $TLS_CONNECT_CERTFILE -u:$USER_1_NAME -p:"$USER_1_PASSWORD"
132+
plc-perf-com: perf-info comm-load -t $IP_ADDRESS -C $TLS_CONNECT_CERTFILE -u:$USER_1_NAME -p:"$USER_1_PASSWORD"
133+
# extended plc diagnostics
134+
show-alarms: plc-control alarms -t $IP_ADDRESS -C $TLS_CONNECT_CERTFILE -u:$USER_1_NAME -p:"$USER_1_PASSWORD" --format Yaml --continuous
135+
show-diagbuffer: diag-buff -t $IP_ADDRESS -C $TLS_CONNECT_CERTFILE -u:$USER_1_NAME -p:"$USER_1_PASSWORD" --continuous
136+
# onlince <> offline compare
137+
plc-hwcomp: hw-diag compare -t $IP_ADDRESS -C $TLS_CONNECT_CERTFILE -u:$USER_1_NAME -p:"$USER_1_PASSWORD"
138+
plc-swcomp: sld compare -m All -t $IP_ADDRESS -i $SW_BIN_FOLDER -C $TLS_CONNECT_CERTFILE -u:$USER_1_NAME -p:"$USER_1_PASSWORD"

hwc/machine_x/hwc.gen/cpu1516v31.HardwareIdentifiers.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
"Value": 276
1919
},
2020
{
21-
"Name": "et200s_device~dq2_1~2DO DC24V/0.5A HF",
21+
"Name": "et200s_device~dq2_1~2DO DC24V/0,5A HF",
2222
"Value": 279
2323
},
2424
{
25-
"Name": "et200s_device~dq2_2~2DO DC24V/0.5A HF",
25+
"Name": "et200s_device~dq2_2~2DO DC24V/0,5A HF",
2626
"Value": 278
2727
},
2828
{
@@ -86,7 +86,7 @@
8686
"Value": 295
8787
},
8888
{
89-
"Name": "et200sp1_device~servermodule~Server module V1.1 (0 bytes)",
89+
"Name": "et200sp1_device~servermodule~Servermodul V1.1 (0 Bytes)",
9090
"Value": 298
9191
},
9292
{
@@ -126,7 +126,7 @@
126126
"Value": 285
127127
},
128128
{
129-
"Name": "et200sp2_device~servermodule~Server module V1.1 (0 bytes)",
129+
"Name": "et200sp2_device~servermodule~Servermodul V1.1 (0 Bytes)",
130130
"Value": 288
131131
},
132132
{

0 commit comments

Comments
 (0)