You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update chapters 1 + 2
* Remove link to internal (publicly not available) URL
* Update images and snippets to reflect the current state of the software
* Removed note to solve issue from current template
* Template-url parameter redundant
* Removed parameter from sample and example, as this should not be required
* Template and branch parameter removed
* Updated doc to fit current state
* Added note to ch.1 mentioning ADT specific branch
* Added note in ch.3 to explain separation of Attributes
* Function names and wording were brought into line with current ones
* Code snippets and description updated
* Missing explanation of used CLI parameters added
* Unified database helpsection entry
* Added missing braces in snippet
* Shortened explanation of CLI parameters
* Updated note to feature link to documentation of CLI
* Unified syntax for notes
* Added braces to IFs
* Added missing $ for command in chapter-2
---------
Co-authored-by: Philipp Steib <[email protected]>
Copy file name to clipboardExpand all lines: chapter-1-basics.md
+36-11Lines changed: 36 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,9 +44,12 @@ only the `Assembling` step should be covered by MORYX. These information result
44
44
in the following command:
45
45
46
46
```
47
-
$ moryx new PencilFactory --steps Assembling --products GraphitePencil
47
+
$ moryx new PencilFactory --steps Assembling --products GraphitePencil --branch adp
48
48
```
49
49
50
+
> **Note** This training uses a simplified application template that is tailored to this scenario. It is provided by the --branch parameter here.
51
+
> For real world applications you would probably omit --branch for a more advanced default setup or customize it to your needs (see [Moryx.Cli README](https://www.nuget.org/packages/Moryx.Cli#readme-body-tab) or moryx --help for more information).
52
+
50
53
This should not only leave you with a solution `PencilFactory.sln` inside
51
54
the new folder `PencilFactory`. It also does some initial configuration
52
55
and ships empty databases.
@@ -56,7 +59,7 @@ you run the app, you might need to [install licenses](#encountering-wupiexceptio
56
59
57
60
Run the application (press `F5`).
58
61
59
-
> *Note* Starting it for the first time will restore NuGet packages.That can
62
+
> **Note** Starting it for the first time will restore NuGet packages.That can
@@ -103,7 +106,7 @@ From the details above, the `GraphitePencilType` needs
103
106
You will find the `GraphitePencilType` among all other `<Product>Types` in the
104
107
`PencilFactory` package within the `Products` folder.
105
108
106
-
For properties to be shown in the UI, add the [EntrySerialize](https://github.com/PHOENIXCONTACT/MORYX-Framework/blob/dev/docs/articles/Core/Serialization/EntryConvert.md#entryserialize-attribute)
109
+
Paste the following code and for properties to be shown in the UI, add the [EntrySerialize](https://github.com/PHOENIXCONTACT/MORYX-Framework/blob/dev/docs/articles/Core/Serialization/EntryConvert.md#entryserialize-attribute)
107
110
attribute. For properties to be saved in the database, use the [DataMember](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.serialization.datamemberattribute?view=net-7.0) attribute.
108
111
109
112
```cs
@@ -146,7 +149,7 @@ To create a product, you need to run the application now and head to the
146
149
Click on the plus button to open the 'Product Importer' menu. This title may
147
150
sound a bit confusing, but it lets you add new products.
148
151
149
-
> *Note* The naming here comes from the fact, that you wouldn't necessarily add
152
+
> **Note** The naming here comes from the fact, that you wouldn't necessarily add
150
153
> products here, but 'import' them from other systems.
151
154
152
155

@@ -181,8 +184,8 @@ similar to the image below.
181
184
182
185

183
186
184
-
Now you should have your products `100001-00 Brown Pencil GP-1B` and
185
-
`100002-00 Green Pencil GP-HB`.
187
+
Now you should have your products `100001-00 Green Pencil GP-1B` and
188
+
`100002-00 Brown Pencil BP-HB`.
186
189
The next challenge is to actually let a resource produce the pencils. So far there is
187
190
no script that describes how the pencils are produced.
188
191
Therefore, the next step is to model a resource after which we can create a **Recipe** and a
@@ -219,12 +222,12 @@ Based on these requirements
219
222
220
223
### Add worker support
221
224
222
-
The `AssemblingCell`, which you will find in `PencilFactory.Resources`,
225
+
The `AssemblingCell`, which you will find in `PencilFactory.Resources.Assembling`,
### Encountering database issues after setup section
497
+
498
+
> Something went wrong on the server.
499
+
500
+
> The connection to the server could not be established. Please check your network connection or try again later.
501
+
502
+
If you encounter issues when opening Products or Resources for the first time at the end of the setup,
503
+
consider checking the databases in the command center.
504
+
There you may have to create the missing databeses.
505
+
506
+
If the issue occurs during the APD at a later stage due to messing up the order of stps or making changes to classes, of existing entires, you may also need to delete the DB.
507
+
#### Step 1: Open the Command Center
508
+

509
+
510
+
#### Step 2: Check the databases and create missing ones
511
+

512
+
513
+
#### Step 3: Reincarnate the failed services
514
+

Copy file name to clipboardExpand all lines: chapter-2-drivers.md
+18-16Lines changed: 18 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,11 +12,11 @@ Common interfaces for drivers are `IMessageDriver<TMessage>` and `IInOutDriver`.
12
12
* The `IInOutDriver` can read and write variables on a server. A typical protocol is OPC UA.
13
13
14
14
## Simulated InOutDriver
15
-
You will start with the ColorizingCell. Since the cell isn't finished yet, the manufacturer wants you to [simulate](https://git-ctvc.europe.phoenixcontact.com/moryx/moryx-simulation/-/blob/dev/docs/tutorials/how_to_simulate_my_production.md) the communication first.
15
+
You will start with the ColorizingCell. Since the cell isn't finished yet, the manufacturer wants you to simulate the communication first.
16
16
17
17
Use the CLI to add the Colorizing step to the project.
18
18
```
19
-
moryx add step Colorizing
19
+
$ moryx add step Colorizing
20
20
```
21
21
Now, in order to use simulation, add the package `Moryx.Drivers.Simulation` to the project `PencilFactory.Resources`.
22
22
@@ -31,7 +31,7 @@ For a protocol like that the `IInOutDriver` makes the most sense. Open the Color
31
31
32
32
```cs
33
33
[ResourceRegistration]
34
-
publicclassColorizing : Cell
34
+
publicclassColorizingCell : Cell
35
35
{
36
36
privateconststringProcessStart="ProcessStart";
37
37
privateconststringProcessResult="ProcessResult";
@@ -45,6 +45,7 @@ public class Colorizing : Cell
45
45
```
46
46
47
47
In order to recognize, when an input changes, subscribe to that in `OnInitialize` and when the driver is set. If you don't also subscribe to the event in the setter of the driver, you will always have to restart the system after changing the driver of a cell.
48
+
Adjust the Driver variable and functions to match the following.
48
49
49
50
```cs
50
51
privateIInOutDriver<bool,bool>_driver;
@@ -57,7 +58,9 @@ public IInOutDriver<bool, bool> Driver
If the changed input is `ProcessResult`, read the result from the input and publish it as `ActivityCompleted`. Also set the input `ProcessStart` back to false, so that the physical cell is able to detect when to start the next process. If you don't reset the value of `ProcessStart`, the physical cell is not able to recognize the specific moment an activity should start. Some physical cells also only recognize rising or falling edges. Constant values would trigger nothing.
@@ -144,7 +150,7 @@ public override IEnumerable<Session> ControlSystemAttached()
144
150
}
145
151
```
146
152
147
-
Now you have to implement the driver. Create a new driver `SimulatedColorizingDriver` in the project `PencilFactory.Resources`, which is derived from `SimulatedInOutDriver<bool, bool>` and add the constants for the variable names.
153
+
Now you have to implement the driver. Create a new driver `SimulatedColorizingDriver` in the project `PencilFactory.Resources.Colorizing`, which is derived from `SimulatedInOutDriver<bool, bool>` and add the constants for the variable names.
0 commit comments