Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
331fb5a
Create draft PR for #173
PTKu Aug 16, 2023
f4c90d7
adds observation of alarms into AxoComponentView
PTKu Aug 16, 2023
a194570
additions to prev + docu
PTKu Aug 17, 2023
118bdf7
wip on generic pneumatics
PTKu Aug 17, 2023
9d837ae
changed angry icon when component has errors to dizzy
PTKu Aug 19, 2023
9210af2
Merge branch 'dev' into 173-_NEW-FEATURE_Create_library_for_generic_p…
PTKu Aug 21, 2023
dac3c8f
Merge branch 'dev' into 173-_NEW-FEATURE_Create_library_for_generic_p…
TomKovac Aug 22, 2023
1f56653
wip
Aug 22, 2023
9f771c2
Merge branch '173-_NEW-FEATURE_Create_library_for_generic_pneumatic_c…
Aug 22, 2023
c2fc81d
Pneumatic piston
Aug 23, 2023
0c09b53
sync with dev
Aug 23, 2023
a723092
add pneumatics to pipeline
PTKu Aug 24, 2023
62e4455
synch with remote
PTKu Aug 24, 2023
4eb0eab
mend
PTKu Aug 24, 2023
01ab741
Static messenger-concorent access solved
Aug 24, 2023
d59857e
some code cleanup + some TODO marks added for documentation
Aug 24, 2023
9196368
Merge branch 'dev' into 173-_NEW-FEATURE_Create_library_for_generic_p…
Aug 24, 2023
aba7376
AxoCylinder-cleanup
Aug 24, 2023
16f339f
AxoCylinder-another cleanup, plus some typo fixed
Aug 24, 2023
588ae32
wip
Aug 28, 2023
f75e2c1
component.pneumatics-message list moved to the .NET side
Aug 28, 2023
bd4a3cd
Cognex insight: added messengers
Aug 29, 2023
296a603
Merge branch 'dev' into 173-_NEW-FEATURE_Create_library_for_generic_p…
Aug 29, 2023
d52a80f
0..249 array issue
Aug 29, 2023
0795955
Cognex Dataman-messengers added
Aug 29, 2023
bcbef74
wip
Aug 29, 2023
fee87b2
Added Popover on help in AxoMessengerView
Brano5 Aug 30, 2023
beccee7
Merge branch 'dev' into 173-_NEW-FEATURE_Create_library_for_generic_p…
PTKu Aug 30, 2023
1ad2779
wip
Aug 30, 2023
16163fe
synch with remote
TomKovac Aug 30, 2023
b06022e
wip
TomKovac Aug 30, 2023
38f9dd9
Added Help header in AxoMessengerView
Brano5 Aug 31, 2023
309f96a
Merge branch '173-_NEW-FEATURE_Create_library_for_generic_pneumatic_c…
Brano5 Aug 31, 2023
a868f5a
synch with dev
PTKu Aug 31, 2023
981b150
Merge branch 'dev' into 173-_NEW-FEATURE_Create_library_for_generic_p…
TomKovac Aug 31, 2023
903a896
Merge branch '173-_NEW-FEATURE_Create_library_for_generic_pneumatic_c…
TomKovac Aug 31, 2023
1b449b7
Merge branch 'dev' into 173-_NEW-FEATURE_Create_library_for_generic_p…
PTKu Aug 31, 2023
2091be8
adds axunit target
PTKu Aug 31, 2023
29dace1
Merge branch '173-_NEW-FEATURE_Create_library_for_generic_pneumatic_c…
TomKovac Sep 4, 2023
a4d80c2
Merge branch 'dev' into 173-_NEW-FEATURE_Create_library_for_generic_p…
PTKu Sep 4, 2023
b7a55ec
AxoMessenger documentation updated
TomKovac Sep 4, 2023
b021ae4
Merge branch '173-_NEW-FEATURE_Create_library_for_generic_pneumatic_c…
TomKovac Sep 4, 2023
6ab641a
AxoCognexVision documentation updated
TomKovac Sep 4, 2023
0a5c2a5
Cognex docu update
TomKovac Sep 4, 2023
795cee3
Cognex Vision documentation updated
TomKovac Sep 5, 2023
40385e2
sync with dev
TomKovac Sep 5, 2023
86d22dd
Merge branch 'dev' into 173-_NEW-FEATURE_Create_library_for_generic_p…
PTKu Sep 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cake/BuildContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ public BuildContext(ICakeContext context, BuildParameters buildParameters)
("inspectors", "axopen.inspectors"),
("components.abstractions", "axopen.components.abstractions"),
("components.cognex.vision", "axopen.cognex.vision"),
("components.pneumatics", "axopen_components_pneumatics")
};

