Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. Microsoft Windows [Version 10.0.18363.1082]]
- ix version
- AX# version
- simatix-ax version (attach apax.yml file)
- hardware/software target type and version (e.g. S71516, PLCSIM Advanced)
- other tools used (visual studio, vscode)
Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Please describe the tests that you ran to verify your changes. Provide instructi
**Test Configuration**:

* simatix-ax version (apax.yml):
* ix version:
* AX# version:
* PLC Target system:
* PLC Firmware version:
* OS System:
Expand Down
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/ix.compiler/tests/Ix.ax.compilertests/bin/Debug/net6.0/Ix.ax.compilertests.dll",
"program": "${workspaceFolder}/src/AXSharp.compiler/tests/Ix.ax.compilertests/bin/Debug/net6.0/Ix.ax.compilertests.dll",
"args": [],
"cwd": "${workspaceFolder}/src/ix.compiler/tests/Ix.ax.compilertests",
"cwd": "${workspaceFolder}/src/AXSharp.compiler/tests/Ix.ax.compilertests",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
Expand Down
6 changes: 3 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "process",
"args": [
"build",
"${workspaceFolder}/src/ix.compiler/tests/Ix.ax.compilertests/Ix.ax.compilertests.csproj",
"${workspaceFolder}/src/AXSharp.compiler/tests/AXSharp.ax.compilertests/AXSharp.ax.compilertests.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
Expand All @@ -19,7 +19,7 @@
"type": "process",
"args": [
"publish",
"${workspaceFolder}/src/ix.compiler/tests/Ix.ax.compilertests/Ix.ax.compilertests.csproj",
"${workspaceFolder}/src/AXSharp.compiler/tests/AXSharp.ax.compilertests/AXSharp.ax.compilertests.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
Expand All @@ -33,7 +33,7 @@
"watch",
"run",
"--project",
"${workspaceFolder}/src/ix.compiler/tests/Ix.ax.compilertests/Ix.ax.compilertests.csproj"
"${workspaceFolder}/src/AXSharp.compiler/tests/AXSharp.ax.compilertests/AXSharp.ax.compilertests.csproj"
],
"problemMatcher": "$msCompile"
}
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Thank you for considering contributing to this project. This document will help

# Contributing

