Skip to content

Commit

Permalink
updates application templates (#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
PTKu authored Apr 16, 2024
1 parent 43b428a commit 5f817b8
Show file tree
Hide file tree
Showing 16 changed files with 1,116 additions and 637 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"AXSharp.ixc": {
"version": "0.17.0-alpha.169",
"version": "0.18.0-alpha.201",
"commands": [
"ixc"
]
Expand Down
12 changes: 5 additions & 7 deletions templates/working/templates/axsharpblazor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
### .NET


Go to [Entry.cs](axsharpblazor/Entry.cs) and setup the following parameters
Go to [Entry.[cs](axsharpblazor/Entry.cs) and set the following parameters

~~~C#
private const string TargetIp = "192.168.0.1"; // <- replace by IP of your target PLC
private const string TargetIp = "192.168.0.4"; // <- replace by IP of your target PLC
private const string UserName = "Everybody"; //<- replace by user name you have set up in your WebAPI settings
private const string Pass = ""; // <- Pass in the password that you have set up for the user. NOT AS PLAIN TEXT! Use user secrets instead.
private const bool IgnoreSslErrors = true; // <- When you have your certificates in order set this to false.
Expand All @@ -29,11 +29,9 @@ Go to [apax.yml](ax/apax.yml) file and adjust the parameters
.
.
.
scripts:
download :
# Here you will need to set the argument -t to your plc OP and -i to platform you are downloading to
# --default-server-interface is a must if you are using WebAPI
- apax sld --accept-security-disclaimer -t 192.168.0.1 -i .\\bin\\1500\\ -r --default-server-interface
variables:
AXTARGET: 192.168.0.4 # Replace with the IP of your target system.
AXTARGETPLATFORMINPUT: './bin/plcsim/' #Replace with respective target platform.
.
.
.
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"OutputProjectFolder":"..\\axsharpblazor.twin","UseBase":false,"NoDependencyUpdate":false,"IgnoreS7Pragmas":false,"ProjectFile":"axsharpblazor.csproj"}
{"OutputProjectFolder":"..\\ixsharpblazor.twin","UseBase":false,"NoDependencyUpdate":false,"IgnoreS7Pragmas":false,"ProjectFile":"axsharpblazor.csproj"}
565 changes: 377 additions & 188 deletions templates/working/templates/axsharpblazor/ax/apax-lock.json

Large diffs are not rendered by default.

20 changes: 9 additions & 11 deletions templates/working/templates/axsharpblazor/ax/apax.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,22 @@ name: "axsharpblazor"
version: 0.0.0
type: app
targets:
- "1500"
- axunit-llvm
- plcsim
- swcpu
- "1500"
- plcsim
devDependencies:
"@ax/sdk": 3.0.8
"@ax/sld": ^0.14.2
"@ax/sdk": 2311.0.3
variables:
APAX_BUILD_ARGS: [ -d ]
AXTARGET: 192.168.0.4 # Replace with the IP of your target system.
AXTARGETPLATFORMINPUT: './bin/plcsim/' #Replace with respective target platform.
APAX_BUILD_ARGS: [ -d ]

scripts:
ixc:
- dotnet tool restore --no-cache
- dotnet ixc -o ..\\ixsharpblazor.twin
postbuild: apax ixc
download :
- apax install
- apax build
# Here you will need to set the argumen -t to your plc OP and -i to platfrom you are dowloading to
# --default-server-interface is a must if you are using WebAPI
- apax sld --accept-security-disclaimer -t 192.168.0.4 -i .\\bin\\plcsim\\ -r --default-server-interface
- apax build
- apax sld load --accept-security-disclaimer -t $AXTARGET -i $AXTARGETPLATFORMINPUT -r

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>aspnet-ixsharpblazor-hmi-ee3150da-5237-49bc-b265-f512331ded6c</UserSecretsId>
Expand All @@ -17,7 +17,7 @@
<Content Include="Shared\Menu\ExpandableMenuItem.razor.css" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AXSharp.Presentation.Blazor.Controls" Version="0.17.0-alpha.169" />
<PackageReference Include="AXSharp.Presentation.Blazor.Controls" Version="0.18.0-alpha.201" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="7.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="7.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="7.0.2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace ixsharpblazor
public static class Entry
{
private const string TargetIp = "192.168.0.4"; // <- replace by your IP
private const string UserName = "Everybody"; //<- replace by user name you have set up in your WebAPI settings
private const string UserName = "Anonymous"; //<- replace by user name you have set up in your WebAPI settings
private const string Pass = ""; // <- Pass in the password that you have set up for the user. NOT AS PLAIN TEXT! Use user secrets instead.
private const bool IgnoreSslErrors = true; // <- When you have your certificates in order set this to false.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AXSharp.Abstractions" Version="0.17.0-alpha.169" />
<PackageReference Include="AXSharp.Connector" Version="0.17.0-alpha.169" />
<PackageReference Include="AXSharp.Abstractions" Version="0.18.0-alpha.201" />
<PackageReference Include="AXSharp.Connector" Version="0.18.0-alpha.201" />
</ItemGroup>
<ItemGroup>
<Compile Include=".g\**" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AXSharp.Abstractions" Version="0.17.0-alpha.169" />
<PackageReference Include="AXSharp.Connector" Version="0.17.0-alpha.169" />
<PackageReference Include="AXSharp.Connector.S71500.WebAPI" Version="0.17.0-alpha.169" />
<PackageReference Include="AXSharp.Abstractions" Version="0.18.0-alpha.201" />
<PackageReference Include="AXSharp.Connector" Version="0.18.0-alpha.201" />
<PackageReference Include="AXSharp.Connector.S71500.WebAPI" Version="0.18.0-alpha.201" />
</ItemGroup>
<ItemGroup>
<Compile Include=".g\**" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AXSharp.Abstractions" Version="0.17.0-alpha.169" />
<PackageReference Include="AXSharp.Connector" Version="0.17.0-alpha.169" />
<PackageReference Include="AXSharp.Abstractions" Version="0.18.0-alpha.201" />
<PackageReference Include="AXSharp.Connector" Version="0.18.0-alpha.201" />
</ItemGroup>
<ItemGroup>
<Compile Include=".g\**" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"AXSharp.ixc": {
"version": "0.17.0-alpha.169",
"version": "0.18.0-alpha.201",
"commands": [
"ixc"
]
Expand Down
17 changes: 6 additions & 11 deletions templates/working/templates/axsharpconsole/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
### .NET


Go to [Entry.cs](axsharpconsole.twin/Entry.cs) and setup the following parameters
Go to [Entry.[cs](axsharpconsole.twin/Entry.cs) and set the following parameters

~~~C#
private const string TargetIp = "192.168.0.1"; // <- replace by your IP
private const string UserName = "Everybody"; //<- replate by user name you have set up in your WebAPI settings
private const string UserName = "Everybody"; //<- replace by user name you have set up in your WebAPI settings
private const string Pass = ""; // <- Pass in the password that you have set up for the user. NOT AS PLAIN TEXT! Use user secrets instead.
private const bool IgnoreSslErrors = true; // <- When you have your certificates in order set this to false.
~~~

You will need to use TIA Portal to enable WebAPI interface [see here](https://console.simatic-ax.siemens.io/docs/hwld/PlcWebServer) and [here](https://youtu.be/d9EX2FixY1A?t=151) is a very informative youtube video.
You will need to use TIA Portal to enable WebAPI interface [see here](https://console.simatic-ax.siemens.io/docs/hwld/PlcWebServer) and [here](https://youtu.be/d9EX2FixY1A?t=151) is a very informative YouTube video.


### AX
Expand All @@ -28,14 +28,9 @@ Go to [apax.yml](ax/apax.yml) file and adjust the parameters
~~~yml
.
.
.
scripts:
download :
# Here you will need to set the argumen -t to your plc OP and -i to platfrom you are dowloading to
# --default-server-interface is a must if you are using WebAPI
- apax sld --accept-security-disclaimer -t 192.168.0.1 -i .\\bin\\1500\\ -r --default-server-interface
.
.
variables:
AXTARGET: 192.168.0.4 # Replace with the IP of your target system.
AXTARGETPLATFORMINPUT: './bin/plcsim/' #Replace with respective target platform.
.
.
~~~
Expand Down
Loading

0 comments on commit 5f817b8

Please sign in to comment.