public IEnumerable<(string folder, string name, string targetIp, string targetPlatform)> Integrations { get; } = new[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,60 @@ Also, the hardware signals must be assigned first before calling any method of t
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)]
[!code-smalltalk[](../../../../src/components.cognex.vision/app/src/Examples/AXOpen.Cognex.Vision/AxoCognexVisionExample.st?name=CognexDatamanHWIO_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)]
[!code-smalltalk[](../../../../src/components.cognex.vision/app/src/Examples/AXOpen.Cognex.Vision/AxoCognexVisionExample.st?name=CognexDatamanClearResultData)]

`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)]
[!code-smalltalk[](../../../../src/components.cognex.vision/app/src/Examples/AXOpen.Cognex.Vision/AxoCognexVisionExample.st?name=CognexDatamanRead)]

**How to visualize `AxoDataman`**
On the UI side, use the `RenderableContentControl` and set its Context according to the placement of the instance of the `AxoDataman`.
[!code-csharp[](../../../../src/components.cognex.vision/app/ix-blazor/Pages/Documentation.razor?name=CognexDatamanRenderedView)]


## AxoInsight

`AxoInsight` provides the essential control and operation of all vision sensors of the `Insight` family.

### Implementation
The `AxoInsight` 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/components.cognex.vision/app/src/Examples/AXOpen.Cognex.Vision/AxoCognexVisionExample.st?name=CognexInsightHWIO_Assignement)]

There are three public methods to operate the `AxoInsight`:

`Restore` - restores the state of the `AxoInsight` to the initial state and resets all the internal variables.

`ClearInspectionResults` - resets the inspection data read and confirms the data received from the device.
**Example of using ClearInspectionResults method**
[!code-smalltalk[](../../../../src/components.cognex.vision/app/src/Examples/AXOpen.Cognex.Vision/AxoCognexVisionExample.st?name=CognexInsightClearInspectionResults)]

`Trigger` - triggers the reading sequence and waits for results.
**Example of using Trigger method**
[!code-smalltalk[](../../../../src/components.cognex.vision/app/src/Examples/AXOpen.Cognex.Vision/AxoCognexVisionExample.st?name=CognexInsightTrigger)]

`ChangeJob` - changes the sensor job. There are two overloads of the method `ChangeJob`. First one is with numerical parameter of the job number, second one with the textual parameter of the job name.
**Example of using ChangeJob method using job number**
[!code-smalltalk[](../../../../src/components.cognex.vision/app/src/Examples/AXOpen.Cognex.Vision/AxoCognexVisionExample.st?name=CognexInsightChangeJobByNumber)]
**Example of using ChangeJob method using job name**
[!code-smalltalk[](../../../../src/components.cognex.vision/app/src/Examples/AXOpen.Cognex.Vision/AxoCognexVisionExample.st?name=CognexInsightChangeJobByName)]

`SoftEvent` - triggers the soft event of the sensor.
**Example of using SoftEvent method**
[!code-smalltalk[](../../../../src/components.cognex.vision/app/src/Examples/AXOpen.Cognex.Vision/AxoCognexVisionExample.st?name=CognexInsightSoftEvent)]

**How to visualize `AxoInsight`**
On the UI side, use the `RenderableContentControl` and set its Context according to the placement of the instance of the `AxoInsight`.
[!code-csharp[](../../../../src/components.cognex.vision/app/ix-blazor/Pages/Documentation.razor?name=CognexInsightRenderedView)]
29 changes: 29 additions & 0 deletions docfx/articles/components/AXOPENPNEUMATICS/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# AXOpenComponentsPneumatics

The `AXOpenComponentsPneumatics` library controls and operates the basic pneumatic actuators.

## AxoCylinder

`AxoCylinder` provides the essential control and operation of basic pneumatic cylinder including two controlling output signals for both directions and two .

### 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)]

2 changes: 1 addition & 1 deletion docfx/articles/components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ manufacturer and the function group.
# General rules and conventions
[!INCLUDE [Conventions](../guidelines/components.md)]
[!INCLUDE [AXOPENCOGNEVISION](AXOPENCOGNEVISION/README.md)]
<!-- [!INCLUDE [AXOPENELEMENTS](AXOPENELEMENTS/README.md)] -->
[!INCLUDE [AXOPENPNEUMATICS](AXOPENPNEUMATICS/README.md)]

4 changes: 2 additions & 2 deletions docfx/articles/core/AXOCOMPONENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ AxoComponent provides visual indicators to represent different alarm levels. Bel
## 5. Active Errors
**Description**: Active error messages are present.

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-emoji-angry" viewBox="0 0 16 16">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-emoji-dizzy" viewBox="0 0 16 16">
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
<path d="M4.285 12.433a.5.5 0 0 0 .683-.183A3.498 3.498 0 0 1 8 10.5c1.295 0 2.426.703 3.032 1.75a.5.5 0 0 0 .866-.5A4.498 4.498 0 0 0 8 9.5a4.5 4.5 0 0 0-3.898 2.25.5.5 0 0 0 .183.683zm6.991-8.38a.5.5 0 1 1 .448.894l-1.009.504c.176.27.285.64.285 1.049 0 .828-.448 1.5-1 1.5s-1-.672-1-1.5c0-.247.04-.48.11-.686a.502.502 0 0 1 .166-.761l2-1zm-6.552 0a.5.5 0 0 0-.448.894l1.009.504A1.94 1.94 0 0 0 5 6.5C5 7.328 5.448 8 6 8s1-.672 1-1.5c0-.247-.04-.48-.11-.686a.502.502 0 0 0-.166-.761l-2-1z"/>
<path d="M9.146 5.146a.5.5 0 0 1 .708 0l.646.647.646-.647a.5.5 0 0 1 .708.708l-.647.646.647.646a.5.5 0 0 1-.708.708l-.646-.647-.646.647a.5.5 0 1 1-.708-.708l.647-.646-.647-.646a.5.5 0 0 1 0-.708zm-5 0a.5.5 0 0 1 .708 0l.646.647.646-.647a.5.5 0 1 1 .708.708l-.647.646.647.646a.5.5 0 1 1-.708.708L5.5 7.207l-.646.647a.5.5 0 1 1-.708-.708l.647-.646-.647-.646a.5.5 0 0 1 0-.708zM10 11a2 2 0 1 1-4 0 2 2 0 0 1 4 0z"/>
</svg>

---
43 changes: 27 additions & 16 deletions docfx/articles/messaging/AXOMESSENGER.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# AxoMessenger

Static `AxoMessenger` is a class that provides mechanism for delivering static message to the supervising applications (SCADA/HMI). This static messenger uses the text defined in the declaration. This text cannot be changed during runtime as the text is "transfered" just once during the compilation and it is not read during the runtime. The PLC code of the `AxoMessenger` just ensures the activation, deactivation and acknowledgement of the message.
Static `AxoMessenger` is a class that provides a mechanism for delivering static messages to the supervising applications (SCADA/HMI). This static messenger uses the text defined in the declaration. This text cannot be changed during runtime as the text is "transferred" just once during the compilation, and it is not read during the runtime. The PLC code of the `AxoMessenger` just ensures the activation, deactivation and acknowledgement of the messages.

`AxoMessenger` contains following public methods.
`AxoMessenger` contains the following public methods.

`Serve()` - this method must be called cyclically. It ensures the inicialization of the instance, so as the deactivation of the message.
`Serve()` - this method must be called cyclically. It ensures the initialization of the instance so as the deactivation of the message.

```mermaid
classDiagram
Expand All @@ -14,43 +14,54 @@ Static `AxoMessenger` is a class that provides mechanism for delivering static m
}
```

`Activate(category)` - this method immediatelly activate the message of the category where category is of the type `eAxoMessageCategory`. Deactivation is detected after one PLC cycle without calling the method `Activate`.
`Activate(_category)` - this method immediately activates the message of the category where the _category is of the type `eAxoMessageCategory`. Deactivation is detected after one PLC cycle without calling the method `Activate`.

`ActivateOnCondition(condition,category)` - this method activate the message of the category where category is of the type `eAxoMessageCategory` on the rising edge of the condition and imidiatelly deactivate the message on the falling edge of the condition. The `ActivateOnCondition` method is designed to be called cyclically.
`ActivateOnCondition(_condition,_category)` - this method activates the message of the category where the _category is of the type `eAxoMessageCategory` on the rising edge of the _condition and immediately deactivates the message on the falling edge of the _condition. The `ActivateOnCondition` method is designed to be called cyclically.

`ActivateOnCondition(_messageCode,_condition,_category)` - this method activates the message of the category where the _category is of the type `eAxoMessageCategory` on the rising edge of the _condition and immediately deactivates the message on the falling edge of the _condition. The `ActivateOnCondition` method is designed to be called cyclically. By using the _messageCode of value greater than zero, the proper item of the text list is used as a text message. The text list can be declared in the PLC code by using the `PlcTextList` attribute or on the .NET side.

>[!NOTE]
>Do not use the both activation methods on the same `AxoMessenger` instance, please use just one of them.
>Do not use different activation methods on the same `AxoMessenger` instance. Please use just one of them.

`Acknowledge()` - acknowledge the message if required. The message could be acknowledged so as before deactivation so as after.
`Restore()` - restores all members of this instance to their initial states.

Depending on the [eAxoMessageCategory](/apictrl/abstractions/plc.AXOpen.Messaging.eAxoMessageCategory.html) the messenger should require the acknowledgement.

By default the acknowledgement is not required for the levels `Trace`,`Debug`,`Info`,`TimedOut`,`Notification` and `Warning`.
This could be overwritten by calling the `RequireAcknowledgement()` method.
Contrariwise, the acknowledgement is required for the levels `Error`,`ProgrammingError`,`Critical`,`Fatal` and `Catastrophic` by default. This could be overwritten by calling the `DoNotRequireAcknowledgement()` method.

**Attributes `MessageText` and `Help`**
**Attributes `MessageText`, `Help` and `PlcTextList`**

These attributes are used to set the values of the static texts of the messenger. These values are read out at the compilation time, transferred to .NET counterpart and set as constant strings. Therefore, they can't be changed at the runtime.

These attributes are used to set the values of the static texts of the messenger. These values are read out at the compilation time transfered to .NET counterpart and set as a constant strings. Therefore they can't be changed at the runtime.
Example of declaration of the instance and defining the attributes `MessageText` and `Help`.
[!code-smalltalk[](../../../src/integrations/ctrl/src/Examples/AXOpen.Messaging/AxoStaticMessengerDocuExample.st?name=MessageTextHelpDeclaration)]

Example of declaration the instance and defining the attributes `MessageText` and `Help`.
[!code-smalltalk[](../../../src/integrations/ctrl/src/Examples/AXOpen.Messaging/AxoStaticMessengerDocuExample.st?range=7-9)]
Example of declaration of the instance and defining the attribute `PlcTextList`.
[!code-smalltalk[](../../../src/integrations/ctrl/src/Examples/AXOpen.Messaging/AxoStaticMessengerDocuExample.st?name=PlcTextListDeclaration)]

**How to use `AxoMessenger`**

The instance of the `AxoMessenger` must be defined inside the `AxoContext` or `AxoObject`.
Inside the `Main()` method of the related `AxoContext` or inside the cyclically called method of the `AxoObject` following rules must be applied. The `Serve()` method of the instance of the `AxoMessenger` must be called cyclically.
The `Activate` method should be used called the required condition or the `AcitvateOnCondition` should be called cyclically. Avoid to mix using the both methods with the same instance.
[!code-smalltalk[](../../../src/integrations/ctrl/src/Examples/AXOpen.Messaging/AxoStaticMessengerDocuExample.st?range=5-25,48)]
Inside the `Main()` method of the related `AxoContext` or inside the cyclically called method of the `AxoObject`, the following rules must be applied. The `Serve()` method of the instance of the `AxoMessenger` must be called cyclically.
The `Activate` method should be used called the required condition, or the `ActivateOnCondition` method should be called cyclically.
In the case of `ActivateOnCondition` method is used without `_messageCode` parameter for the `MessageText` and `Help`, the values from the attributes `MessageText` and `Help` defined in the PLC code are used.
In the case of `ActivateOnCondition` method is used with `_messageCode` parameter greater than zero for the `MessageText` and `Help`, the values from the text list are used.
In the case of `PlcTextList` attribute is defined, the parsed values from this attribute are used. In the case of `PlcTextList` attribute is not defined, the text list should be defined on the .NET side as in the example below.
[!code-csharp[](../../../src/integrations/src/AXOpen.Integrations/AXOpen.Messaging/AxoStaticMessengerDocuExample.cs?name=InitializationOfTheDotNetTextList)]

Avoid mixing several activation principles with the same instance.
[!code-smalltalk[](../../../src/integrations/ctrl/src/Examples/AXOpen.Messaging/AxoStaticMessengerDocuExample.st?name=MessengerCompleteExample)]

If neccessary, the default behaviour of the acknowledgeable messenger should be changed as follows.
If necessary, the default behaviour of the acknowledgeable messenger should be changed as follows.
[!code-smalltalk[](../../../src/integrations/ctrl/src/Examples/AXOpen.Messaging/AxoStaticMessengerDocuExample.st?name=DoNotRequireAcknowledgement)]
Contrariwise, the default behaviour of the unacknowledgeable messenger should be changed as follows.
[!code-smalltalk[](../../../src/integrations/ctrl/src/Examples/AXOpen.Messaging/AxoStaticMessengerDocuExample.st?name=RequireAcknowledgement)]

**How to visualize `AxoMessenger`**

On the UI side use the `RenderableContentControl` and set its Context according the placement of the instance of the `AxoMessenger`.
On the UI side, use the `RenderableContentControl` and set its Context according to the placement of the instance of the `AxoMessenger`.
[!code-csharp[](../../../src/integrations/src/AXOpen.Integrations.Blazor/Pages/DocuExamples/AxoMessagingStaticDocu.razor?name=RenderedView)]


Expand Down
2 changes: 2 additions & 0 deletions src/AXOpen-L1-tests.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"projects": [
"base\\tests\\AXOpen.Base.AbstractionsTests\\AXOpen.Base.AbstractionsTests.csproj",
"base\\tests\\AXOpen.LoggingTests\\AXOpen.Logging.SerologTests.csproj",
"components.cognex.vision\\tests\\AXOpen.Cognex.Vision.Tests\\axopen_cognex_vision_tests.csproj",
"components.pneumatics\\tests\\AXOpen.Components.Pneumatics.Tests\\AXOpen.Components.Pneumatics_tests.csproj",
"core\\tests\\AXOpen.Core.Tests\\axopen_core_tests.csproj",
"data\\tests\\AXOpen.Data.Exporters.ExcelTests\\AXOpen.Data.Exporters.ExcelTests.csproj",
"data\\tests\\AXOpen.Data.Tests\\axopen_data_tests.csproj",
Expand Down
2 changes: 2 additions & 0 deletions src/AXOpen-packable-only.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"components.abstractions\\src\\AXOpen.Components.Abstractions\\ix_ax_axopen_components_abstractions.csproj",
"components.cognex.vision\\src\\AXOpen.Cognex.Vision.Blazor\\axopen_cognex_vision_blazor.csproj",
"components.cognex.vision\\src\\AXOpen.Cognex.Vision\\ix_ax_axopen_cognex_vision.csproj",
"components.pneumatics\\src\\AXOpen.Components.Pneumatics.blazor\\AXOpen.Components.Pneumatics.blazor.csproj",
"components.pneumatics\\src\\AXOpen.Components.Pneumatics\\ix_ax_axopen_components_pneumatics.csproj",
"core\\src\\AXOpen.Core.Blazor\\axopen_core_blazor.csproj",
"core\\src\\AXOpen.Core\\ix_ax_axopen_core.csproj",
"data\\src\\AXOpen.Data.Blazor\\axopen_data_blazor.csproj",
Expand Down
Loading