When contributing to this repository, please first discuss the change you wish to make via [issue](https://github.com/ix-ax/ix/issues) or open a [discussion](https://github.com/ix-ax/ix/discussions).
When contributing to this repository, please first discuss the change you wish to make via [issue](https://github.com/ix-ax/axsharp/issues) or open a [discussion](https://github.com/ix-ax/axsharp/discussions).

**IMPORTANT!!!** If you discover a **security issue do not disclose that information** in public spaces of the repo (issues, discussions), more info [here](SECURITY.md).

Expand Down
37 changes: 20 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
![](assets/pics/banner_wider.png)
![](docfx/images/banner_wider.png)

[![dev](https://github.com/ix-ax/ix/actions/workflows/dev.yml/badge.svg?branch=dev)](https://github.com/ix-ax/ix/actions/workflows/dev.yml)
[![preview](https://github.com/ix-ax/ix/actions/workflows/release.yml/badge.svg?branch=releases%2Fv0)](https://github.com/ix-ax/ix/actions/workflows/release.yml)
[![master](https://github.com/ix-ax/ix/actions/workflows/master.yml/badge.svg?branch=master)](https://github.com/ix-ax/ix/actions/workflows/master.yml)
[![dev](https://github.com/ix-ax/axsharp/actions/workflows/dev.yml/badge.svg?branch=dev)](https://github.com/ix-ax/axsharp/actions/workflows/dev.yml)
[![preview](https://github.com/ix-ax/axsharp/actions/workflows/release.yml/badge.svg?branch=releases%2Fv0)](https://github.com/ix-ax/axsharp/actions/workflows/release.yml)
[![master](https://github.com/ix-ax/axsharp/actions/workflows/master.yml/badge.svg?branch=master)](https://github.com/ix-ax/axsharp/actions/workflows/master.yml)
![semver](https://img.shields.io/badge/semver-0.10.0-blue)
[![GitHub license](https://badgen.net/github/license/Naereen/Strapdown.js)](https://github.com/ix-ax/ix/blob/master/LICENSE)
[![GitHub license](https://badgen.net/github/license/Naereen/Strapdown.js)](https://github.com/ix-ax/axsharp/blob/dev/LICENSE)

> **Warning**
> **We have just gone through project-wide refactoring changing the name from **IX** to **AX#** (AXSharp). Some links and documentation may still be using the IX and some links are still broken at this point. We are working hard on fixing those issues. Should any of these block you please feel free to reach out to the team.**

# IX

The **IX** is a series of tools that extend SIMATIC AX (Automation Xpansion) with a flexible and powerful connection with .NET ecosystem. IX includes a compiler (`ixc`) that translates PLC data structures into C# (PLC .NET Twin), which makes the PLC data available in a structured way for any .NET application. Furthermore, presentation libraries provide additional features for the automated rendering of PLC data in the UI/HMI.
# AX#

The **AX#** is a series of tools that extend SIMATIC AX (Automation Xpansion) with a flexible and powerful connection with .NET ecosystem. AX# includes a compiler (`ixc`) that translates PLC data structures into C# (PLC .NET Twin), which makes the PLC data available in a structured way for any .NET application. Furthermore, presentation libraries provide additional features for the automated rendering of PLC data in the UI/HMI.

## State of the project

This project is under development; however, we are [releasing versions](https://github.com/ix-ax/ix/releases) that you can play with before the release of the full version. This project follows [semantic versioning](https://semver.org/).
This project is under development; however, we are [releasing versions](https://github.com/ix-ax/axsharp/releases) that you can play with before the release of the full version. This project follows [semantic versioning](https://semver.org/).

All versions released with a major version number `0` (e.g. 0.10.0) can have breaking changes to the previous version at any moment. Stable versions will be released with a major version number greater than `0` (e.g. 1.2.1).

Expand All @@ -25,22 +28,22 @@ We plan to have production-ready libraries and tools in early spring 2024, that
- application templates for quick development and deployment.


**Documentation** is a work in progress should you find missing, unclear, or misleading content please feel free to [add an issue](https://github.com/ix-ax/ix/issues/new/choose) or to create a pull request with the fix you find appropriate.
**Documentation** is a work in progress should you find missing, unclear, or misleading content please feel free to [add an issue](https://github.com/ix-ax/axsharp/issues/new/choose) or to create a pull request with the fix you find appropriate.

There are some **known issues** that we are looking into in the development process. The list of known issues is [here](https://github.com/ix-ax/ix/issues?q=is%3Aissue+is%3Aopen+label%3Aknown-issue).
There are some **known issues** that we are looking into in the development process. The list of known issues is [here](https://github.com/ix-ax/axsharp/issues?q=is%3Aissue+is%3Aopen+label%3Aknown-issue).



**IX** is the underlying technology for the [ix.framework](https://github.com/ix-ax/ix.framework) that will be rendered public in this organization and will provide a series of libraries and components for building automation projects.
**AX#** is the underlying technology for the [AXOpen](https://github.com/ix-ax/ix.framework) that will be rendered public in this organization and will provide a series of libraries and components for building automation projects.

## Disclaimer

**It is necessary to have a valid license for SIMATIC AX in order to use IX!**
**It is necessary to have a valid license for SIMATIC AX in order to use AX#!**
SIMATIC AX is currently in a limited sales release in selected European countries only. You will need to request access from the AX team which will check if your use case is suitable for the current state of the product. The first step to getting the approval is contacting your local SIEMENS sales representative or writing an email to [simatic-ax@siemens.com](mailto:simatic-ax@siemens.com?subject=Request%20for%20access%20|%20SIMATIC%20AX%20for%20IX).

## How it works

In simple terms, the IX takes the PLC program and translates the data structured into .NET classes.
In simple terms, the AX# takes the PLC program and translates the data structured into .NET classes.

### Write PLC code

Expand Down Expand Up @@ -72,13 +75,13 @@ END_CLASS

~~~ C#
using System;
using Ix.Connector;
using Ix.Connector.ValueTypes;
using AXSharp.Connector;
using AXSharp.Connector.ValueTypes;
using System.Collections.Generic;

[Container(Layout.Stack)]
[Group(Layout.GroupBox)]
public partial class GeoLocation : Ix.Connector.ITwinObject
public partial class GeoLocation : AXSharp.Connector.ITwinObject
{
public OnlinerReal Latitude { get; }

Expand Down Expand Up @@ -123,7 +126,7 @@ To get started, visit the documentation [here](docfx/index.md#getting-started).

## Examples

Examples can be found [here](src/ix.examples)
Examples can be found [here](src/AXSharp.examples)


## Contributing
Expand Down
Binary file modified assets/icons/icon_128_128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/pics/banner_wider.png
Binary file not shown.
2 changes: 1 addition & 1 deletion cake/Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\src\ix.tools\src\ix.nuget.update\ix.nuget.update.csproj" />
<ProjectReference Include="..\src\AXSharp.tools\src\AXSharp.nuget.update\AXSharp.nuget.update.csproj" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion cake/Build.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ VisualStudioVersion = 17.3.32804.467
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Build", "Build.csproj", "{1053D477-9B92-4A29-975E-9F8F820293E9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ix.nuget.update", "..\src\ix.tools\src\ix.nuget.update\ix.nuget.update.csproj", "{FA3B561C-2FC6-4C5F-AC30-015BFAB01D83}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AXSharp.nuget.update", "..\src\AXSharp.tools\src\AXSharp.nuget.update\AXSharp.nuget.update.csproj", "{FA3B561C-2FC6-4C5F-AC30-015BFAB01D83}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
107 changes: 102 additions & 5 deletions cake/BuildContext.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
// Build
// Copyright (c) 2023 Peter Kurhajec (PTKu), MTS, and Contributors. All Rights Reserved.
// Contributors: https://github.com/ix-ax/ix/graphs/contributors
// Contributors: https://github.com/ix-ax/axsharp/graphs/contributors
// See the LICENSE file in the repository root for more information.
// https://github.com/ix-ax/ix/blob/master/LICENSE
// Third party licenses: https://github.com/ix-ax/ix/blob/master/notices.md
// https://github.com/ix-ax/axsharp/blob/dev/LICENSE
// Third party licenses: https://github.com/ix-ax/axsharp/blob/master/notices.md

using System.Collections.Generic;
using System.IO;
using System.Linq;
using Build.FilteredSolution;
using Cake.Common.Tools.DotNet;
using Cake.Common.Tools.DotNet.Build;
using Cake.Common.Tools.DotNet.MSBuild;
using Cake.Common.Tools.DotNet.Run;
using Cake.Common.Tools.DotNet.Test;
using Cake.Common.Tools.DotNetCore.MSBuild;
using Cake.Core;
using Cake.Core.Diagnostics;
using Cake.Core.IO;
using Cake.Frosting;
using Path = System.IO.Path;

public class BuildContext : FrostingContext
{
Expand All @@ -28,7 +33,7 @@ public class BuildContext : FrostingContext

public string DocumentationSource => Path.GetFullPath(Path.Combine(Environment.WorkingDirectory.FullPath, "..//docfx//"));

public string RootDir => Path.GetFullPath(Path.Combine(Environment.WorkingDirectory.FullPath, "..//src//"));
public string ScrDir => Path.GetFullPath(Path.Combine(Environment.WorkingDirectory.FullPath, "..//src//"));

public Cake.Common.Tools.DotNet.Build.DotNetBuildSettings DotNetBuildSettings { get; }

Expand Down Expand Up @@ -68,12 +73,104 @@ public BuildContext(ICakeContext context, BuildParameters buildParameters)
DotNetRunSettings = new DotNetRunSettings()
{
Verbosity = buildParameters.Verbosity,
Framework = "net6.0",
Framework = "net7.0",
Configuration = buildParameters.Configuration,
NoBuild = true,
NoRestore = true,
};
}

public void UploadTestPlc(string workingDirectory, string targetIp,
string targetPlatform)
{

this.Log.Information($"Installing dependencies for ax project '{workingDirectory}' at {targetIp}");

this.ProcessRunner.Start(Helpers.GetApaxCommand(), new ProcessSettings()
{
Arguments = " install -L",
WorkingDirectory = workingDirectory,
RedirectStandardOutput = false,
RedirectStandardError = false,
Silent = false
}).WaitForExit();


this.Log.Information($"Building ax project '{workingDirectory}' at {targetIp}");


this.ProcessRunner.Start(Helpers.GetApaxCommand(), new ProcessSettings()
{
Arguments = " apax build",
WorkingDirectory = workingDirectory,
RedirectStandardOutput = false,
RedirectStandardError = false,
RedirectedStandardOutputHandler = (a) => string.Join(System.Environment.NewLine, a),
Silent = false
}).WaitForExit();


this.Log.Information($"Uploading ax project '{workingDirectory}' at {targetIp}");

this.ProcessRunner.Start(Helpers.GetApaxCommand(), new ProcessSettings()
{
Arguments =
$" sld -t {targetIp} -i {targetPlatform} --accept-security-disclaimer --default-server-interface -r",
WorkingDirectory = workingDirectory,
RedirectStandardOutput = false,
RedirectStandardError = false
}).WaitForExit();
}

public void RunTestsFromFilteredSolution(string filteredSolutionFile)
{
foreach (var project in FilteredSolution.Parse(filteredSolutionFile).solution.projects
.Select(p => new FileInfo(Path.Combine(this.ScrDir, p)))
.Where(p => p.Name.ToUpperInvariant().Contains("TEST")))
{
foreach (var framework in this.TargetFrameworks)
{
this.DotNetTestSettings.VSTestReportPath = Path.Combine(this.TestResults, $"{project.Name}_{framework}.xml");
this.DotNetTestSettings.Framework = framework;
this.DotNetTest(Path.Combine(project.FullName), this.DotNetTestSettings);
}
}
}

public void PushNugetPackages(string artifactDirectory)
{
if (Helpers.CanReleaseInternal())
{
foreach (var nugetFile in Directory.EnumerateFiles(Path.Combine(this.Artifacts, artifactDirectory), "*.nupkg")
.Select(p => new FileInfo(p)))
{
this.DotNetNuGetPush(nugetFile.FullName,
new Cake.Common.Tools.DotNet.NuGet.Push.DotNetNuGetPushSettings()
{
ApiKey = Environment.GetEnvironmentVariable("GH_TOKEN"),
Source = "https://nuget.pkg.github.com/ix-ax/index.json",
SkipDuplicate = true
});
}
}
}

public IEnumerable<string> TargetFrameworks { get; } = new List<string>() { "net6.0", "net7.0" };

public IEnumerable<(string ax, string approject, string solution)> GetTemplateProjects()
{
var templates = new List<(string ax, string approject, string solution)>()
{
(Path.Combine(this.ScrDir, "AXSharp.templates\\working\\templates\\axsharpblazor\\ax\\"),
Path.Combine(this.ScrDir,"AXSharp.templates\\working\\templates\\axsharpblazor\\axsharpblazor.app\\axsharpblazor.hmi.csproj"),
Path.Combine(this.ScrDir,"AXSharp.templates\\working\\templates\\axsharpblazor\\axsharpblazor.sln")),

(Path.Combine(this.ScrDir, "AXSharp.templates\\working\\templates\\axsharpconsole\\ax"),
Path.Combine(this.ScrDir,"AXSharp.templates\\working\\templates\\axsharpconsole\\axsharpconsole\\axsharpconsole.app.csproj"),
Path.Combine(this.ScrDir,"AXSharp.templates\\working\\templates\\axsharpconsole\\axsharpconsole.sln"))

};

return templates;
}
}
6 changes: 3 additions & 3 deletions cake/BuildParameters.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Build
// Copyright (c) 2023 Peter Kurhajec (PTKu), MTS, and Contributors. All Rights Reserved.
// Contributors: https://github.com/ix-ax/ix/graphs/contributors
// Contributors: https://github.com/ix-ax/axsharp/graphs/contributors
// See the LICENSE file in the repository root for more information.
// https://github.com/ix-ax/ix/blob/master/LICENSE
// Third party licenses: https://github.com/ix-ax/ix/blob/master/notices.md
// https://github.com/ix-ax/axsharp/blob/dev/LICENSE
// Third party licenses: https://github.com/ix-ax/axsharp/blob/master/notices.md

using Cake.Common.Tools.DotNet;
using CommandLine;
Expand Down
6 changes: 3 additions & 3 deletions cake/FilteredSolution/FilteredSolution.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Build
// Copyright (c) 2023 Peter Kurhajec (PTKu), MTS, and Contributors. All Rights Reserved.
// Contributors: https://github.com/ix-ax/ix/graphs/contributors
// Contributors: https://github.com/ix-ax/axsharp/graphs/contributors
// See the LICENSE file in the repository root for more information.
// https://github.com/ix-ax/ix/blob/master/LICENSE
// Third party licenses: https://github.com/ix-ax/ix/blob/master/notices.md
// https://github.com/ix-ax/axsharp/blob/dev/LICENSE
// Third party licenses: https://github.com/ix-ax/axsharp/blob/master/notices.md

using System.Collections.Generic;
using System.IO;
Expand Down
6 changes: 3 additions & 3 deletions cake/FilteredSolution/SolutionRoot.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Build
// Copyright (c) 2023 Peter Kurhajec (PTKu), MTS, and Contributors. All Rights Reserved.
// Contributors: https://github.com/ix-ax/ix/graphs/contributors
// Contributors: https://github.com/ix-ax/axsharp/graphs/contributors
// See the LICENSE file in the repository root for more information.
// https://github.com/ix-ax/ix/blob/master/LICENSE
// Third party licenses: https://github.com/ix-ax/ix/blob/master/notices.md
// https://github.com/ix-ax/axsharp/blob/dev/LICENSE
// Third party licenses: https://github.com/ix-ax/axsharp/blob/master/notices.md

using Build.FilteredSolution;

Expand Down
9 changes: 5 additions & 4 deletions cake/Helpers.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Build
// Copyright (c) 2023 Peter Kurhajec (PTKu), MTS, and Contributors. All Rights Reserved.
// Contributors: https://github.com/ix-ax/ix/graphs/contributors
// Contributors: https://github.com/ix-ax/axsharp/graphs/contributors
// See the LICENSE file in the repository root for more information.
// https://github.com/ix-ax/ix/blob/master/LICENSE
// Third party licenses: https://github.com/ix-ax/ix/blob/master/notices.md
// https://github.com/ix-ax/axsharp/blob/dev/LICENSE
// Third party licenses: https://github.com/ix-ax/axsharp/blob/master/notices.md

using Polly;
using System;
Expand All @@ -21,7 +21,8 @@ public static bool CanReleaseInternal()
{
return PublishInternal.Any(predicate =>
predicate == GitVersionInformation.BranchName ||
GitVersionInformation.BranchName.StartsWith("releases/"));
GitVersionInformation.BranchName.StartsWith("releases/")
|| GitVersionInformation.BranchName.StartsWith("alfa/"));
}

public static bool CanReleasePublic()
Expand Down
Loading