Skip to content

Commit c42179e

Browse files
committed
Enhance documentation with UI companion details, fix typos, and update prerequisites for .NET versions
1 parent 6cb305c commit c42179e

7 files changed

Lines changed: 37 additions & 42 deletions

File tree

docfx/api/index.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
# AXSharp API Documentation
22

3-
![](~/images/banner.png)
3+
![](~/images/banner.png)
4+
5+
Browse the auto-generated API reference for all AX# packages:
6+
7+
- **AXSharp.Connector** — core connectivity layer, twin objects, and data exchange primitives
8+
- **AXSharp.Compiler** — twin compiler (ixc) internals and code generation
9+
- **AXSharp.Blazor** — Blazor UI rendering components and auto-generated views
10+
- **AXSharp.Abstractions** — shared interfaces and presentation attributes
11+
12+
Use the table of contents on the left to navigate namespaces and types.

docfx/articles/connectors/README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ During the batched read operation, the values are stored in *LastValue* property
7878

7979
During a batched write operation, the values written to the controller were retrieved from the *Cyclic* property of the corresponding Primitive Twin.
8080

81-
> **NOTE**
82-
> Accessing *Cyclic* property for **writing** will not result in an autmatic subscription for cyclic reading. Acessing the *LastValue* property will neither result in an automatic subcription for reading.
81+
> **NOTE**
82+
> Accessing *Cyclic* property for **writing** will not result in an automatic subscription for cyclic reading. Accessing the *LastValue* property will neither result in an automatic subscription for reading.
8383
8484
~~~ C#
8585
// in this namespace are extension methods for batched operations.
@@ -93,11 +93,11 @@ public class BatchedAccess
9393
await Entry.PlcTwin.Settings.ReadAsync();
9494

9595
// Write values to the console
96-
Console.WriteLine($"{Entry.PlcTwin.Settings.PosX.Symbol}:{Entry.PlcTwin.MAIN.Settings.PosX.LastValue});
96+
Console.WriteLine($"{Entry.PlcTwin.Settings.PosX.Symbol}:{Entry.PlcTwin.Settings.PosX.LastValue}");
9797

98-
Console.WriteLine($"{Entry.PlcTwin.Settings.PosY.Symbol}:{Entry.PlcTwin.Settings.PosY.LastValue});
98+
Console.WriteLine($"{Entry.PlcTwin.Settings.PosY.Symbol}:{Entry.PlcTwin.Settings.PosY.LastValue}");
9999

100-
Console.WriteLine($"{Entry.PlcTwin.Settings.PosZ.Symbol}:{Entry.PlcTwin.Settings.PosZ.LastValue});
100+
Console.WriteLine($"{Entry.PlcTwin.Settings.PosZ.Symbol}:{Entry.PlcTwin.Settings.PosZ.LastValue}");
101101
}
102102

103103

@@ -108,11 +108,13 @@ public class BatchedAccess
108108
Entry.PlcTwin.Settings.PosZ.Cyclic = 130.0f;
109109

110110
// Writes all values of the settings structure.
111-
await Entry.PlcController.MAIN.Settings.WriteAsynch();
111+
await Entry.PlcTwin.Settings.WriteAsync();
112112
}
113113
}
114114
~~~
115115

116+
## Polling
117+
116118
Polling allows an application to query a structure or variable at different intervals. The values are stored in the `Cyclic` property of value types. The polled variables are retrieved from the controller in the same way as during cyclic reading but at a specified interval. Unlike automatic subscription mode, the polled values can be unsubscribed.
117119

118120
To enable polling, the subscription of the twin connector must be set to `Polling`.
@@ -256,7 +258,7 @@ _length : REAL;
256258
~~~
257259

258260
~~~ C#
259-
// Writes unit of the '_lenght' variable to the console.
261+
// Writes unit of the '_length' variable to the console.
260262
System.Console.WriteLine(PlcTwin._app._length.AttributeUnits);
261263
~~~
262264

@@ -334,10 +336,10 @@ VAR
334336
someWString : WSTRING;
335337
END_VAR
336338
337-
someString := '<#This woule be localized#> and this would stay as it is';
339+
someString := '<#This would be localized#> and this would stay as it is';
338340
339341
340-
someWString := "<#This woule be localized#> and this would stay as it is";
342+
someWString := "<#This would be localized#> and this would stay as it is";
341343
~~~
342344

343345
Connectors implement features that allow localizing of the texts (controller defined and added attributes of string type). For the localization to work the twin assembly must be provided with a resource file (*.resx). Resource files can be generated using [ixr tool](~/articles/ixr/IXR.md). You will need to add the resource file to your **Twin project** and set the resource code generation to *public*.

