diff --git a/Create-Simple.ps1 b/Create-Simple.ps1 index 3520649..47983f7 100644 --- a/Create-Simple.ps1 +++ b/Create-Simple.ps1 @@ -2,6 +2,22 @@ param ( [Parameter(Mandatory=$true)] [string]$ProjectName ) +# Check project name defined +$pattern = '^(@[A-Z][a-z0-9-_.~]*/)?[A-Z][a-z0-9-_~]*(?:\.[A-Z][a-z0-9-_~]*)*$' + +# Validate the project name +if (-not ($ProjectName -match $pattern)) { + Write-Host "The project name value does not match the required pattern." -ForegroundColor Red + Write-Host "Rules:" + Write-Host "1. The project name must start with a capital letter." + Write-Host "2. After a dot (.), the next character must also be a capital letter." + Write-Host "3. It may optionally include a namespace starting with '@' and ending with '/'." + Write-Host "4. Subsequent characters can include lowercase letters, numbers, dashes (-), underscores (_), and tildes (~)." + Write-Host "Example of valid project names: 'Project.Name', '@Namespace/Project.Name', 'Valid.Name-Extra'." -ForegroundColor Yellow + Write-Host "Example of invalid project names: 'project.Name', 'Project.name', 'Project.123', '@namespace/project.name'." -ForegroundColor Yellow + exit 1 # Exit the script with a non-zero status code +} + # Define repository directories $axopenRepoDir = ".\axopen" diff --git a/axopen.template.simple/ax/apax.yml b/axopen.template.simple/ax/apax.yml index 2db510c..9992c40 100644 --- a/axopen.template.simple/ax/apax.yml +++ b/axopen.template.simple/ax/apax.yml @@ -41,10 +41,15 @@ dependencies: # "@ix-ax/axopen.components.mitsubishi.robotics": '0.4.4-alpha.857' # "@ix-ax/axopen.components.ur.robotics": '0.4.4-alpha.857' # "@ix-ax/axopen.simatic1500": '0.4.4-alpha.857' + "@ax/hwc": ^2.0.49 + "@ax/hw-s7-1500": ^2.0.49 + "@ax/hwld": ^2.0.20 +installStrategy: overridable +apaxVersion: 3.1.1 variables: APAX_BUILD_ARGS: [ -d ] PLC_NAME: "plc_line" - HWCONFIG: "TIA" + HWCONFIG: "HWC" AXTARGET: 10.222.6.1 AXTARGETPLATFORMINPUT: .\bin\1500\ AX_USERNAME: "adm" @@ -52,12 +57,6 @@ variables: MY_VERY_STRONG_PASSWORD: $AX_TARGET_PWD COM_CERT_PATH: .\certs\Communication.cer scripts: - ci: apax clean apax install - ixc: - - dotnet tool restore --no-cache - - dotnet ixc -d - - dotnet ixr - postbuild: apax ixc push: - apax build - apax download @@ -169,65 +168,74 @@ scripts: if [[ "$HWCONFIG" == "TIA-NON-SECURE" ]]; then apax sld load --accept-security-disclaimer -t $AXTARGET -i $AXTARGETPLATFORMINPUT --mode delta fi + plcsim: ..\\scripts\\StartPlcSimAdvCli.exe #start PLCSIM r: ..\\scripts\\restart_PLC.sh $AXTARGET $PLC_NAME - dcpli: ..\\scripts\\dcp_utility_list_interfaces.sh - dcpd: ..\\scripts\\dcp_utility_discover.sh $PNIO_MAC - hdl: ..\\scripts\\hw_diag_list.sh $AXTARGET $PLC_NAME - clean_plc: | + ixc: | # run ix builder + dotnet tool restore + dotnet ixc + postbuild: apax run ixc # run after build + dcpli: | # list all interfaces, used to discover MAC address of the adapter connected to PLC + ..\\..\\scripts\\dcp_utility_list_interfaces.sh + dcpd: | # discover all accesible devices connected to adapter with MAC address equal to entered MAC, used to discover MAC-addresses of the slaves + ..\\..\\scripts\\dcp_utility_discover.sh $PNIO_MAC + hdl: | #List configured harware and its state + ..\\..\\scripts\\hw_diag_list.sh $AXTARGET $PLC_NAME + ci: | #clean and install dependencies + apax clean + apax install + reset_plc: | #total reset of the PLC including IP and name + if [[ "$HWCONFIG" == "HWC" ]]; then + ..\\scripts\\reset_plc.sh $AXTARGET + fi + clean_plc: | #total reset of the PLC excluding IP and name if [[ "$HWCONFIG" == "HWC" ]]; then ..\\scripts\\clean_plc.sh $AXTARGET fi - ssc: | + ssc: | # setup secure communication, create and import certificates, setup password for AX_USERNAME if [[ "$HWCONFIG" == "HWC" ]]; then ..\\scripts\\setup_secure_communication.sh $PLC_NAME $AX_USERNAME $AX_TARGET_PWD fi - gsd: | + gsd: | # copy and install all gsdml files from libraries if [[ "$HWCONFIG" == "HWC" ]]; then ..\\scripts\\copy_and_install_gsd.sh fi - hwl: | + hwl: | # copy all templates from libraries if [[ "$HWCONFIG" == "HWC" ]]; then ..\\scripts\\copy_hwl_templates.sh fi - hwid: | + hwid: | # copy the generated HwIds from global constants into the type definition, matching the format as the TIA2AX tool creates if [[ "$HWCONFIG" == "HWC" ]]; then ..\\scripts\\copy_hardware_ids.sh fi - hwfd: | + hwfd: | # copy and install gsd, copy templates,compile, copy the HwIds, first download HW using password and upload certificate if [[ "$HWCONFIG" == "HWC" ]]; then ..\\scripts\\hw_first_download.sh $PLC_NAME $AXTARGET $AX_TARGET_PWD fi - hwu: | + hwu: | # copy and install gsd, copy templates, compile, copy the HwIds, download HW using certificate if [[ "$HWCONFIG" == "HWC" ]]; then ..\\scripts\\hw_update.sh $PLC_NAME $AXTARGET fi - swfd: | + swfd: | # software build and full download if [[ "$HWCONFIG" == "HWC" ]]; then ..\\scripts\\sw_build_and_download_full.sh $PLC_NAME $AXTARGET $AXTARGETPLATFORMINPUT fi - swdd: | + swdd: | # software build and delta download if [[ "$HWCONFIG" == "HWC" ]]; then ..\\scripts\\sw_build_and_download_delta.sh $PLC_NAME $AXTARGET $AXTARGETPLATFORMINPUT fi - alf: - - START=$(date +%s) - - | - if - [[ "$HWCONFIG" == "HWC" ]]; then - ..\\scripts\\all_first.sh $PLC_NAME $AXTARGET $AXTARGETPLATFORMINPUT $AX_USERNAME $AX_TARGET_PWD - fi - - echo $(date +%D)"-"$(date +%H)":"$(date +%M)":"$(date +%S) " - Finished in :" $(expr $(date +%s) - $START) "s" - all: - - START=$(date +%s) - - | - if - [[ "$HWCONFIG" == "HWC" ]]; then - ..\\scripts\\all.sh $PLC_NAME $AXTARGET $AXTARGETPLATFORMINPUT - fi - - echo $(date +%D)"-"$(date +%H)":"$(date +%M)":"$(date +%S) " - Finished in :" $(expr $(date +%s) - $START) "s" + alf: | #clear plc except ip and name and provide all actions for install all, build and initial download hw so as sw + START=$(date +%s) + if [[ "$HWCONFIG" == "HWC" ]]; then + ..\\scripts\\all_first.sh $PLC_NAME $AXTARGET $AXTARGETPLATFORMINPUT $AX_USERNAME $AX_TARGET_PWD + fi + echo $(date +%D)"-"$(date +%H)":"$(date +%M)":"$(date +%S) " - Finished in :" $(expr $(date +%s) - $START) "s" + all: | #build and download hardware and software + START=$(date +%s) + if [[ "$HWCONFIG" == "HWC" ]]; then + ..\\scripts\\all.sh $PLC_NAME $AXTARGET $AXTARGETPLATFORMINPUT + fi + echo $(date +%D)"-"$(date +%H)":"$(date +%M)":"$(date +%S) " - Finished in :" $(expr $(date +%s) - $START) "s" publicKeys: "@ix-ax": 30c06ef7830b4dfd8f16e003508da1ac2d187714d0e1f38279a9332cbe4e4e17 -installStrategy: overridable -apaxVersion: 3.1.1 diff --git a/axopen.template.simple/ax/gsd/source/GSDML-V2.31-ur-UR-20160505.xml b/axopen.template.simple/ax/gsd/source/GSDML-V2.31-ur-UR-20160505.xml deleted file mode 100644 index 9673b88..0000000 --- a/axopen.template.simple/ax/gsd/source/GSDML-V2.31-ur-UR-20160505.xml +++ /dev/null @@ -1,376 +0,0 @@ - - - - - PROFINET Device Profile - 1.00 - Device Profile for PROFINET Devices - PROFIBUS Nutzerorganisation e. V. (PNO) - Device - - 4 - 1 - GSDML - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/axopen.template.simple/ax/gsd/source/GSDML-V2.42-UR-PROFIsafe-20220517.xml b/axopen.template.simple/ax/gsd/source/GSDML-V2.42-UR-PROFIsafe-20220517.xml deleted file mode 100644 index 8007bf9..0000000 --- a/axopen.template.simple/ax/gsd/source/GSDML-V2.42-UR-PROFIsafe-20220517.xml +++ /dev/null @@ -1,945 +0,0 @@ - - - - - PROFINET Device Profile - 1.00 - Device Profile for PROFINET Devices - PROFIBUS Nutzerorganisation e. V. (PNO) - Device - - 4 - 1 - GSDML - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/axopen.template.simple/ax/gsd/source/gsdml-v2.31-cognex-dataman-20170215.xml b/axopen.template.simple/ax/gsd/source/gsdml-v2.31-cognex-dataman-20170215.xml deleted file mode 100644 index e905c4a..0000000 --- a/axopen.template.simple/ax/gsd/source/gsdml-v2.31-cognex-dataman-20170215.xml +++ /dev/null @@ -1,1513 +0,0 @@ - - - - - PROFINET Device Profile - 1.00 - Device Profile for PROFINET Devices - PROFIBUS Nutzerorganisation e. V. (PNO) - Device - - 4 - 1 - GSDML - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/axopen.template.simple/ax/gsd/source/gsdml-v2.34-cognex-insightclassb-20200327.xml b/axopen.template.simple/ax/gsd/source/gsdml-v2.34-cognex-insightclassb-20200327.xml deleted file mode 100644 index 23c0bda..0000000 --- a/axopen.template.simple/ax/gsd/source/gsdml-v2.34-cognex-insightclassb-20200327.xml +++ /dev/null @@ -1,1527 +0,0 @@ - - - - PROFINET Device Profile - 1.00 - Device Profile for PROFINET Devices - PROFIBUS Nutzerorganisation e. V. (PNO) - Device - - 4 - 1 - GSDML - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/axopen.template.simple/ax/gsd/source/gsdml-v2.42-cognex-datamanclassb-20220124.xml b/axopen.template.simple/ax/gsd/source/gsdml-v2.42-cognex-datamanclassb-20220124.xml deleted file mode 100644 index 78d324a..0000000 --- a/axopen.template.simple/ax/gsd/source/gsdml-v2.42-cognex-datamanclassb-20220124.xml +++ /dev/null @@ -1,1280 +0,0 @@ - - - - PROFINET Device Profile - 1.00 - Device Profile for PROFINET Devices - PROFIBUS Nutzerorganisation e. V. (PNO) - Device - - 4 - 1 - GSDML - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/axopen.template.simple/ax/hwc/S71500.hwl.json b/axopen.template.simple/ax/hwc/S71500.hwl.json deleted file mode 100644 index 7532635..0000000 --- a/axopen.template.simple/ax/hwc/S71500.hwl.json +++ /dev/null @@ -1,180 +0,0 @@ -{ - "Templates":{ - "Modules":[ - { - "Name": "PLC_1516_v3_0", - - "Placeholders":[ - { - "Name": "PLCName", - "Value": "plc_line" - }, - { "Name": "IpAddress" } - ], - "Content":{ - "Name": "${PLCName}", - "TypeIdentifier": { - "OrderNumber": "6ES7 516-3AP03-0AB0", - "Version": "V3.0" - }, - "AccessProtection": { - "AccessLevel": "FullAccess" - }, - "Services": [ - { - "Type": "WebServer", - "Enabled": true, - "Parameters": { - "HttpsOnly": true - } - }, - { - "Type": "OpcUaServer", - "Enabled": true, - "Parameters": { - "GuestAuthentication": false, - "SecurityPolicies": [ - "Basic256Sha256Sign", - "Basic256Sha256SignEncrypt" - ] - } - } - ], - "UserManagement": { - "Roles": [ - { - "Name": "WebServerAccessRole", - "FunctionRights": [ - "ReadPlcVariables", - "WritePlcVariables", - "ReadFiles", - "QueryDiagnostics", - "FlashLed" - ] - }, - { - "Name": "OpcUaServerRole", - "FunctionRights": [ - "OpcUAServerAccess", - "OpcUAManageCertificates" - ] - } - ], - "Users": [ - { - "Name": "usr", - "AssignedRoles": [ - "WebServerAccessRole", - "OpcUaServerRole" - ] - } - ] - }, - "Ports": [ - { - "Name": "Port1", - "Label": "X1 P1" - }, - { - "Name": "Port2", - "Label": "X1 P2" - } - ], - "Interfaces": [ - { - "Name": "profinet_x1", - "Label": "X1", - "Addresses": { - "Configured": [ - { "IPv4": "${IpAddress}" }, - { "ProfinetDeviceName": "plc_line.profinet" } - ] - } - } - ] - } - }, - { - "Name": "PLC_1516_v3_1", - - "Placeholders":[ - { - "Name": "PLCName", - "Value": "plc_line" - }, - { "Name": "IpAddress" } - ], - "Content":{ - "Name": "${PLCName}", - "TypeIdentifier": { - "OrderNumber": "6ES7 516-3AP03-0AB0", - "Version": "V3.1" - }, - "AccessProtection": { - "AccessLevel": "FullAccess" - }, - "Services": [ - { - "Type": "WebServer", - "Enabled": true, - "Parameters": { - "HttpsOnly": true - } - } - ], - "UserManagement": { - "Roles": [ - { - "Name": "WebServerAccessRole", - "FunctionRights": [ - "ReadPlcVariables", - "WritePlcVariables", - "ReadFiles", - "QueryDiagnostics", - "FlashLed" - ] - }, - { - "Name": "FullAccessRole", - "FunctionRights": [ - "AccessProtectionFullAccess" - ] - } - ], - "Users": [ - { - "Name": "adm", - "AssignedRoles": [ - "FullAccessRole", - "WebServerAccessRole" - ] - } - ] - }, - "Ports": [ - { - "Name": "Port1", - "Label": "X1 P1" - }, - { - "Name": "Port2", - "Label": "X1 P2" - } - ], - "Interfaces": [ - { - "Name": "profinet_x1", - "Label": "X1", - "Addresses": { - "Configured": [ - { "IPv4": "${IpAddress}" }, - { "ProfinetDeviceName": "plc_line.profinet" } - ] - } - } - ] - } - } - ] - } -} diff --git a/axopen.template.simple/ax/hwc/hwc.gen/plc_line.HardwareIdentifiers.json b/axopen.template.simple/ax/hwc/hwc.gen/plc_line.HardwareIdentifiers.json deleted file mode 100644 index 93c4678..0000000 --- a/axopen.template.simple/ax/hwc/hwc.gen/plc_line.HardwareIdentifiers.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "Version": 1, - "HardwareIdentifiers": [ - { - "Name": "PROFINET IO-System", - "Value": 256 - }, - { - "Name": "plc_line", - "Value": 32 - }, - { - "Name": "plc_line~Rail_0", - "Value": 257 - }, - { - "Name": "plc_line~plc_line", - "Value": 48 - }, - { - "Name": "plc_line~plc_line~ plc_line", - "Value": 49 - }, - { - "Name": "plc_line~plc_line~CPU display_1", - "Value": 54 - }, - { - "Name": "plc_line~plc_line~CPU exec unit_1", - "Value": 52 - }, - { - "Name": "plc_line~plc_line~Card reader/writer_1", - "Value": 51 - }, - { - "Name": "plc_line~plc_line~DP interface_1", - "Value": 60 - }, - { - "Name": "plc_line~plc_line~LicenseManager_1", - "Value": 42 - }, - { - "Name": "plc_line~plc_line~OPC UA_1", - "Value": 117 - }, - { - "Name": "plc_line~plc_line~PROFINET interface_2", - "Value": 72 - }, - { - "Name": "plc_line~plc_line~PROFINET interface_2~Port_1", - "Value": 73 - }, - { - "Name": "plc_line~plc_line~Virtual communication interface", - "Value": 135 - }, - { - "Name": "plc_line~plc_line~plc_line", - "Value": 50 - }, - { - "Name": "plc_line~plc_line~profinet_x1", - "Value": 64 - }, - { - "Name": "plc_line~plc_line~profinet_x1~Port1", - "Value": 65 - }, - { - "Name": "plc_line~plc_line~profinet_x1~Port2", - "Value": 66 - } - ] -} \ No newline at end of file diff --git a/axopen.template.simple/ax/hwc/hwc.gen/plc_line.IoAddresses.json b/axopen.template.simple/ax/hwc/hwc.gen/plc_line.IoAddresses.json deleted file mode 100644 index e91385c..0000000 --- a/axopen.template.simple/ax/hwc/hwc.gen/plc_line.IoAddresses.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "Version": 1, - "IoAddresses": [] -} \ No newline at end of file diff --git a/axopen.template.simple/ax/hwc/hwc.gen/plc_line.SecurityConfiguration.json b/axopen.template.simple/ax/hwc/hwc.gen/plc_line.SecurityConfiguration.json deleted file mode 100644 index 51fbb31..0000000 --- a/axopen.template.simple/ax/hwc/hwc.gen/plc_line.SecurityConfiguration.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "PKIData": "AQAAAAAAAAAAAAAAAAAAAAEBAVIkAAAAAAAAAAAAAAAAAwAAAKoBLS0tLS1CRUdJTiBSU0EgUFVCTElDIEtFWS0tLS0tCk1JSUJDZ0tDQVFFQTJib0Y0anNWd29DL05zMnNjWmFLRVpKOENQNS9jcjNnMzNITkhaWms2U3dOV0VRbVlzWEkKZEI0MmR2MGlmYmdDQUZQdEMrQWpJYW80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eEQxcjRCL2JIU3J0VmdIZ05ocHFia2hkREduVmVFMzJGbEc0Z25JdzBxMGZkTmp6cXpqTXAKRkNsR1daRi9pdTZ6aVAyN0FRa3Z5S253SGJqQ3B1MmtaUTZ0U096Ty9oKzlWLzJIbEFFN3B2Qk9RRlloOUk5MQpGSWt2aWpuc2F1WHp0QkcxMnoyc1lMQ2JYTmJVc1p4MHo3UGhkZ3VveERnelhaYzZCaUZJWXVLbHh2Z1c2bGFICjdpdmRYZGd0WGtjSWRQVzZhVkMxWTlpdDQxWjJORXEvQUxGSmh0UjFIcWt1SUluR2RKK3VyOU40YnRjQ3BWOGUKNnFEcm1uelRBdk5KWmtldlZ4YkIxVkZycnZQZ21WeDNKNXpEMStvTVh0YVhVTnZaRk50S2FqUDY5alc2TWliMgp1V1UzbUFaeXRJSC93QU56cGdacmJvMW9rS3NVYU0zSlFyYUZtOGJLQjJaVgotLS0tLUVORCBFTkNSWVBURUQgUFJJVkFURSBLRVktLS0tLQoA", - "UserData": "AgAAAAAAAAAAAAAAAAAAAAEAAAADAGFkbXQAAAABAAABAQABBQAAJxAAAAAgHL9gauNln0QTjCSpKj/OblQ6kdbrsr3oiyGmoLGNtxkAAABA01XkmGEWdSGcNUwigVjxEk//hNA/k+0mtlyW6swXLDhmJ99zv/f5PeNrkXgrGhkW8296xo31peZvv/rGVxEUrwA=", - "CertificateAssignments": { - "TLS": 1, - "WebServer": 2 - } -} \ No newline at end of file diff --git a/axopen.template.simple/ax/hwc/is7600.hwl.json b/axopen.template.simple/ax/hwc/is7600.hwl.json deleted file mode 100644 index 4cf5971..0000000 --- a/axopen.template.simple/ax/hwc/is7600.hwl.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "Devices": [ - { - "Name": "is7600", - "Modules":[ - { - "Name": "is7600", - "TypeIdentifier": { - "GsdId": "DAP20", - "FileName": "GSDML-V2.34-COGNEX-INSIGHTCLASSB-20200327.XML" - }, - "Interfaces": [ - { - "Name": "profinet", - "Label": "X1", - "Addresses": { - "Configured": [ - { "IPv4": "10.10.10.22/24" }, - { "ProfinetDeviceName": "is7600" } - ] - } - } - ] - }, - { - "Name": "Acquisition_Control", - "TypeIdentifier": { - "GsdId": "101", - "FileName": "GSDML-V2.34-COGNEX-INSIGHTCLASSB-20200327.XML" - }, - "Slot": 1 - }, - { - "Name": "Acquisition_Status", - "TypeIdentifier": { - "GsdId": "201", - "FileName": "GSDML-V2.34-COGNEX-INSIGHTCLASSB-20200327.XML" - }, - "Slot": 2 - }, - { - "Name": "Inspection_Control", - "TypeIdentifier": { - "GsdId": "102", - "FileName": "GSDML-V2.34-COGNEX-INSIGHTCLASSB-20200327.XML" - }, - "Slot": 3 - }, - { - "Name": "Inspection_Status", - "TypeIdentifier": { - "GsdId": "203", - "FileName": "GSDML-V2.34-COGNEX-INSIGHTCLASSB-20200327.XML" - }, - "Slot": 4 - }, - { - "Name": "Command_Control", - "TypeIdentifier": { - "GsdId": "107", - "FileName": "GSDML-V2.34-COGNEX-INSIGHTCLASSB-20200327.XML" - }, - "Slot": 5 - }, - { - "Name": "SoftEvent_Control", - "TypeIdentifier": { - "GsdId": "106", - "FileName": "GSDML-V2.34-COGNEX-INSIGHTCLASSB-20200327.XML" - }, - "Slot": 6 - }, - { - "Name": "User_Data-64_bytes", - "TypeIdentifier": { - "GsdId": "303", - "FileName": "GSDML-V2.34-COGNEX-INSIGHTCLASSB-20200327.XML" - }, - "Slot": 7 - }, - { - "Name": "Result_Data-64_bytes", - "TypeIdentifier": { - "GsdId": "403", - "FileName": "GSDML-V2.34-COGNEX-INSIGHTCLASSB-20200327.XML" - }, - "Slot": 8 - } - ] - } - ] -} \ No newline at end of file diff --git a/axopen.template.simple/ax/hwc/plc_line.hwl.json b/axopen.template.simple/ax/hwc/plc_line.hwl.json deleted file mode 100644 index 58bd655..0000000 --- a/axopen.template.simple/ax/hwc/plc_line.hwl.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "Devices": [ - { - "Name": "plc_line", - "Modules": [ - { - "Apply": { - "TemplateName": "PLC_1516_v3_1", - "Arguments": { - "PLCName": "plc_line", - "IpAddress": "192.168.0.4/24" - } - } - } - ] - } - ], - "IoSystems": [ - { - "Name": "profinet_plc_line", - "ControllerInterfaces": [ - { "Ref": "plc_line/plc_line/profinet_x1" } - ] - } - ] - } - \ No newline at end of file diff --git a/axopen.template.simple/ax/hwc/plc_line.hwl.yml b/axopen.template.simple/ax/hwc/plc_line.hwl.yml new file mode 100644 index 0000000..2493e19 --- /dev/null +++ b/axopen.template.simple/ax/hwc/plc_line.hwl.yml @@ -0,0 +1,16 @@ +Devices: +- Name: plc_line + Modules: + - Apply: + TemplateName: 6ES7516-3AP03-0AB0_v3_1 + Arguments: + PLCName: plc_line + IpAddress_X1: 10.10.10.120/24 + ProfinetDeviceName_X1: plc_line_x1 +IoSystems: +- Name: profinet_plc_line + ControllerInterfaces: + - Ref: plc_line/plc_line/profinet_x1 + # DeviceInterfaces: + # - Ref: RobotBasicIO/RobotBasicIO/profinet + # - Ref: OmniCore/OmniCore/profinet diff --git a/axopen.template.simple/ax/hwc/reader-st1.hwl.json b/axopen.template.simple/ax/hwc/reader-st1.hwl.json deleted file mode 100644 index 557e6db..0000000 --- a/axopen.template.simple/ax/hwc/reader-st1.hwl.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "Devices": [ - { - "Name": "reader-st1", - "Modules":[ - { - "Name": "reader-st1", - "TypeIdentifier": { - "GsdId": "DAP46", - "FileName": "GSDML-V2.42-COGNEX-DATAMANCLASSB-20220124.XML" - }, - "Interfaces": [ - { - "Name": "profinet", - "Label": "X1", - "Addresses": { - "Configured": [ - { "IPv4": "10.10.10.13/24" }, - { "ProfinetDeviceName": "reader-st1" } - ] - } - } - ] - }, - { - "Name": "Acquisition_Control", - "TypeIdentifier": { - "GsdId": "101", - "FileName": "GSDML-V2.42-COGNEX-DATAMANCLASSB-20220124.XML" - }, - "Slot": 1 - }, - { - "Name": "Acquisition_Status", - "TypeIdentifier": { - "GsdId": "201", - "FileName": "GSDML-V2.42-COGNEX-DATAMANCLASSB-20220124.XML" - }, - "Slot": 2 - }, - { - "Name": "Results_Control", - "TypeIdentifier": { - "GsdId": "102", - "FileName": "GSDML-V2.42-COGNEX-DATAMANCLASSB-20220124.XML" - }, - "Slot": 3 - }, - { - "Name": "Results_Status", - "TypeIdentifier": { - "GsdId": "202", - "FileName": "GSDML-V2.42-COGNEX-DATAMANCLASSB-20220124.XML" - }, - "Slot": 4 - }, - { - "Name": "Soft_Event_Control", - "TypeIdentifier": { - "GsdId": "105", - "FileName": "GSDML-V2.42-COGNEX-DATAMANCLASSB-20220124.XML" - }, - "Slot": 5 - }, - { - "Name": "User_Data-128_bytes", - "TypeIdentifier": { - "GsdId": "304", - "FileName": "GSDML-V2.42-COGNEX-DATAMANCLASSB-20220124.XML" - }, - "Slot": 6 - }, - { - "Name": "Result_Data-128_bytes", - "TypeIdentifier": { - "GsdId": "404", - "FileName": "GSDML-V2.42-COGNEX-DATAMANCLASSB-20220124.XML" - }, - "Slot": 7 - } - ] - } - ] -} \ No newline at end of file diff --git a/axopen.template.simple/ax/hwc/reader-st2.hwl.json b/axopen.template.simple/ax/hwc/reader-st2.hwl.json deleted file mode 100644 index 6e673f4..0000000 --- a/axopen.template.simple/ax/hwc/reader-st2.hwl.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "Devices": [ - { - "Name": "reader-st2", - "Modules":[ - { - "Name": "reader-st2", - "TypeIdentifier": { - "GsdId": "DAP8", - "FileName": "GSDML-V2.31-COGNEX-DATAMAN-20170215.XML" - }, - "Interfaces": [ - { - "Name": "profinet", - "Label": "X1", - "Addresses": { - "Configured": [ - { "IPv4": "10.10.10.50/24" }, - { "ProfinetDeviceName": "reader-st2" } - ] - } - } - ] - }, - { - "Name": "Acquisition_Control", - "TypeIdentifier": { - "GsdId": "101", - "FileName": "GSDML-V2.31-COGNEX-DATAMAN-20170215.XML" - }, - "Slot": 1 - }, - { - "Name": "Acquisition_Status", - "TypeIdentifier": { - "GsdId": "201", - "FileName": "GSDML-V2.31-COGNEX-DATAMAN-20170215.XML" - }, - "Slot": 2 - }, - { - "Name": "Results_Control", - "TypeIdentifier": { - "GsdId": "102", - "FileName": "GSDML-V2.31-COGNEX-DATAMAN-20170215.XML" - }, - "Slot": 3 - }, - { - "Name": "Results_Status", - "TypeIdentifier": { - "GsdId": "202", - "FileName": "GSDML-V2.31-COGNEX-DATAMAN-20170215.XML" - }, - "Slot": 4 - }, - { - "Name": "Soft_Event_Control", - "TypeIdentifier": { - "GsdId": "105", - "FileName": "GSDML-V2.31-COGNEX-DATAMAN-20170215.XML" - }, - "Slot": 5 - }, - { - "Name": "User_Data-64_bytes", - "TypeIdentifier": { - "GsdId": "303", - "FileName": "GSDML-V2.31-COGNEX-DATAMAN-20170215.XML" - }, - "Slot": 6 - }, - { - "Name": "Result_Data-64_bytes", - "TypeIdentifier": { - "GsdId": "403", - "FileName": "GSDML-V2.31-COGNEX-DATAMAN-20170215.XML" - }, - "Slot": 7 - } - ] - } - ] -} \ No newline at end of file diff --git a/axopen.template.simple/ax/hwc/ureol2l.hwl.json b/axopen.template.simple/ax/hwc/ureol2l.hwl.json deleted file mode 100644 index 5e7d98b..0000000 --- a/axopen.template.simple/ax/hwc/ureol2l.hwl.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "Devices": [ - { - "Name": "ureol2l", - "Modules":[ - { - "Name": "ureol2l", - "TypeIdentifier": { - "GsdId": "DAP 1", - "FileName": "GSDML-V2.31-UR-UR-20160505.XML" - }, - "Interfaces": [ - { - "Name": "profinet", - "Label": "X1", - "Addresses": { - "Configured": [ - { "IPv4": "10.10.10.61/24" }, - { "ProfinetDeviceName": "ureol2l" } - ] - } - } - ] - }, - { - "Name": "1_T2O_State", - "TypeIdentifier": { - "GsdId": "ID_Mod_11", - "FileName": "GSDML-V2.31-UR-UR-20160505.XML" - } - }, - { - "Name": "2_T2O_IO", - "TypeIdentifier": { - "GsdId": "ID_Mod_12", - "FileName": "GSDML-V2.31-UR-UR-20160505.XML" - } - }, - { - "Name": "3_T2O_Joints", - "TypeIdentifier": { - "GsdId": "ID_Mod_13", - "FileName": "GSDML-V2.31-UR-UR-20160505.XML" - } - }, - { - "Name": "4_T2O_TCP", - "TypeIdentifier": { - "GsdId": "ID_Mod_14", - "FileName": "GSDML-V2.31-UR-UR-20160505.XML" - } - }, - { - "Name": "5_T2O_General_Purpose_Bit_Registers", - "TypeIdentifier": { - "GsdId": "ID_Mod_15", - "FileName": "GSDML-V2.31-UR-UR-20160505.XML" - } - }, - { - "Name": "6_T2O_General_Purpose_Int_Registers", - "TypeIdentifier": { - "GsdId": "ID_Mod_16", - "FileName": "GSDML-V2.31-UR-UR-20160505.XML" - } - }, - { - "Name": "7_T2O_General_Purpose_Float_Registers", - "TypeIdentifier": { - "GsdId": "ID_Mod_17", - "FileName": "GSDML-V2.31-UR-UR-20160505.XML" - } - }, - { - "Name": "8_O2T_Robot_IO", - "TypeIdentifier": { - "GsdId": "ID_Mod_18", - "FileName": "GSDML-V2.31-UR-UR-20160505.XML" - } - }, - { - "Name": "9_O2T_General_Purpose_Registers_1", - "TypeIdentifier": { - "GsdId": "ID_Mod_19", - "FileName": "GSDML-V2.31-UR-UR-20160505.XML" - } - }, - { - "Name": "10_O2T_General_Purpose_Registers_2", - "TypeIdentifier": { - "GsdId": "ID_Mod_20", - "FileName": "GSDML-V2.31-UR-UR-20160505.XML" - } - } - ] - } - ] -} diff --git a/axopen.template.simple/scripts/all.sh b/axopen.template.simple/scripts/all.sh index 06aaf38..6902084 100644 --- a/axopen.template.simple/scripts/all.sh +++ b/axopen.template.simple/scripts/all.sh @@ -1,5 +1,5 @@ -if [ "$#" -ne 3 ]; then - echo "Usage: $0 " +if [ "$#" -ne 5 ]; then + echo "Usage: $0 " exit 1 fi @@ -22,14 +22,68 @@ if [ -z $PLATFORM ]; then exit 1 fi -#apax run ci # clean and install dependencies -apax clean -apax install +USERNAME=$4 +if [ -z $USERNAME ]; then + echo "The USERNAME could not be an empty string." + exit 1 +fi + +PASSWORD=$5 +if [ -z $PASSWORD ]; then + echo "The PASSWORD could not be an empty string." + exit 1 +fi + +export GREEN='\033[0;32m' +export RED='\033[0;31m' +export NC='\033[0m' # No Color + + +certfile="./certs/$PLC_NAME/$PLC_NAME.cer" +if ! [[ -e "$certfile" ]]; then + printf "${RED}Certification file $certfile does not exist.\r\n${NC}" + #alf #clear plc except ip and name and provide all actions for install all, build and initial download hw so as sw + alf=$( dirname ${BASH_SOURCE[0]})"\\all_first.sh" + $alf $PLC_NAME $PLC_IP_ADDRESS $PLATFORM $USERNAME $PASSWORD +else + check_requisites_apax_script=$( dirname ${BASH_SOURCE[0]})"\\check_requisites_apax.sh" + if ! $check_requisites_apax_script ; then + exit 1 + fi + + check_requisites_nuget_script=$( dirname ${BASH_SOURCE[0]})"\\check_requisites_nuget.sh" + if ! $check_requisites_nuget_script ; then + exit 1 + fi + + plcsim_script=$( dirname ${BASH_SOURCE[0]})"\\plcsim.sh" + $plcsim_script + + #apax run ci # clean and install dependencies + apax clean + apax install + + is_cert_hash_sha1_equal_script=$( dirname ${BASH_SOURCE[0]})"\\is_cert_hash_sha1_equal.sh" + if ! $is_cert_hash_sha1_equal_script "$PLC_NAME" "$PLC_IP_ADDRESS"; then + printf "${RED}Certification file $certfile exists, but its sha1 hash is different to the PLC's one.\r\n" + printf "${RED}It has to be regenerated again.\r\n${NC}" + #alf #clear plc except ip and name and provide all actions for install all, build and initial download hw so as sw + alf=$( dirname ${BASH_SOURCE[0]})"\\all_first.sh" + $alf $PLC_NAME $PLC_IP_ADDRESS $PLATFORM $USERNAME $PASSWORD + else + + printf "${GREEN}Certification file $certfile exists and its sha1 hash is equal to the PLC's one.\r\n" + printf "${GREEN}No prompt will popup during execution, so you could leave your PC and enjoy your coffee now.\r\n${NC}" + + + #hw_update # copy and install gsd, copy templates, compile, copy the HwIds, download HW using certificate + hw_update=$( dirname ${BASH_SOURCE[0]})"\\hw_update.sh" + $hw_update $PLC_NAME $PLC_IP_ADDRESS + + #sw_build_and_download_full # software build and full download + sw_build_and_download_full=$( dirname ${BASH_SOURCE[0]})"\\sw_build_and_download_full.sh" + $sw_build_and_download_full $PLC_NAME $PLC_IP_ADDRESS $PLATFORM + fi +fi -#hw_update # copy and install gsd, copy templates, compile, copy the HwIds, download HW using certificate -hw_update=$( dirname ${BASH_SOURCE[0]})"\\hw_update.sh" -$hw_update $PLC_NAME $PLC_IP_ADDRESS -#sw_build_and_download_full # software build and full download -sw_build_and_download_full=$( dirname ${BASH_SOURCE[0]})"\\sw_build_and_download_full.sh" -$sw_build_and_download_full $PLC_NAME $PLC_IP_ADDRESS $PLATFORM diff --git a/axopen.template.simple/scripts/all_first.sh b/axopen.template.simple/scripts/all_first.sh index 38ab248..dd1c4d4 100644 --- a/axopen.template.simple/scripts/all_first.sh +++ b/axopen.template.simple/scripts/all_first.sh @@ -34,6 +34,25 @@ if [ -z $PASSWORD ]; then exit 1 fi +export GREEN='\033[0;32m' +export RED='\033[0;31m' +export NC='\033[0m' # No Color + +printf "${RED}This command will prompt during execution, so do not leave your PC. You can enjoy your coffee afterward.\r\n${NC}" + +check_requisites_apax_script=$( dirname ${BASH_SOURCE[0]})"\\check_requisites_apax.sh" +if ! $check_requisites_apax_script ; then + exit 1 +fi + +check_requisites_nuget_script=$( dirname ${BASH_SOURCE[0]})"\\check_requisites_nuget.sh" +if ! $check_requisites_nuget_script ; then + exit 1 +fi + +plcsim_script=$( dirname ${BASH_SOURCE[0]})"\\plcsim.sh" +$plcsim_script + #apax run ci # clean and install dependencies apax clean apax install diff --git a/axopen.template.simple/scripts/check_requisites_apax.sh b/axopen.template.simple/scripts/check_requisites_apax.sh new file mode 100644 index 0000000..07fc94c --- /dev/null +++ b/axopen.template.simple/scripts/check_requisites_apax.sh @@ -0,0 +1,96 @@ +#!/bin/bash +apaxUrl="https://console.simatic-ax.siemens.io/" +expectedApaxVersion="3.4.1" + +export GREEN='\033[0;32m' +export RED='\033[0;31m' +export NC='\033[0m\r\n' # No Color+CRLF + +# Function to check if the apax is installed +is_apax_installed(){ + # Try to get the apax version + apaxVersion=$(apax --version 2>/dev/null) + + if [[ $? -eq 0 ]]; then + printf "${GREEN}Apax installed.${NC}" + return 0 + else + printf "${RED}Apax is not installed or not found in PATH. You need to have a valid SIMATIC-AX license.${NC}" + return 1 + fi +} + +# Function to check if the if the apax version matches +is_apax_version_equal(){ + local expected=$1 + # Get the apax version + apaxVersion=$(apax --version 2>/dev/null) + + if [[ "$apaxVersion" == "$expected" ]]; then + printf "${GREEN}Apax $expected detected.${NC}" + return 0 + else + printf "${RED}Apax version mismatch. Expected $expected but found $apaxVersion.${NC}" + printf "${RED}Run apax self-update $expected.${NC}" + return 1 + fi +} + +# Function to check if the if the apax site is accessible +is_apax_site_accessible(){ + # Just check the access by trying to get the feed + response=$(curl -L -s -o /dev/null -w "%{http_code}" "$apaxUrl") + + if [[ "$response" -eq 200 ]]; then + printf "${GREEN}Feed: $apaxUrl accessible by means of network.${NC}" + return 0 + else + printf "${RED}Failed to access feed: $apaxUrl. Error: HTTP status $response.${NC}" + printf "${RED}Try to access it manually, check your connection, firewall settings, credentials, etc.${NC}" + return 1 + fi +} + +# Function to check for valid access to the apax registries +has_access_to_apax_registries(){ + command="apax info --ax-scopes" + output=$(eval "$command 2>&1") + if echo "$output" | grep -q "No access to the Simatic-AX registry"; then + printf "${RED}Unable to access apax registries. Check your connections, firewall, credentials etc.${NC}" + printf "${RED}$output.${NC}" + return 1 + else + printf "${GREEN}Apax registries are accessible.${NC}" + return 0 + fi +} + +# Check if the correct number of arguments are provided +if [ "$#" -ne 0 ]; then + printf "${RED}Invalid number of parameters.${NC}" + printf "${RED}Usage: $0 ${NC}" + exit 1 +fi + +if ! is_apax_installed ; then + printf "${RED}Apax is not installed or not found in PATH. You need to have a valid SIMATIC-AX license.${NC}" + exit 1 +elif ! is_apax_version_equal "$expectedApaxVersion" ; then + printf "${RED}Apax installed, but version found does not match the verion required $expectedApaxVersion.${NC}" + exit 1 +else + printf "${GREEN}Apax installed, verion matches required $expectedApaxVersion.${NC}" + if ! is_apax_site_accessible ; then + printf "${RED}Failed to access feed: $apaxUrl. Error: HTTP status $response.${NC}" + printf "${RED}Try to access it manually, check your connection, firewall settings, credentials, etc.${NC}" + exit 1 + elif ! has_access_to_apax_registries ; then + printf "${RED}Feed: $apaxUrl accessible by means of network,${NC}" + printf "${RED}but there is no access to the apax registries.${NC}" + printf "${RED}Check your connection, firewall settings, credentials, etc.${NC}" + exit 1 + else + printf "${GREEN}Apax registries accessible, credentials verified.${NC}" + exit 0 + fi +fi diff --git a/axopen.template.simple/scripts/check_requisites_nuget.sh b/axopen.template.simple/scripts/check_requisites_nuget.sh new file mode 100644 index 0000000..a5e3fec --- /dev/null +++ b/axopen.template.simple/scripts/check_requisites_nuget.sh @@ -0,0 +1,82 @@ +#!/bin/bash +feedUrl="https://nuget.pkg.github.com/ix-ax/index.json" + +export GREEN='\033[0;32m' +export RED='\033[0;31m' +export NC='\033[0m\r\n' # No Color+CRLF + +# Set headers +#userToken="your_token_here" # Replace with actual user token +headers=( + -H "Authorization: Bearer $userToken" + -H "User-Agent: Bash" + -H "Accept: application/vnd.github.package-preview+json" +) + + +# Check if the feed is added +is_feed_already_added(){ + feeds=$(dotnet nuget list source) + + if echo "$feeds" | grep -q "$feedUrl"; then + printf "${GREEN}The NuGet feed with URL $feedUrl is already added.${NC}" + return 0 + else + printf "${RED}The NuGet feed with URL $feedUrl is not added.${NC}" + printf "${RED}You will need to add $feedUrl to your nuget sources manually (more information in src/README.md).${NC}" + return 1 + fi +} +# Check if the feed is accessible by means of network +has_feed_access(){ + response=$(curl -s "${headers[@]}" -w "%{http_code}" -o /dev/null "$feedUrl") + if [[ "$response" -eq 200 ]]; then + printf "${GREEN}Feed: $feedUrl accessible by means of network.${NC}" + return 0 + else + printf "${RED}Failed to access feed: $feedUrl. Error: HTTP status $response.${NC}" + printf "${RED}Try to access it manually, check your connection, firewall settings, etc.${NC}" + return 1 + fi +} + +# Check if the feed is authorized +has_feed_authorization_passed(){ + if dotnet tool update axsharp.ixc --prerelease; then + printf "${GREEN}Authentication passed successfully while accessing feed $feedUrl.${NC}" + return 0 + else + printf "${RED}Authentication failed while accessing feed $feedUrl.${NC}" + return 1 + fi +} + +# Check if the correct number of arguments are provided +if [ "$#" -ne 0 ]; then + printf "${RED}Invalid number of parameters.${NC}" + printf "${RED}Usage: $0 ${NC}" + exit 1 +fi + + +# If any of the checks failed, provide manual instructions +if ! is_feed_already_added || ! has_feed_access || ! has_feed_authorization_passed ; then + nugetGuide=$(cat < " + exit 1 +fi + +PLC_NAME=$1 +if [ -z $PLC_NAME ]; then + echo "The PLC_NAME could not be an empty string." + exit 1 +fi + +PLC_IP_ADDRESS=$2 +validate_script=$( dirname ${BASH_SOURCE[0]})"/validate_ip.sh" +if ! $validate_script "$PLC_IP_ADDRESS"; then + echo "The PLC_IP_ADDRESS '$PLC_IP_ADDRESS' is not a valid IP address." + exit 1 +fi + +# Validate the input parameter +if ! is_cert_hash_sha1_equal "$1" "$2"; then + echo "The hash of the stored certification file: $certfile and the certificate inside the PLC with IP address: $PLC_IP_ADDRESS are different." + exit 1 +else + echo "The hash of the stored certification file: $certfile and the certificate inside the PLC with IP address: $PLC_IP_ADDRESS are equal." + exit 0 +fi diff --git a/axopen.template.simple/scripts/plcsim.sh b/axopen.template.simple/scripts/plcsim.sh new file mode 100644 index 0000000..5340740 --- /dev/null +++ b/axopen.template.simple/scripts/plcsim.sh @@ -0,0 +1,18 @@ +use_plcsim=AXUSEPLCSIM +use_plcsim_value=$(printenv "$use_plcsim") + +if [ -z "$use_plcsim_value" ]; then + echo "Environment variable '$use_plcsim' is not set." +else + echo "The value of '$use_plcsim' is: $use_plcsim_value" + + if [ "$(echo 'true' | tr '[:upper:]' '[:lower:]')" == "$(echo "$use_plcsim_value" | tr '[:upper:]' '[:lower:]')" ]; then + plcsimscript=$( dirname ${BASH_SOURCE[0]})"\\StartPlcSimAdvCli.exe" + $plcsimscript + status=$? + if [ $status -ne 0 ]; then + echo "Plcsim script failed with exit status $status." + fi + fi +fi + \ No newline at end of file diff --git a/axopen.template.simple/scripts/setup_secure_communication.sh b/axopen.template.simple/scripts/setup_secure_communication.sh index 2256126..a5431cb 100644 --- a/axopen.template.simple/scripts/setup_secure_communication.sh +++ b/axopen.template.simple/scripts/setup_secure_communication.sh @@ -26,7 +26,7 @@ if ! [[ -d "./hwc" ]]; then exit 1 fi -hwcfile=".\hwc\\${PLC_NAME}.hwl.json" +hwcfile=".\hwc\\${PLC_NAME}.hwl.yml" if [ ! -e $hwcfile ]; then echo "Hardware configuration file $hwcfile does not exist!!!" exit 1