-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* wip * Create draft PR for #125 * Cognex dataman readear, very first release ready to test with the hardware * update packages * wip * wip * reader working inside the templates simple * VAR_IN_OUT => REF_TO * Changed to Var_IN_OUT * wip * VAR_IN_OUT * changed to VAR_INPUT and REF_TO * some error messages added * AxoComponent_Status inside components.abstractions * AxoComponent_status inside components.abstractions * AxoTextList added * merged with dev CgnReader removed from template.simple * some PLC code cleanup * some .NET code cleanup * AxoDataman rdy2 review * cleanup and refactoring * refactoring reference input variables * cognex vision-some styling modification * axunit-llvm target added * AxoTextList warning level and error level defined by attributes inside the PLC code * AxoTextList docu added * Continous reading mechanism added for AxoDatamanReader * dataman reader some bug fixed * Excessive ResultData size checked * AxoDataman documentation added * optimalization of the signals updated on visu * update packages --------- Co-authored-by: Lukas Kytka <lukas.kytka@mts.sk> Co-authored-by: TomKovac <TomKovac@users.noreply.github.com> Co-authored-by: Tomas Kovac <tomas.kovac@mts.sk> Co-authored-by: Peter Kurhajec <61538034+PTKu@users.noreply.github.com>
- Loading branch information
1 parent
e634060
commit b0fb0ee
Showing
101 changed files
with
3,143 additions
and
297 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
docfx/articles/components/AXOPENCOGNEVISION/AXOPENCOGNEVISION_V_6_0_0_0.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# AXOpenCognexVision | ||
|
||
The `AXOpenCognexVision` library controls and operates the vision devices from the manufacturer `Cognex`. | ||
|
||
|
||
## AxoDataman | ||
|
||
`AxoDataman` provides the essential control and operation of all code-reader of the `Dataman` family. | ||
|
||
### Implementation | ||
The `AxoDataman` is designed to be used as a member of the `AxoContext` or `AxoObject`. | ||
Therefore its instance must be initialized with the proper `AxoContext` or `AxoObject` before any use. | ||
Also, the hardware signals must be assigned first before calling any method of this instance. | ||
To accomplish this, call the `Run` method cyclically with the proper variables (i.e. inside the `Main` method of the relevant `AxoContext`) as in the example below: | ||
|
||
**Example of the initialization and hardware signal assignement** | ||
[!code-smalltalk[](../../../../src/integrations/ctrl/src/Examples/AXOpen.Cognex.Vision/AxoCognexVisionDatamanExample.st?name=HWIO_Assignement)] | ||
|
||
There are three public methods to operate the `AxoDataman`: | ||
|
||
`Restore` - restores the state of the `AxoDataman` to the initial state and resets all the internal variables. | ||
|
||
`ClearResultData` - resets the data read and confirms the data received from the device. | ||
**Example of using ClearResultData method** | ||
[!code-smalltalk[](../../../../src/integrations/ctrl/src/Examples/AXOpen.Cognex.Vision/AxoCognexVisionDatamanExample.st?name=ClearResultData)] | ||
|
||
`Read` - triggers the reading sequence and waits for results. | ||
**Example of using Read method** | ||
[!code-smalltalk[](../../../../src/integrations/ctrl/src/Examples/AXOpen.Cognex.Vision/AxoCognexVisionDatamanExample.st?name=Read)] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# AXOpenCognexVision | ||
|
||
The `AXOpenCognexVision` library controls and operates the vision devices from the manufacturer `Cognex`. | ||
|
||
# VERSIONS | ||
[!INCLUDE [V_6_0_0_0](AXOPENCOGNEVISION_V_6_0_0_0.md)] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#**AXOpen.Components** | ||
|
||
**AXOpen.Components** is a group of libraries providing control of the individual types of devices grouped by the | ||
manufacturer and the function group. | ||
|
||
# General rules and conventions | ||
[!INCLUDE [Conventions](../guidelines/components.md)] | ||
[!INCLUDE [AXOPENCOGNEVISION](AXOPENCOGNEVISION/README.md)] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# AxoTextList | ||
|
||
AxoTextList provides displaying the string value from the list defined in the extended class inside the `.NET` twin based on the numerical value read out from the PLC. | ||
Moreover, the display form could also change the background colour with the numerical value change. To achieve this, the attributes `WarningLevel` and `ErrorLevel` need to be declared as in the following example. | ||
[!code-smalltalk[](../../../src/integrations/ctrl/src/Examples/AxoTextList/AxoTextListExample.st?name=AxoTextListWithLevelsDefined)] | ||
The final text displayed in the UI application will be `static prefix`+[`text value from text list`(Id)](for example `Description : ` + [TextList(Id)]). | ||
The static prefix is optional. Use the following example to display the same text list without static prefix and with different levels. | ||
[!code-smalltalk[](../../../src/integrations/ctrl/src/Examples/AxoTextList/AxoTextListExample.st?name=AxoTextListWithoutPrefix)] | ||
If the `WarningLevel` is greater than 0 and the `ErrorLevel` is greater than the `WarningLevel`, all items with the `Id` lower than the `WarningLevel` are displayed with the `Primary` background, all items with the `Id` greater or equal to the `WarningLevel` and lower then the `ErrorLevel` are displayed with the `Warning` background and all the rest are displayed with the `Danger` background. The final colours depend on the style used. | ||
If the attributes `WarningLevel` and `ErrorLevel` are not declared as in the following example, all items are displayed with the `Primary` background. | ||
[!code-smalltalk[](../../../src/integrations/ctrl/src/Examples/AxoTextList/AxoTextListExample.st?name=AxoTextListWithoutLevelsDefined)] | ||
|
||
For each `AxoTextList`, there must be a defined property, named exactly as in the `Attributes` inside the examples above. It must be defined in the extended class that the particular `AxoTextList` is a member of. | ||
This property must return a string value from the dictionary defined in the same class based on the numerical value of the `Id` variable. | ||
|
||
Declaration of the dictionary: | ||
[!code-csharp[](../../../src/integrations/src/AXOpen.Integrations/AxoTextListExample/AxoTextListExampleContext.cs?name=DeclarationOfTheDictionary)] | ||
|
||
Filling the items of the dictionary: | ||
[!code-csharp[](../../../src/integrations/src/AXOpen.Integrations/AxoTextListExample/AxoTextListExampleContext.cs?name=FillingTheItemsOfTheDictionary)] | ||
|
||
Returning the string item from the dictionary: | ||
[!code-csharp[](../../../src/integrations/src/AXOpen.Integrations/AxoTextListExample/AxoTextListExampleContext.cs?name=ReturningTheItemBasedOnId)] | ||
|
||
Complete example for two different `AxoTextList`: | ||
[!code-csharp[](../../../src/integrations/src/AXOpen.Integrations/AxoTextListExample/AxoTextListExampleContext.cs?range=1-71)] | ||
|
||
**How to visualize `AxoTextList`** | ||
|
||
On the UI side, to visualize the `AxoTextList`, use the `RenderableContentControl` and set its Context according to the placement of the instance of the `AxoTextList`. | ||
[!code-csharp[](../../../src/integrations/src/AXOpen.Integrations.Blazor/Pages/AxoTextList/AxoTextListExample.razor?name=UI)] | ||
|
||
The displayed result should look like this: | ||
|
||
![Alt text](~/images/AxoTextListExampleVisu.gif) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.apax | ||
.env | ||
bin | ||
|
||
obj | ||
testresult | ||
|
||
*.apax.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"OutputProjectFolder":"..\\src\\AXOpen.Components.Abstractions"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: "@ix-ax/axopen.components.abstractions" | ||
version: '0.1.4-alpha.79' | ||
type: lib | ||
targets: | ||
- axunit-llvm | ||
- llvm | ||
files: | ||
- src | ||
devDependencies: | ||
"@ax/sdk": ^4.0.3 | ||
scripts: | ||
postbuild: | ||
- dotnet ixc | ||
dependencies: | ||
"@ix-ax/axopen.core": '0.1.4-alpha.79' |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
src/components.abstractions/ctrl/src/AxoComponent_Status.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
USING AXOpen.Core; | ||
|
||
NAMESPACE AXOpen.Components.Abstractions | ||
CLASS PUBLIC AxoComponent_Status | ||
VAR PUBLIC | ||
{#ix-attr:[Container(Layout.Stack)]} | ||
{#ix-set:AttributeName = "ActionDescription: |[[1]ActionDescription]|"} | ||
{#ix-attr:[WarningLevel(600)]} | ||
{#ix-attr:[ErrorLevel(700)]} | ||
Action : AXOpen.Core.AxoTextList; | ||
{#ix-set:AttributeName = "ErrorDescription: |[[1]ErrorDescription]|"} | ||
{#ix-attr:[WarningLevel(600)]} | ||
{#ix-attr:[ErrorLevel(700)]} | ||
Error : AXOpen.Core.AxoTextList; | ||
END_VAR | ||
END_CLASS | ||
END_NAMESPACE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
USING AXOpen.Core; | ||
NAMESPACE AXOpen.Components.Abstractions | ||
INTERFACE PUBLIC IAxoCodeReader | ||
METHOD ClearResultData : IAxoTaskState END_METHOD | ||
METHOD Read : IAxoTaskState END_METHOD | ||
END_INTERFACE | ||
END_NAMESPACE |
3 changes: 3 additions & 0 deletions
3
src/components.abstractions/src/AXOpen.Components.Abstractions/Properties/AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
using System.Runtime.CompilerServices; | ||
|
||
[assembly:InternalsVisibleTo("axopen_core_tests")] |
Oops, something went wrong.