docfx/articles/connectors/WebAPI.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Here is an example on how to set polling subscription mode:
2323
Entry.Plc.Connector.SubscriptionMode = AXSharp.Connector.ReadSubscriptionMode.Polling;
2424
```
2525

26-
For more details about polling within your components, see [Polling Data from the Controller in Components](../blazor/LIBRARIES.md#polling-data-from-the-plc) and [General Polling](README.md#polling).
26+
For more details about polling within your components, see [Polling Data from the Controller in Components](../blazor/LIBRARIES.md#optimizing-plc-data-polling) and [General Polling](README.md#polling).
2727

2828
### Monitoring and Logging
2929

docfx/articles/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* [Config file](~/articles/compiler/CONFIG_FILE.md)
1010
* [Packaging and dependencies](~/articles/compiler/PACKAGING.md)
1111
---
12-
* [Documenation compiler](~/articles/ixd/IXD.md)
12+
* [Documentation compiler](~/articles/ixd/IXD.md)
1313
---
1414
* [Resx compiler](~/articles/ixr/IXR.md)
1515
---

docfx/articles/toc.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@
1818
- name: Packaging and dependencies
1919
href: ~/articles/compiler/PACKAGING.md
2020

21-
- name: Documenation compiler
21+
- name: Documentation compiler
2222
href: ~/articles/ixd/IXD.md
2323
- name: Localizables compiler
2424
href: ~/articles/ixr/IXR.md
25+
- name: Localizables to Resx
26+
href: ~/articles/ltr/LTR.md
2527
- name: Connectors
2628
href: ~/articles/connectors/README.md
2729
items:
@@ -38,4 +40,6 @@
3840
href: ~/articles/blazor/LIBRARIES.md
3941
- name: Blazor auto-rendering
4042
href: ~/articles/blazor/RENDERABLECONTENT.md
43+
- name: Coding style
44+
href: ~/articles/general/CODING_STYLE.md
4145

docfx/docfx.json

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@
2626
],
2727
"build": {
2828
"globalMetadata" : {
29-
"_appTitle" : {"api/index.md" : "API"},
29+
"_appTitle" : "AX#",
3030
"_appName" : "AX#",
31-
"_appFooter" : " Generated by DocFx. © MTS spol. s r.o., MTS spol. s r.o., and awesome contributors",
31+
"_appFooter" : " Generated by DocFx. © MTS spol. s r.o. and awesome contributors",
3232
"_enableSearch" : true,
3333
"_appFaviconPath" : "images/favicon.ico"
3434
},
3535

3636
"sitemap": {
3737
"baseUrl": "https://inxton.github.io/axsharp/",
38-
"priority": 0.1,
38+
"priority": 0.5,
3939
"changefreq": "weekly"
4040
},
4141

@@ -65,17 +65,7 @@
6565
]
6666
}
6767
],
68-
"overwrite": [
69-
{
70-
"files": [
71-
"apidoc/**.md"
72-
],
73-
"exclude": [
74-
"obj/**",
75-
"_site/**"
76-
]
77-
}
78-
],
68+
"overwrite": [],
7969
"dest": "../docs",
8070
"globalMetadataFiles": [],
8171
"fileMetadataFiles": [],

docfx/index.md

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,9 @@ The presentations provide a mechanism for automated UI generation from PLC code.
3636
## Prerequisites
3737

3838
- [axcode](https://axcite.me)
39-
- [dotnet 6](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)
40-
- [dotnet 7](https://dotnet.microsoft.com/en-us/download/dotnet/7.0)
41-
- [dotnet 7](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
39+
- [dotnet 8](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
4240
- [vscode](https://code.visualstudio.com/Download) or [vs2022](https://visualstudio.microsoft.com/vs/)
4341

44-
> **Make sure you have installed both .NET6 and .NET7.**
45-
4642
## Getting started
4743

4844
Make sure you meet all [prerequisites](#prerequisites).
@@ -66,7 +62,7 @@ There are different ways you can use to create new project. At this point we sup
6662

6763
**IMPORTANT! Prepare your PLC and AX project**
6864

69-
*Before you start using any of the method below yoiu will need to set up your PLC. Using TIA portal you need 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.*
65+
*Before you start using any of the methods below you will need to set up your PLC. Using TIA portal you need 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.*
7066

7167
[!Video https://youtu.be/d9EX2FixY1A?t=151]
7268

@@ -75,15 +71,9 @@ There are different ways you can use to create new project. At this point we sup
7571

7672
Install AX# template package
7773

78-
When using .NET7
7974
~~~
8075
dotnet new install AXSharp.templates
8176
~~~
82-
83-
When using .NET6 and earlier
84-
~~~
85-
dotnet new --install AXSharp.templates
86-
~~~
8777
> [!NOTE]
8878
> Make sure all nuget feed sources are available at the time of installation of packages.
8979
If you are not sure run `dotnet nuget list source` and check that the sources listed are reachable.
@@ -107,11 +97,11 @@ Create new project from template
10797

10898
~~~
10999
dotnet new [shortname] -n YOUR_PROJECT_NAME
110-
#e.g. dotnet new axeblazor -n MyFristAXSharpBlazorProject
100+
#e.g. dotnet new axeblazor -n MyFirstAXSharpBlazorProject
111101
~~~
112102

113103
**When prompted about script execution allow the script to run (answer (Y)es) in order to finish the scaffolding of the project.**
114-
If you're creating the project using Visual Studion you will need to run the script manually.
104+
If you're creating the project using Visual Studio you will need to run the script manually.
115105

116106
Consult README.md file located in your new project for additional information.
117107

@@ -168,7 +158,7 @@ Copyright (C) 2022 author
168158
--version Display version information.
169159
~~~
170160

171-
Before usage apax commanad ensure that you are logged in
161+
Before usage apax command ensure that you are logged in
172162
~~~
173163
apax login
174164
~~~

0 commit comments

Comments
 (0)