-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NEW-FEATURE] Create basic views an models for each components (#681)
* Create draft PR for #680 * +view models due wrapped components visualisiation (components lost datacontext in wrapped component) +example of usage in sandbox *find components types only on top level * +view models for abb robots --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Peter Barancek <[email protected]>
- Loading branch information
1 parent
c96a69d
commit 521253e
Showing
16 changed files
with
170 additions
and
2 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
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
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
66 changes: 66 additions & 0 deletions
66
...ff/TcoDrivesBeckhoffTests/Tests/TcoContext/WrappedComponent/WrappedComponentExample.TcPOU
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,66 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.12"> | ||
<POU Name="WrappedComponentExample" Id="{f443fe68-822c-036d-122a-3f9c9f3200c7}" SpecialFunc="None"> | ||
<Declaration><![CDATA[FUNCTION_BLOCK WrappedComponentExample EXTENDS TcoCore.TcoComponent | ||
VAR_OUTPUT | ||
END_VAR | ||
VAR | ||
_config:WrappedComponentExample_Config; | ||
_status:WrappedComponentExample_Status; | ||
_control:WrappedComponentExample_Control; | ||
_components:WrappedComponentsExample:= (Parent := THIS^); | ||
_throwTask:TcoCore.TcoTask(THIS^); | ||
_restoreTask:TcoCore.TcoTask(THIS^); | ||
END_VAR | ||
]]></Declaration> | ||
<Implementation> | ||
<ST><![CDATA[]]></ST> | ||
</Implementation> | ||
<Property Name="Components" Id="{f2a63328-27cd-090c-37b1-a3ac64a01290}"> | ||
<Declaration><![CDATA[PROPERTY Components : REFERENCE TO WrappedComponentsExample | ||
]]></Declaration> | ||
<Get Name="Get" Id="{0c7dcdd5-c057-0b17-279d-c3102bfded2d}"> | ||
<Declaration><![CDATA[VAR | ||
END_VAR | ||
]]></Declaration> | ||
<Implementation> | ||
<ST><![CDATA[Components ref=_components;]]></ST> | ||
</Implementation> | ||
</Get> | ||
</Property> | ||
<Method Name="Restore" Id="{e7fc1b31-1ecd-0bb4-3914-4bad4e42e83f}"> | ||
<Declaration><![CDATA[(*~ | ||
<docu> | ||
<summary> | ||
Restores this instance to the Ready state. Can be called explicitly or from within one of the restore mechanisms. | ||
</summary> | ||
</docu> | ||
~*) | ||
METHOD Restore : ITcoRestorable | ||
]]></Declaration> | ||
<Implementation> | ||
<ST><![CDATA[]]></ST> | ||
</Implementation> | ||
</Method> | ||
<Method Name="ServiceMode" Id="{a27c0e07-b8aa-070e-2ec6-644188aae071}"> | ||
<Declaration><![CDATA[(*~ | ||
<docu> | ||
<summary> | ||
Custom service (manual, maintenance) logic. | ||
This method must be implemented in derived class. | ||
</summary> | ||
</docu> | ||
~*) | ||
METHOD PROTECTED ServiceMode | ||
]]></Declaration> | ||
<Implementation> | ||
<ST><![CDATA[]]></ST> | ||
</Implementation> | ||
</Method> | ||
</POU> | ||
</TcPlcObject> |
13 changes: 13 additions & 0 deletions
13
...rivesBeckhoffTests/Tests/TcoContext/WrappedComponent/WrappedComponentExample_Config.TcDUT
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,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.12"> | ||
<DUT Name="WrappedComponentExample_Config" Id="{fd4a1fe1-dfce-0359-2456-da059d207f84}"> | ||
<Declaration><![CDATA[TYPE WrappedComponentExample_Config EXTENDS TcoCore.TcoStruct: | ||
STRUCT | ||
VacuumReachedStabilisation:TIME:=T#100MS; | ||
VacuumPushTime:TIME:=T#100MS; | ||
END_STRUCT | ||
END_TYPE | ||
]]></Declaration> | ||
</DUT> | ||
</TcPlcObject> |
13 changes: 13 additions & 0 deletions
13
...ivesBeckhoffTests/Tests/TcoContext/WrappedComponent/WrappedComponentExample_Control.TcDUT
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,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.12"> | ||
<DUT Name="WrappedComponentExample_Control" Id="{3f4ebb2e-dad9-0f41-1bf8-aea5e05727a4}"> | ||
<Declaration><![CDATA[TYPE WrappedComponentExample_Control EXTENDS TcoCore.TcoStruct: | ||
STRUCT | ||
Setpoint:INT; | ||
END_STRUCT | ||
END_TYPE | ||
]]></Declaration> | ||
</DUT> | ||
</TcPlcObject> |
13 changes: 13 additions & 0 deletions
13
...rivesBeckhoffTests/Tests/TcoContext/WrappedComponent/WrappedComponentExample_Status.TcDUT
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,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.12"> | ||
<DUT Name="WrappedComponentExample_Status" Id="{5b4807c6-cbbe-0ed2-2bbd-e81bc67735eb}"> | ||
<Declaration><![CDATA[TYPE WrappedComponentExample_Status EXTENDS TcoCore.TcoStruct: | ||
STRUCT | ||
ProgressThrow:INT; | ||
ActionDescription:STRING; | ||
END_STRUCT | ||
END_TYPE | ||
]]></Declaration> | ||
</DUT> | ||
</TcPlcObject> |
20 changes: 20 additions & 0 deletions
20
...f/TcoDrivesBeckhoffTests/Tests/TcoContext/WrappedComponent/WrappedComponentsExample.TcDUT
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,20 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.12"> | ||
<DUT Name="WrappedComponentsExample" Id="{56c6929f-decd-0607-0880-6828e76cabf4}"> | ||
<Declaration><![CDATA[TYPE WrappedComponentsExample EXTENDS TcoCore.TcoStruct: | ||
STRUCT | ||
{attribute addProperty Name "Manipulator"} | ||
Manipulator : TcoDrivesBeckhoff.TcoMultiAxis(THISSTRUCT); | ||
{attribute addProperty Name "Axis"} | ||
Axis : TcoDrivesBeckhoff.TcoSingleAxis(THISSTRUCT); | ||
{attribute addProperty Name "Drive"} | ||
Drive : TcoDrivesBeckhoff.TcoDriveSimple(THISSTRUCT); | ||
END_STRUCT | ||
END_TYPE | ||
]]></Declaration> | ||
</DUT> | ||
</TcPlcObject> |
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