From 826b097becc842f8fe0ab0d895c2052f929d8ba7 Mon Sep 17 00:00:00 2001 From: TK <61820360+TomKovac@users.noreply.github.com> Date: Tue, 21 Apr 2026 11:28:07 +0200 Subject: [PATCH 1/4] Create draft PR for #1115 From ee984635c0647f1655ee271cf605bf167a653ff6 Mon Sep 17 00:00:00 2001 From: TK <61820360+TomKovac@users.noreply.github.com> Date: Tue, 21 Apr 2026 12:06:39 +0200 Subject: [PATCH 2/4] done --- .../GSDML-V2.4-KUKA-KR C5-20220704.xml | 2690 +++++++++++++++++ .../assets/kuka_krc5/kuka_krc5_dio512.hwl.yml | 77 + 2 files changed, 2767 insertions(+) create mode 100644 src/components.kuka.robotics/ctrl/assets/kuka_krc5/GSDML-V2.4-KUKA-KR C5-20220704.xml create mode 100644 src/components.kuka.robotics/ctrl/assets/kuka_krc5/kuka_krc5_dio512.hwl.yml diff --git a/src/components.kuka.robotics/ctrl/assets/kuka_krc5/GSDML-V2.4-KUKA-KR C5-20220704.xml b/src/components.kuka.robotics/ctrl/assets/kuka_krc5/GSDML-V2.4-KUKA-KR C5-20220704.xml new file mode 100644 index 000000000..4bf4ad665 --- /dev/null +++ b/src/components.kuka.robotics/ctrl/assets/kuka_krc5/GSDML-V2.4-KUKA-KR C5-20220704.xml @@ -0,0 +1,2690 @@ + + + + PROFINET Device Profile + 1.00 + Device Profile for PROFINET Devices + PROFIBUS Nutzerorganisation e. V. (PNO) + Device + + 4 + 1 + GSDML + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components.kuka.robotics/ctrl/assets/kuka_krc5/kuka_krc5_dio512.hwl.yml b/src/components.kuka.robotics/ctrl/assets/kuka_krc5/kuka_krc5_dio512.hwl.yml new file mode 100644 index 000000000..972b86adf --- /dev/null +++ b/src/components.kuka.robotics/ctrl/assets/kuka_krc5/kuka_krc5_dio512.hwl.yml @@ -0,0 +1,77 @@ +Templates: + Devices: + - Name: 'kuka_krc5_dio512' + Placeholders: + - Name: 'NAME' + Value: 'kuka_krc5_robot' + - Name: 'IP_ADDRESS_X1' + Value: '192.168.100.1/24' + - Name: 'PROFINET_DEVICE_NAME_X1' + Value: 'kuka_krc5_robot' + Content: + Name: '${NAME}' + Modules: + - Name: '${NAME}' + TypeIdentifier: + FileName: 'GSDML-V2.4-KUKA-KR C5-20220704.XML' + GsdId: 'DIM 1' + Interfaces: + - Name: 'Interface1' + Label: 'X1' + Addresses: + - Type: 'IPv4' + Address: '${IP_ADDRESS_X1}' + # RouterAddress: '192.168.0.1' + - Type: 'Profinet' + ProfinetDeviceName: '${PROFINET_DEVICE_NAME_X1}' + Parameters: + IECV22LLDPMode: False + PrioritizedStartup: False + Ports: + - Name: 'Port_1' + Label: 'X1 P1' + Parameters: + # Possible values: 8 - Automatic | 16 - TP 100 Mbps full duplex + TransmissionRateAndDuplex: 'Automatic' + EndOfDetectionOfAccessibleDevices: False + EndOfTopologyDiscovery: False + PortMonitoring: False + # TransmissionRateAutoNegotiation: True + # MediumAttachmentType: 'Copper' + - Name: 'Port_2' + Label: 'X1 P2' + Parameters: + # Possible values: 8 - Automatic | 16 - TP 100 Mbps full duplex + TransmissionRateAndDuplex: 'Automatic' + EndOfDetectionOfAccessibleDevices: False + EndOfTopologyDiscovery: False + PortMonitoring: False + # TransmissionRateAutoNegotiation: True + # MediumAttachmentType: 'Copper' + - Name: 'Port_3' + Label: 'X1 P3' + Parameters: + # Possible values: 8 - Automatic | 16 - TP 100 Mbps full duplex + TransmissionRateAndDuplex: 'Automatic' + EndOfDetectionOfAccessibleDevices: False + EndOfTopologyDiscovery: False + PortMonitoring: False + # TransmissionRateAutoNegotiation: True + # MediumAttachmentType: 'Copper' + - Name: 'Port_4' + Label: 'X1 P4' + Parameters: + # Possible values: 8 - Automatic | 16 - TP 100 Mbps full duplex + TransmissionRateAndDuplex: 'Automatic' + EndOfDetectionOfAccessibleDevices: False + EndOfTopologyDiscovery: False + PortMonitoring: False + # TransmissionRateAutoNegotiation: True + # MediumAttachmentType: 'Copper' + - TypeIdentifier: NotAssigned + Slot: 1 + - Name: DIO512 + TypeIdentifier: + GsdId: '15' + FileName: GSDML-V2.4-KUKA-KR C5-20220704.XML + Slot: 2 \ No newline at end of file From 50b6fc00d751344730e805e47b7d622cb59dff3d Mon Sep 17 00:00:00 2001 From: Peter Kurhajec <61538034+PTKu@users.noreply.github.com> Date: Tue, 21 Apr 2026 14:14:56 +0200 Subject: [PATCH 3/4] docs: Update KUKA documentation with new sections, capabilities, and troubleshooting details --- CHANGELOG.md | 22 ++ .../AxoKukaRobotics_Config.st | 10 +- .../AxoKukaRobotics_HWIDs.st | 10 +- .../docs/AxoKrc4_v_5_x_x.md | 106 ++++++++- .../docs/CHANGELOG.md | 23 ++ src/components.kuka.robotics/docs/README.md | 50 +++- src/components.kuka.robotics/docs/TROUBLES.md | 220 +++++++++++++++++- 7 files changed, 425 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7af799ae..21c07f9d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,25 @@ +### [KUKA] KRC4 documentation refresh and GSDML/hw template callouts ([#TBD](https://github.com/Inxton/AXOpen/pulls)) + +**Note:** Documentation-only change for `components.kuka.robotics`. No runtime behavior modified. + +- docs: Added `` and `` tagged regions in `AxoKukaRobotics_Config.st` / `AxoKukaRobotics_HWIDs.st` so docs can reference them via `[!code-smalltalk[]]`. +- docs: Rewrote `docs/AxoKrc4_v_5_x_x.md` with full CONTROLLER / .NET TWIN / BLAZOR / HARDWARE tabs wired to the showcase and library source; added Capabilities + Configuration parameter table and an "Alternative example" block referencing `AxoKrc4_v_5_x_x_Showcase2.st`. +- docs: Expanded `docs/TROUBLES.md` with an error-ID reference covering the bring-up (700, 702, 710, 720–726, 1130–1133), cyclic I/O (1201, 1231), runtime-safety (20001–20005), and 500-range task *potential* identifiers; added component-specific diagnostics and known-limitations sections. +- docs: Updated `docs/README.md` with a "Hardware assets" table pointing at the library-shipped KRC4 GSDML (`ctrl/assets/kuka_krc4/GSDML-V2.33-KUKA-KRC4-ProfiNet_5.0-20181102.xml`) and the PROFINET hw template (`kuka_krc4_dio512.hwl.yml`); mirrored the callout in the `AxoKrc4_v_5_x_x.md` HARDWARE tab with GitHub links. +- docs: Repointed stale GitHub source links from branch `3-unify-showcase` to `dev`; appended `0.50.0` / `0.50.1` entries to `src/components.kuka.robotics/docs/CHANGELOG.md`. + +**Impact:** +- Integrators see the shipped GSDML and hw template path directly from the library docs, without vendor round-trips. +- Troubleshooting KRC4 cells on-site is driven from a per-error-ID table instead of generic advice. +- `[!code-smalltalk[]]` refs in the component doc now render the live `Config` / `HWIDs` declarations from the library source. + +**Risks/Review:** +- The new tagged regions must be preserved in future edits of `AxoKukaRobotics_Config.st` / `AxoKukaRobotics_HWIDs.st` — removing them breaks the doc references. +- PR number in this entry is `#TBD`; update once the PR is opened. + +**Testing:** +- Build docs locally via `scripts/_build_documentation.ps1` and confirm the KRC4 pages render, the `[!code-*]` directives resolve, and the new GitHub links on the HARDWARE tab / README resolve to existing files. + ### [CORE] Controller logger updates ([#1054](https://github.com/Inxton/AXOpen/pull/1054)) **Note:** Enhanced logging and messaging capabilities with new message categories and requalification features. diff --git a/src/components.kuka.robotics/ctrl/src/AxoKukaRobotics_Datatypes_v_5_x_x/AxoKukaRobotics_Config.st b/src/components.kuka.robotics/ctrl/src/AxoKukaRobotics_Datatypes_v_5_x_x/AxoKukaRobotics_Config.st index b1d95824c..bbbc667e2 100644 --- a/src/components.kuka.robotics/ctrl/src/AxoKukaRobotics_Datatypes_v_5_x_x/AxoKukaRobotics_Config.st +++ b/src/components.kuka.robotics/ctrl/src/AxoKukaRobotics_Datatypes_v_5_x_x/AxoKukaRobotics_Config.st @@ -1,8 +1,9 @@ NAMESPACE AXOpen.Components.Kuka.Robotics.v_5_x_x + // {#ix-attr:[Container(Layout.Stack)]} {S7.extern=ReadWrite} CLASS PUBLIC AxoKukaRobotics_Config - VAR PUBLIC + VAR PUBLIC {#ix-set:AttributeName = "<#Info time#>"} InfoTime : LTIME := LT#2S; {#ix-set:AttributeName = "<#Error time#>"} @@ -10,7 +11,8 @@ NAMESPACE AXOpen.Components.Kuka.Robotics.v_5_x_x {#ix-set:AttributeName = "<#Task timeout#>"} TaskTimeout : LTIME := LT#50S; {#ix-set:AttributeName = "<#Hardware IDs#>"} - HWIDs : AxoKukaRobotics_HWIDs; - END_VAR - END_CLASS + HWIDs : AxoKukaRobotics_HWIDs; + END_VAR + END_CLASS + // END_NAMESPACE diff --git a/src/components.kuka.robotics/ctrl/src/AxoKukaRobotics_Datatypes_v_5_x_x/AxoKukaRobotics_HWIDs.st b/src/components.kuka.robotics/ctrl/src/AxoKukaRobotics_Datatypes_v_5_x_x/AxoKukaRobotics_HWIDs.st index 74fb741ec..3268ba21f 100644 --- a/src/components.kuka.robotics/ctrl/src/AxoKukaRobotics_Datatypes_v_5_x_x/AxoKukaRobotics_HWIDs.st +++ b/src/components.kuka.robotics/ctrl/src/AxoKukaRobotics_Datatypes_v_5_x_x/AxoKukaRobotics_HWIDs.st @@ -1,7 +1,8 @@ -NAMESPACE AXOpen.Components.Kuka.Robotics.v_5_x_x +NAMESPACE AXOpen.Components.Kuka.Robotics.v_5_x_x + // {S7.extern=ReadWrite} {#ix-attr:[Container(Layout.Stack)]} - CLASS PUBLIC AxoKukaRobotics_HWIDs + CLASS PUBLIC AxoKukaRobotics_HWIDs VAR PUBLIC {#ix-set:AttributeName = "<#Hardware ID of the device#>"} HwID_Device : UINT; @@ -9,6 +10,7 @@ NAMESPACE AXOpen.Components.Kuka.Robotics.v_5_x_x HwID_None : UINT; {#ix-set:AttributeName = "<#Hardware ID of the '512_DI_DO' submodule#>"} HwID_512_DI_DO : UINT; - END_VAR - END_CLASS + END_VAR + END_CLASS + // END_NAMESPACE \ No newline at end of file diff --git a/src/components.kuka.robotics/docs/AxoKrc4_v_5_x_x.md b/src/components.kuka.robotics/docs/AxoKrc4_v_5_x_x.md index 03c4a17e6..a9b7b6663 100644 --- a/src/components.kuka.robotics/docs/AxoKrc4_v_5_x_x.md +++ b/src/components.kuka.robotics/docs/AxoKrc4_v_5_x_x.md @@ -2,7 +2,49 @@ _KUKA KRC4 industrial robot controller_ -Generated documentation for the `AxoKrc4_v_5_x_x` component. +`AxoKrc4` (namespace `AXOpen.Components.Kuka.Robotics.v_5_x_x`) is the +controller proxy for robots driven by a KUKA KRC4. It extends +`AXOpen.Core.AxoComponent` and implements +`AXOpen.Components.Abstractions.Robotics.IAxoRobotics`, exposing all programme +and motion commands as `AxoTask` instances that advance their state machine +inside the component's `Run()` call. + +## Capabilities + +- Programme control — `StartAtMain`, `StartProgram`, `StopProgram`, `StartMotorsAndProgram`, `StopMovementsAndProgram`. +- Motor control — `StartMotors`, `StopMotors`. +- Motion commands — `StartMovements(movementParams)`, `StopMovements`, + and a combined `StartMotorsProgramAndMovements(movementParams)`. +- Safety-interlocked task execution — every task checks `Inputs.Manual`, + `Inputs.Automatic`, `Inputs.AlarmStopActive`, `Inputs.UserSafetySwitchClosed`, + and `Inputs.Error` while busy (error IDs 20001–20005). +- Hardware wiring — consumes a PROFINET device identifier; the `Run()` + method auto-resolves the child slot layout (slot 1 safety-module = empty, + slot 2 = 512 DI / 512 DO) via `ReadSlotFromHardwareID` and + `ReadHardwareIOAddress` during first cycle. +- Cyclic I/O transfer — `Siemens.Simatic.DistributedIO.ReadData`/`WriteData` + on slot 2 each cycle (error IDs 1201 / 1231 on transport failure). +- Tool / area / position / coordinate outputs driven from `MovementParameters`. +- Hardware diagnostics task (`HardwareDiagnosticsTask`) and two on-delay + info/error timers (`Config.InfoTime`, `Config.ErrorTime`, + `Config.TaskTimeout`). + +## Configuration + +The component is configured via the nested `Config : AxoKukaRobotics_Config` +member. Adjust these before invoking `Run()`; they can also be set from the +commissioning UI. + +| Parameter | Type | Default | Purpose | +|-----------|------|---------|---------| +| `Config.InfoTime` | `LTIME` | `LT#2S` | Delay before a task publishes a *potential* (waiting-for-signal) message. Controls how long the component waits silently on an expected input before surfacing progress via `TaskMessenger`. | +| `Config.ErrorTime` | `LTIME` | `LT#5S` | Delay before `_errorTimer.output` throws the currently-executing task. Acts as a per-step watchdog on KRC4 responses. | +| `Config.TaskTimeout` | `LTIME` | `LT#50S` | Hard upper bound for a task's total duration. `0s` disables the timeout (used in the showcase so commissioning demos never self-abort). | +| `Config.HWIDs` | `AxoKukaRobotics_HWIDs` | — | Device hardware identifiers, auto-populated on first `Run()` from the `hwID` argument and the slot layout. | + +[!code-smalltalk[](../ctrl/src/AxoKukaRobotics_Datatypes_v_5_x_x/AxoKukaRobotics_Config.st?name=AxoKukaRoboticsConfigDeclaration)] + +[!code-smalltalk[](../ctrl/src/AxoKukaRobotics_Datatypes_v_5_x_x/AxoKukaRobotics_HWIDs.st?name=AxoKukaRoboticsHWIDsDeclaration)] # [CONTROLLER](#tab/controller) @@ -26,20 +68,31 @@ Generated documentation for the `AxoKrc4_v_5_x_x` component. [!code-pascal[](../../showcase/app/src/components.kuka.robotics/Documentation/AxoKrc4_v_5_x_x_Showcase.st?name=Usage)] +## Alternative example + +A second wired-up instance (`AxoKrc4_v_5_x_x_Showcase2`) is available and is +rendered side-by-side on the showcase Blazor page. It reuses the same +hardware identifier `kuka_rb1_HwID` and differs only in that it keeps +`Config.ErrorTime` at the library default (live error watchdog) instead of +zeroing it out for commissioning. + +[!code-pascal[](../../showcase/app/src/components.kuka.robotics/Documentation/AxoKrc4_v_5_x_x_Showcase2.st?name=ComponentDeclaration)] +[!code-pascal[](../../showcase/app/src/components.kuka.robotics/Documentation/AxoKrc4_v_5_x_x_Showcase2.st?name=Initialization)] + ## Source -View the library source at [`AxoKrc4_v_5_x_x.st`](https://github.com/Inxton/AXOpen/tree/3-unify-showcase/src/components.kuka.robotics/ctrl/src/AxoKrc4_v_5_x_x/AxoKrc4_v_5_x_x.st). +View the library source at [`AxoKrc4_v_5_x_x.st`](https://github.com/Inxton/AXOpen/tree/dev/src/components.kuka.robotics/ctrl/src/AxoKrc4_v_5_x_x.st). # [.NET TWIN](#tab/twin) ## Source -View the .NET twin source at [`AXOpen.Components.Kuka.Robotics`](https://github.com/Inxton/AXOpen/tree/3-unify-showcase/src/components.kuka.robotics/src/AXOpen.Components.Kuka.Robotics/). +View the .NET twin source at [`AXOpen.Components.Kuka.Robotics`](https://github.com/Inxton/AXOpen/tree/dev/src/components.kuka.robotics/src/AXOpen.Components.Kuka.Robotics/). # [BLAZOR](#tab/blazor) -`AxoKrc4_v_5_x_x` does not ship a dedicated Blazor view. It renders via the generic `AxoComponent` pattern using `RenderableContentControl`, which inspects the component type at runtime and selects the matching rendering based on the `Presentation` attribute. +`AxoKrc4` does not ship a dedicated Blazor view. It renders via the generic `AxoComponent` pattern using `RenderableContentControl`, which inspects the component type at runtime and selects the matching rendering based on the `Presentation` attribute. ## Status display @@ -61,13 +114,54 @@ Available `Presentation` values: `Status-Display`, `Command-Control`, `Service-C ## Source -View the Blazor package at [`AXOpen.Components.Kuka.Robotics.blazor`](https://github.com/Inxton/AXOpen/tree/3-unify-showcase/src/components.kuka.robotics/src/AXOpen.Components.Kuka.Robotics.blazor/). +View the Blazor package at [`AXOpen.Components.Kuka.Robotics.blazor`](https://github.com/Inxton/AXOpen/tree/dev/src/components.kuka.robotics/src/AXOpen.Components.Kuka.Robotics.blazor/). # [HARDWARE](#tab/hardware) +## Library-shipped assets + +The raw KRC4 GSDML and the matching PROFINET device template live inside +the library package so `AxoKrc4` can be wired up without fetching files +from the vendor: + +- GSDML — [`ctrl/assets/kuka_krc4/GSDML-V2.33-KUKA-KRC4-ProfiNet_5.0-20181102.xml`](https://github.com/Inxton/AXOpen/tree/dev/src/components.kuka.robotics/ctrl/assets/kuka_krc4/GSDML-V2.33-KUKA-KRC4-ProfiNet_5.0-20181102.xml) + — vendor GSDML for Siemens hardware-catalog import. +- HW template — [`ctrl/assets/kuka_krc4/kuka_krc4_dio512.hwl.yml`](https://github.com/Inxton/AXOpen/tree/dev/src/components.kuka.robotics/ctrl/assets/kuka_krc4/kuka_krc4_dio512.hwl.yml) + — PROFINET device template expected by `Run()` (slot 1 empty, slot 2 = `512_DI_DO`, 64-byte cyclic I/O). + +The showcase copies the template into `showcase/app/hwc/library_templates/kuka_krc4/` +so application builds do not need a catalog round-trip. + ## Device template -PROFINET hardware template at `showcase/app/hwc/library_templates/kuka_krc4/`. +PROFINET hardware template at `showcase/app/hwc/library_templates/kuka_krc4/kuka_krc4_dio512.hwl.yml`. + +The template provisions a KRC4 as a PROFINET device with two slots: + +| Slot | Module | Purpose | +|------|--------|---------| +| 1 | *(safety module, left empty by the template)* | Reserved — `AxoKrc4.Run()` verifies this slot resolves to `HwID_None = 0`. | +| 2 | `512_DI_DO` | 64-byte in / 64-byte out PROFINET I/O cyclically transferred by the component. | + +## I/O mapping + +`Run()` takes a single `hwID : UINT` that identifies the KRC4 device in the +configured hardware layout. The component then: + +1. Calls `ReadSlotFromHardwareID(hwID)` to obtain the device's geographic + address. +2. Reads the hardware ID of slot 1 and asserts it is `0` (no safety module + wired — error 710 otherwise). +3. Reads the hardware ID of slot 2 (the 512 DI / 512 DO module) and caches + it in `Config.HWIDs.HwID_512_DI_DO`. +4. Calls `ReadHardwareIOAddress` on slot 2 and asserts it exposes exactly + 64 input and 64 output bytes (error 726 otherwise). +5. Each cycle thereafter: `Siemens.Simatic.DistributedIO.ReadData` / + `WriteData` transfer the 64-byte blocks bound to `Inputs` / `Outputs`. + +Use the `AXOpen.Showcase.HwIdentifiers#{device}_HwID` constants to supply +`hwID` from application code (as the showcase does with +`kuka_rb1_HwID`). ## Device instantiation diff --git a/src/components.kuka.robotics/docs/CHANGELOG.md b/src/components.kuka.robotics/docs/CHANGELOG.md index 9d58311c8..b1dde834b 100644 --- a/src/components.kuka.robotics/docs/CHANGELOG.md +++ b/src/components.kuka.robotics/docs/CHANGELOG.md @@ -6,3 +6,26 @@ - Restructured documentation to class-name convention: added `AxoKrc4_v_5_x_x.md`; removed legacy `*_Showcase.md`, `*_Showcase2.md`, and `ComponentTemplate.md`. - Added CONTROLLER, .NET TWIN, BLAZOR, and HARDWARE tabs with DocFX source references wired to live showcase markers. - Initial CHANGELOG entry. + +### 0.50.0 + +**Other:** +- `README.md` — added Components, Configuration/state types, Packages, Dependencies tables and the KUKA vendor link. +- `AxoKrc4_v_5_x_x.md` — added Capabilities and Configuration sections with a `Config` parameter table; wired `[!code-smalltalk[]]` references to new `AxoKukaRoboticsConfigDeclaration` / `AxoKukaRoboticsHWIDsDeclaration` regions in the library source; added an "Alternative example" block referencing `AxoKrc4_v_5_x_x_Showcase2.st`; expanded the HARDWARE tab with slot layout and `hwID` resolution flow. +- `TROUBLES.md` — added component-specific common-issues, runtime-safety, and error-ID reference sections covering IDs 700, 701, 702, 710, 720–726, 1130–1133, 1201, 1231, 20001–20005, and the 500-range task *potential* identifiers; retained the existing Support pointer. +- Repointed stale GitHub source links from branch `3-unify-showcase` to `dev`. + +**New regions:** +- `AxoKukaRobotics_Config.st` — ``. +- `AxoKukaRobotics_HWIDs.st` — ``. + +### 0.50.1 + +**Other:** +- `README.md` — added a "Hardware assets" table pointing at the + library-shipped GSDML (`ctrl/assets/kuka_krc4/GSDML-V2.33-KUKA-KRC4-ProfiNet_5.0-20181102.xml`) + and the PROFINET hw template (`ctrl/assets/kuka_krc4/kuka_krc4_dio512.hwl.yml`), + plus a note that the showcase re-uses the same template. +- `AxoKrc4_v_5_x_x.md` — HARDWARE tab now opens with a "Library-shipped + assets" section linking the GSDML and hw template on GitHub, so + integrators see where the raw assets live inside this package. diff --git a/src/components.kuka.robotics/docs/README.md b/src/components.kuka.robotics/docs/README.md index 6ab1923b0..bee93dcee 100644 --- a/src/components.kuka.robotics/docs/README.md +++ b/src/components.kuka.robotics/docs/README.md @@ -4,7 +4,55 @@ The **components.kuka.robotics** is a set of libraries covering the product port The package consists of a PLC library providing control logic and its .NET twin counterpart aimed at the visualization part. This package currently covers the robots driven by KRC4 controller. +### Components + +| Component | Description | +|-----------|-------------| +| [`AxoKrc4`](AxoKrc4_v_5_x_x.md) | KUKA KRC4 controller proxy (namespace `AXOpen.Components.Kuka.Robotics.v_5_x_x`) exposing programme/motion commands, safety state, tool/zone outputs, and hardware diagnostics. Derives from `AxoComponent` and implements `IAxoRobotics`. | + +### Configuration & state types + +| Type | Role | +|------|------| +| `AxoKukaRobotics_Config` | Configuration: `InfoTime`, `ErrorTime`, `TaskTimeout`, `HWIDs`. | +| `AxoKukaRobotics_HWIDs` | Hardware identifiers: `HwID_Device`, `HwID_None`, `HwID_512_DI_DO`. | +| `AxoKukaRobotics_State` | Input image (RC_RDY1, ALARM_STOP, USER_SAF, PERI_RDY, ROB_CAL, I_O_ACTCONF, STOPMESS, ROB_STOPPED, mode, position/zone, tool feedback, coordinates). | +| `AxoKukaRobotics_Control` | Output image (EXT_START, MOVE_ENABLE, CONF_MESS, DRIVES_OFF, DRIVES_ON, I_O_ACT, START_AT_MAIN, master mode, tool commands, action/speed/tool/point numbers, coordinates). | +| `AxoKukaRobotics_Component_Status` | Runtime status (extends `AxoRobot_Status`). | + +### Packages + +| Package | Purpose | +|---------|---------| +| `@inxton/axopen.components.kuka.robotics` | PLC library (apax) | +| `AXOpen.Components.Kuka.Robotics` | .NET twin | +| `AXOpen.Components.Kuka.Robotics.blazor` | Blazor rendering assets | + +### Hardware assets + +The library ships the KRC4 GSDML and a ready-to-apply PROFINET device +template so the robot can be dropped into a `plc_line.hwl.yml` without +vendor-side configuration: + +| Asset | Path | Purpose | +|-------|------|---------| +| GSDML | [`ctrl/assets/kuka_krc4/GSDML-V2.33-KUKA-KRC4-ProfiNet_5.0-20181102.xml`](../ctrl/assets/kuka_krc4/GSDML-V2.33-KUKA-KRC4-ProfiNet_5.0-20181102.xml) | Vendor GSDML (KUKA KRC4 ProfiNet 5.0, 2018-11-02) for Siemens hardware catalog import. | +| HW template | [`ctrl/assets/kuka_krc4/kuka_krc4_dio512.hwl.yml`](../ctrl/assets/kuka_krc4/kuka_krc4_dio512.hwl.yml) | PROFINET device template with slot 1 empty (safety) and slot 2 = `512_DI_DO` (64-byte in / 64-byte out). Expected by `AxoKrc4.Run()`. | + +The showcase application uses the same template via +`showcase/app/hwc/library_templates/kuka_krc4/kuka_krc4_dio512.hwl.yml` +and wires it into `plc_line.hwl.yml` under the `` region. + +### Dependencies + +| Package | Purpose | +|---------|---------| +| `@inxton/axopen.components.robotics` | Shared robotics abstractions (`AxoRobot_Status`, task/messenger base types). | + ### Links to documentation -[Siemens AX-documentation](https://developer.siemens.com/simatic-ax/developer.html) + +[Siemens AX-documentation](https://developer.siemens.com/simatic-ax/developer.html) [AxOpen-documentation](https://inxton.github.io/AXOpen/) + +[KUKA documentation](https://www.kuka.com/en-gb) diff --git a/src/components.kuka.robotics/docs/TROUBLES.md b/src/components.kuka.robotics/docs/TROUBLES.md index 5cdc2ba7d..a3f9b545c 100644 --- a/src/components.kuka.robotics/docs/TROUBLES.md +++ b/src/components.kuka.robotics/docs/TROUBLES.md @@ -1,5 +1,223 @@ # Troubleshooting -Unfortunately, we don't have a direct solution to your problem at the moment. If you encounter any issues, please [file a report on our GitHub](https://github.com/inxton/AXOpen/issues/new/choose). We appreciate your feedback and patience. +This page catalogues the error states surfaced by `AxoKrc4_v_5_x_x.AxoKrc4`, +each tied back to its raising site in the PLC source. Error identifiers are +published through `Status.Error.Id` and the component's `Messenger` / +`TaskMessenger`, so the ID seen in a log or on the HMI always maps to one +of the entries below. + +## Common issues + +### The component never completes its first-cycle hardware check + +**Symptom.** `_initHwCheckDone` never goes `TRUE`; `Status.Error.Id` sits at +one of 700, 701, 702, 710, 720–726, or 1130–1133; no `Inputs` are populated +from the field. + +**Why.** `Run()` stays inside its one-shot bring-up block until every slot +probe succeeds. If any probe fails, it activates the matching message and +`RETURN`s, so the cyclic I/O read at the bottom of `Run()` never executes. + +**What to check.** + +- `inParent` was passed to `Run()` (missing parent → error 700 / 1130). +- A non-zero hardware identifier was passed (`hwID = 0` → error 701 / 1131). + Prefer `AXOpen.Showcase.HwIdentifiers#{device}_HwID` constants. +- Slot 1 in the PROFINET template is empty (no safety module added by the + application). A non-zero ID here raises error 710 / 1132. +- Slot 2 is the `512_DI_DO` submodule from the shipped template and is + reachable on the PROFINET subnet (errors 720–725, 1133). +- The KRC4 template at + `showcase/app/hwc/library_templates/kuka_krc4/kuka_krc4_dio512.hwl.yml` + is the one applied in `plc_line.hwl.yml` (`- Apply: kuka_krc4_dio512`). + A different template likely breaks the 64-in / 64-out I/O size assertion + (error 726). + +### `Run()` runs but tasks never start + +**Symptom.** Calls like `ExampleRobot.StartMotorsAndProgram()` stay in a +`IsBusy()` state; `Status.Error.Id` reports 500-range *potential* IDs. + +**Why.** Every task advances its state machine inside +`AxoKrc4.Run()`. The 500-range IDs are informational — they report which +KRC4 input the task is waiting on (e.g. `UserSafetySwitchClosed`, +`DrivesReady`, `Automatic`, `AlarmStopActive`). They are not errors. + +**What to check.** + +- The KRC4 is in external-automatic mode (`Inputs.ExternalAutomatic = TRUE`) + and not in `Inputs.Manual`. Any active task immediately raises error + 20001 in manual mode. +- `Inputs.UserSafetySwitchClosed`, `Inputs.AlarmStopActive`, and + `Inputs.DrivesReady` track the KRC4 safety circuit. Tasks block on + these; if they never assert, inspect the E-stop chain on the robot cell. +- `Inputs.Error = TRUE` raises error 20005 while a task is busy; clear + the KRC4-side fault, then call `ExampleRobot.ErrorConfirmation` via + `Outputs.ErrorConfirmation` or run the `Restore` sequencer step. +- `Config.TaskTimeout` has not elapsed (default `LT#50S`). Set to `0s` + during commissioning to disable the watchdog. + +### Movement parameters never take effect + +**Symptom.** `StartMovements(params)` stays busy; `Status.Error.Id` +cycles through 554–559 (or 528–533 for the combined task). + +**Why.** The task writes movement parameters to `Outputs` and then waits +for the KRC4 to mirror each parameter back on `Inputs` before advancing. +If the mirror never happens the task is stuck at `_movement_progress = 354`. + +**What to check.** + +- The KRC4 programme on the controller side is running and processing the + AXOpen interface (the `I_O_ACT` output must be accepted; `I_O_ACTCONF` + should come back on `Inputs.InterfaceActivated`). +- The `ActionNo` written by the PLC (`Outputs.ActionNo`) matches the value + echoed back on `Inputs.ActionNo`. The component handshakes action numbers + `253`, `254`, `255` during the movement step machine; a mismatch means + the KRC4 programme is not advancing. +- `AXOpen.Components.Robotics.CoordinatesAreNearlyEqual` returns `TRUE` for + the commanded vs. echoed coordinates within `0.01` tolerance. Values + outside that tolerance keep the task in the acknowledge state. + +### PROFINET read / write transport failures + +**Symptom.** `Status.Error.Id` reports 1201 or 1231 and the component +`RETURN`s early each cycle, freezing all tasks. + +**Why.** + +- 1201 — `Siemens.Simatic.DistributedIO.ReadData` returned a non-zero + status. The 64-byte input block could not be fetched from slot 2. +- 1231 — `Siemens.Simatic.DistributedIO.WriteData` returned a non-zero + status. The 64-byte output block could not be pushed to slot 2. + +**What to check.** + +- The PROFINET device is online (link up, device name applied, IP reachable). + These are transport failures, not configuration faults. +- No other controller owns the same PROFINET device name + (`PROFINET_DEVICE_NAME_X1: kuka_rb1` in the shipped template). +- Slot 2 still contains the `512_DI_DO` submodule — replacing or removing + it after commissioning invalidates `HwID_512_DI_DO`. + +### Safety-interlock errors while a task is busy + +`AxoKrc4` arms a safety gate around every programme/motion task. While +`StartAtMainTask`, `StartMotorsAndProgramTask`, `StartMovementsTask`, +`StopMovementsTask`, `StopMovementsAndProgramTask`, or `StopProgramTask` +is busy, the component raises one of 20001–20005 as soon as the +corresponding input asserts/deasserts: + +| Id | Condition | Meaning | +|----|-----------|---------| +| 20001 | `Inputs.Manual = TRUE` | KRC4 went to T1 while a task is executing — automation path invalid. | +| 20002 | `Inputs.Automatic = FALSE` | KRC4 dropped out of auto — task is now illegal. | +| 20003 | `Inputs.AlarmStopActive = FALSE` | Alarm-stop dropped, likely external E-stop. | +| 20004 | `Inputs.UserSafetySwitchClosed = FALSE` | User safety gate opened during motion. | +| 20005 | `Inputs.Error = TRUE` | KRC4 itself raised an error while the task was running. | + +Resolution: bring the cell back into the safe automatic state, call the +task's `Restore()` method so its state machine rewinds, then re-invoke the +task. + +## Error ID reference + +### Hardware bring-up errors (first cycle) + +| Id | Category | Raised when | +|----|----------|-------------| +| 700 | ProgrammingError | `Run()` called with `inParent = NULL`. | +| 701 | ProgrammingError | `Run()` called with `hwID = 0`. | +| 702 | Error | `ReadSlotFromHardwareID` returned `WORD#8090` — unknown hardware ID. | +| 710 | Error | Slot 1 (reserved for a safety module) reports a non-zero hardware ID — unexpected module occupies slot 1. | +| 720 | Error | Slot 2 hardware ID is `0` — `512_DI_DO` submodule missing. | +| 721 | Error | Slot 2 probe returned `WORD#8091`. | +| 722 | Error | Slot 2 probe returned `WORD#8094`. | +| 723 | Error | Slot 2 probe returned `WORD#8095`. | +| 724 | Error | Slot 2 probe returned `WORD#8096`. | +| 725 | Error | Slot 2 probe returned `WORD#8097`. | +| 726 | Error | Slot 2 I/O address range is not 64 in / 64 out. Wrong module template applied. | +| 1130 | Error | Post-probe re-check — `inParent = NULL`. | +| 1131 | Error | Post-probe re-check — `HwID_Device = 0`. | +| 1132 | Error | Post-probe re-check — `HwID_None <> 0`. | +| 1133 | Error | Post-probe re-check — `HwID_512_DI_DO = 0`. | + +### Cyclic I/O errors + +| Id | Category | Raised when | +|----|----------|-------------| +| 1201 | Error | `DistributedIO.ReadData` returned non-zero status — PROFINET read failed. | +| 1231 | Error | `DistributedIO.WriteData` returned non-zero status — PROFINET write failed. | + +### Runtime safety errors (during a busy task) + +| Id | Category | Raised when | +|----|----------|-------------| +| 20001 | Error | `Inputs.Manual = TRUE`. | +| 20002 | Error | `Inputs.Automatic = FALSE`. | +| 20003 | Error | `Inputs.AlarmStopActive = FALSE`. | +| 20004 | Error | `Inputs.UserSafetySwitchClosed = FALSE`. | +| 20005 | Error | `Inputs.Error = TRUE`. | + +### Task "potential" (waiting-on-input) identifiers + +The 500-range identifiers are informational — the component uses them to +show which KRC4 input the currently-executing task is waiting on. They +are surfaced via `TaskMessenger` (category `Potential`) only after +`Config.InfoTime` has elapsed, so a brief wait never raises them. Typical +ranges: + +| Range | Task | What the task is waiting for | +|-------|------|------------------------------| +| 500 | `StartAtMain` | `StartAtMain` input acknowledgement. | +| 510–516 | `StartAtMain` handshake progression | Interface activate, drives ready, programme start confirmation. | +| 520–536 | `StartMotorsProgramAndMovements` | Combined motor/programme/movement bring-up. | +| 540–542 | `StartMotors` | `UserSafetySwitchClosed`, `AlarmStopActive`, `DrivesReady`. | +| 550–562 | `StartMovements` | `ProActive`, `DrivesReady`, `StopMess` clear, parameter acknowledge. | +| 570–576 | `StopMovements` / `StartMotorsAndProgram` | Drive-off handshake, mirrored parameters. | +| 580 | `StartProgram` | Programme start acknowledgement. | +| 590, 591 | `StopProgram`, `StopMovementsAndProgram` | Programme stop acknowledgement. | +| 600, 610, 620 | `StopMovements`, `StopMotors`, `ResetAllOutputs` | Final shutdown handshakes. | + +A *potential* entry is not a fault — inspect the KRC4 inputs named in the +task's current step comment. A task only converts to an error (`10020`, +`10040`, `10041`, …) after `Config.ErrorTime` elapses without the +expected input. + +## Diagnostics + +Read these properties when triaging: + +- `Status.Error.Id` — last raised error (most recent `Messenger.Activate` + call wins). +- `Status.Action.Id` — current macro state of the task layer + (120s / 140s / 150s / 160s ranges mirror `_power_progress` and + `_movement_progress`). +- `_power_progress`, `_movement_progress` — internal step indices. Exposed + read-only on the component so the HMI shows where a task is paused. +- `HardwareDiagnosticsTask` — the embedded `AxoHardwareDiagnostics` task + returns detailed PROFINET slot health; run it whenever transport errors + (1201 / 1231) appear. +- `Messenger` and `TaskMessenger` — the component's two messenger + channels. The first carries errors/programming faults; the second + carries task-level *potential* / info messages. + +## Known limitations + +- Only the KRC4 slot layout `kuka_krc4_dio512` (64-byte I/O) is recognised. + Swapping slot 2 for a different submodule invalidates `HwID_512_DI_DO` + and raises error 720/726. +- Slot 1 must be left empty. Adding a safety module there is currently + unsupported — error 710 is raised pre-emptively (the commented-out error + IDs 711–716 in the source show this branch was intentionally disabled). +- A single `hwID` device is supported per `AxoKrc4` instance; multi-arm + coordination happens at the application level, not inside the component. + +## Support + +Unfortunately, we don't have a direct solution to every problem. If you +encounter an issue not covered here, please +[file a report on our GitHub](https://github.com/inxton/AXOpen/issues/new/choose). +We appreciate your feedback and patience. --- From fc46c06955454669a9f976cc42b175aab1ca478f Mon Sep 17 00:00:00 2001 From: Peter Kurhajec <61538034+PTKu@users.noreply.github.com> Date: Wed, 22 Apr 2026 10:55:49 +0200 Subject: [PATCH 4/4] feat: Add support for KUKA KRC5 controller in AxoKrc4 library - Updated documentation to reflect KRC5 support, including changes to AxoKrc4_v_5_x_x.md and README.md. - Introduced new showcase file AxoKrc4_v_5_x_x_Krc5Showcase.st for KRC5 instance. - Enhanced CHANGELOG.md to document new features and updates related to KRC5. - Modified hardware configuration files to include KRC5 device and IO system wiring. - Updated Blazor showcase to include KRC5 specific tabs and functionality. - Adjusted the search registry to include KRC5 related paths and tags. --- CHANGELOG.md | 30 +++ .../docs/AxoKrc4_v_5_x_x.md | 62 +++-- .../docs/CHANGELOG.md | 23 ++ src/components.kuka.robotics/docs/README.md | 31 ++- src/showcase/app/hwc/plc_line.hwl.yml | 12 + .../Documentation/KukaRobotics.razor | 192 +++++++++++++++- .../Services/Search/ShowcasePageRegistry.cs | 8 +- .../AxoKrc4_v_5_x_x_Krc5Showcase.st | 211 ++++++++++++++++++ .../Documentation/KukaRobotics.st | 2 + 9 files changed, 542 insertions(+), 29 deletions(-) create mode 100644 src/showcase/app/src/components.kuka.robotics/Documentation/AxoKrc4_v_5_x_x_Krc5Showcase.st diff --git a/CHANGELOG.md b/CHANGELOG.md index 21c07f9d0..7a38f37c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,33 @@ +### [KUKA] KRC5 showcase, docs, and central changelog ([#1117](https://github.com/Inxton/AXOpen/pull/1117)) + +**Note:** Extends the KRC5 library assets landed in [#1116](https://github.com/Inxton/AXOpen/pull/1116) with full showcase and documentation coverage. No runtime behavior change in `AxoKrc4` — the existing class drives both KRC4 and KRC5 because the slot 1 / slot 2 = `DIO512` layout is identical. + +- feat: Copied `kuka_krc5_dio512.hwl.yml` into `showcase/app/hwc/library_templates/kuka_krc5/`. +- feat: Added `` (IP `192.168.100.106`, `kuka_rb2`) and `` regions to `showcase/app/hwc/plc_line.hwl.yml`. +- feat: Added third showcase ST file `AxoKrc4_v_5_x_x_Krc5Showcase.st` demonstrating the same `AxoKrc4` proxy driving a KRC5 device via `kuka_rb2_HwID`. +- feat: Wired the KRC5 instance (`axoKrc4_v_5_x_x_krc5`) into `KukaRobotics.st` documentation context. +- feat: Added `AxoKrc4 on KRC5` tab to the Blazor showcase page with live `RenderableContentControl`, code-reference, hardware-configuration, and example-sequence sub-tabs; registered KRC5 DocFX snippet markers (`Krc5GenericComponent*`). +- feat: Updated `ShowcasePageRegistry.cs` `SourceFilePaths` with the new KRC5 showcase, hwl template, and library assets; tags extended with `KRC4`/`KRC5`. +- docs: `src/components.kuka.robotics/docs/README.md` — Hardware-assets table extended with KRC5 rows; intro updated to state both KRC4 and KRC5 are supported. +- docs: `src/components.kuka.robotics/docs/AxoKrc4_v_5_x_x.md` — subtitle + intro updated; HARDWARE tab split per controller; new "KRC5 example" code-reference block; KRC5 device instantiation + IO system `[!code-yaml[]]` directives. +- docs: Appended `0.51.0` entry to `src/components.kuka.robotics/docs/CHANGELOG.md` covering the KRC5 library + showcase + docs work. + +**Impact:** +- Application engineers can drop a KUKA KRC5 cell into their `plc_line.hwl.yml` using the shipped `kuka_krc5_dio512` template and use the existing `AxoKrc4` proxy — no library code changes required on consumer side. +- Showcase demonstrates the KRC5 integration live, side-by-side with two KRC4 variants. +- Central search index surfaces KRC5 documentation when users search for "KRC5" or "KUKA". + +**Risks/Review:** +- New template uses the updated hwc address schema (`Type: IPv4/Profinet` split). Verify the showcase `apax hwc && apax hwfd` run regenerates `HwIdentifiers.st` with a `kuka_rb2_HwID` constant; if the generated name differs, update `AxoKrc4_v_5_x_x_Krc5Showcase.st` `Run()` argument. +- The KRC5 GSDML filename contains a space (`GSDML-V2.4-KUKA-KR C5-20220704.xml`) — any tooling that splits on whitespace must quote the path. +- Per-library CHANGELOG version bumped to `0.51.0` (minor — new feature). + +**Testing:** +- `apax ib` in `src/showcase/app/` after `apax hwc && apax hwfd` to verify the KRC5 device wires through to the ST showcase. +- `dotnet build` on `src/showcase/app/ix-blazor/showcase.blazor/` to verify the razor page + search registry + HwIdentifiers reference compile. +- Load the "KUKA Robotics" page in the Blazor app and confirm all three tabs (KRC4 Example 1, KRC4 Example 2, AxoKrc4 on KRC5) render; on a connected PLC, verify the KRC5 sequencer step-logic cards populate. +- `scripts/_build_documentation.ps1` to verify the new `[!code-yaml]` / `[!code-pascal]` directives resolve against the new tagged regions. + ### [KUKA] KRC4 documentation refresh and GSDML/hw template callouts ([#TBD](https://github.com/Inxton/AXOpen/pulls)) **Note:** Documentation-only change for `components.kuka.robotics`. No runtime behavior modified. diff --git a/src/components.kuka.robotics/docs/AxoKrc4_v_5_x_x.md b/src/components.kuka.robotics/docs/AxoKrc4_v_5_x_x.md index a9b7b6663..f4b3ba050 100644 --- a/src/components.kuka.robotics/docs/AxoKrc4_v_5_x_x.md +++ b/src/components.kuka.robotics/docs/AxoKrc4_v_5_x_x.md @@ -1,14 +1,19 @@ # AxoKrc4_v_5_x_x -_KUKA KRC4 industrial robot controller_ +_KUKA KRC4 / KRC5 industrial robot controller_ `AxoKrc4` (namespace `AXOpen.Components.Kuka.Robotics.v_5_x_x`) is the -controller proxy for robots driven by a KUKA KRC4. It extends -`AXOpen.Core.AxoComponent` and implements +controller proxy for robots driven by a KUKA **KRC4 or KRC5** controller. +It extends `AXOpen.Core.AxoComponent` and implements `AXOpen.Components.Abstractions.Robotics.IAxoRobotics`, exposing all programme and motion commands as `AxoTask` instances that advance their state machine inside the component's `Run()` call. +Both controller families share an identical AXOpen slot layout (slot 1 +reserved, slot 2 = `DIO512` with 64-byte cyclic I/O). The component source +and API are therefore **identical** for KRC4 and KRC5 — only the GSDML and +PROFINET device template differ at hardware configuration time. + ## Capabilities - Programme control — `StartAtMain`, `StartProgram`, `StopProgram`, `StartMotorsAndProgram`, `StopMovementsAndProgram`. @@ -79,6 +84,17 @@ zeroing it out for commissioning. [!code-pascal[](../../showcase/app/src/components.kuka.robotics/Documentation/AxoKrc4_v_5_x_x_Showcase2.st?name=ComponentDeclaration)] [!code-pascal[](../../showcase/app/src/components.kuka.robotics/Documentation/AxoKrc4_v_5_x_x_Showcase2.st?name=Initialization)] +## KRC5 example + +A third wired-up instance (`AxoKrc4_v_5_x_x_Krc5Showcase`) drives a **KUKA +KRC5** cell using the same `AxoKrc4` proxy. The only difference at +application level is the hardware identifier — it points at `kuka_rb2` +which is provisioned by the `kuka_krc5_dio512` template in +`plc_line.hwl.yml`. + +[!code-pascal[](../../showcase/app/src/components.kuka.robotics/Documentation/AxoKrc4_v_5_x_x_Krc5Showcase.st?name=ComponentDeclaration)] +[!code-pascal[](../../showcase/app/src/components.kuka.robotics/Documentation/AxoKrc4_v_5_x_x_Krc5Showcase.st?name=Initialization)] + ## Source View the library source at [`AxoKrc4_v_5_x_x.st`](https://github.com/Inxton/AXOpen/tree/dev/src/components.kuka.robotics/ctrl/src/AxoKrc4_v_5_x_x.st). @@ -120,17 +136,27 @@ View the Blazor package at [`AXOpen.Components.Kuka.Robotics.blazor`](https://gi ## Library-shipped assets -The raw KRC4 GSDML and the matching PROFINET device template live inside -the library package so `AxoKrc4` can be wired up without fetching files -from the vendor: +The raw GSDMLs and matching PROFINET device templates for both KRC4 and +KRC5 live inside the library package so `AxoKrc4` can be wired up without +fetching files from the vendor: + +### KRC4 - GSDML — [`ctrl/assets/kuka_krc4/GSDML-V2.33-KUKA-KRC4-ProfiNet_5.0-20181102.xml`](https://github.com/Inxton/AXOpen/tree/dev/src/components.kuka.robotics/ctrl/assets/kuka_krc4/GSDML-V2.33-KUKA-KRC4-ProfiNet_5.0-20181102.xml) — vendor GSDML for Siemens hardware-catalog import. - HW template — [`ctrl/assets/kuka_krc4/kuka_krc4_dio512.hwl.yml`](https://github.com/Inxton/AXOpen/tree/dev/src/components.kuka.robotics/ctrl/assets/kuka_krc4/kuka_krc4_dio512.hwl.yml) — PROFINET device template expected by `Run()` (slot 1 empty, slot 2 = `512_DI_DO`, 64-byte cyclic I/O). -The showcase copies the template into `showcase/app/hwc/library_templates/kuka_krc4/` -so application builds do not need a catalog round-trip. +### KRC5 + +- GSDML — [`ctrl/assets/kuka_krc5/GSDML-V2.4-KUKA-KR C5-20220704.xml`]() + — vendor GSDML for KR C5 (2022-07-04). The filename contains a space. +- HW template — [`ctrl/assets/kuka_krc5/kuka_krc5_dio512.hwl.yml`](https://github.com/Inxton/AXOpen/tree/dev/src/components.kuka.robotics/ctrl/assets/kuka_krc5/kuka_krc5_dio512.hwl.yml) + — same slot 1 / slot 2 = `DIO512` layout as KRC4, using the newer hwc + address schema (`Type: IPv4/Profinet`) and a 4-port switch interface. + +The showcase copies both templates into `showcase/app/hwc/library_templates/kuka_krc4/` +and `.../kuka_krc5/` so application builds do not need a catalog round-trip. ## Device template @@ -145,8 +171,8 @@ The template provisions a KRC4 as a PROFINET device with two slots: ## I/O mapping -`Run()` takes a single `hwID : UINT` that identifies the KRC4 device in the -configured hardware layout. The component then: +`Run()` takes a single `hwID : UINT` that identifies the KRC4 or KRC5 device +in the configured hardware layout. The component then: 1. Calls `ReadSlotFromHardwareID(hwID)` to obtain the device's geographic address. @@ -160,15 +186,23 @@ configured hardware layout. The component then: `WriteData` transfer the 64-byte blocks bound to `Inputs` / `Outputs`. Use the `AXOpen.Showcase.HwIdentifiers#{device}_HwID` constants to supply -`hwID` from application code (as the showcase does with -`kuka_rb1_HwID`). +`hwID` from application code (as the showcase does with `kuka_rb1_HwID` +for the KRC4 instance and `kuka_rb2_HwID` for the KRC5 instance). -## Device instantiation +## KRC4 device instantiation [!code-yaml[](../../showcase/app/hwc/plc_line.hwl.yml?name=KukaKrc4Device)] -## IO system wiring +## KRC4 IO system wiring [!code-yaml[](../../showcase/app/hwc/plc_line.hwl.yml?name=KukaKrc4IoSystem)] +## KRC5 device instantiation + +[!code-yaml[](../../showcase/app/hwc/plc_line.hwl.yml?name=KukaKrc5Device)] + +## KRC5 IO system wiring + +[!code-yaml[](../../showcase/app/hwc/plc_line.hwl.yml?name=KukaKrc5IoSystem)] + --- diff --git a/src/components.kuka.robotics/docs/CHANGELOG.md b/src/components.kuka.robotics/docs/CHANGELOG.md index b1dde834b..0a40d2366 100644 --- a/src/components.kuka.robotics/docs/CHANGELOG.md +++ b/src/components.kuka.robotics/docs/CHANGELOG.md @@ -29,3 +29,26 @@ - `AxoKrc4_v_5_x_x.md` — HARDWARE tab now opens with a "Library-shipped assets" section linking the GSDML and hw template on GitHub, so integrators see where the raw assets live inside this package. + +### 0.51.0 + +**New features:** +- Added **KUKA KRC5** controller support: the library now ships the KRC5 + GSDML (`ctrl/assets/kuka_krc5/GSDML-V2.4-KUKA-KR C5-20220704.xml`) and + the matching PROFINET device template (`ctrl/assets/kuka_krc5/kuka_krc5_dio512.hwl.yml`). + The existing `AxoKrc4` class drives both KRC4 and KRC5 — the DIO512 slot + layout is identical between the two controllers. + +**Other:** +- `README.md` — Hardware-assets table extended with KRC5 rows; description + updated to call out support for both KRC4 and KRC5 controllers. +- `AxoKrc4_v_5_x_x.md` — subtitle and intro updated to cover KRC4/KRC5; + HARDWARE tab split into per-controller asset sections; new "KRC5 example" + code-reference block pointing at the `AxoKrc4_v_5_x_x_Krc5Showcase.st` + showcase file; added KRC5 device instantiation + IO system wiring + `[!code-yaml[]]` blocks. +- Showcase: added `AxoKrc4_v_5_x_x_Krc5Showcase.st` (third instance, driven + by `kuka_rb2_HwID`); wired into the `KukaRobotics` documentation context; + added an "AxoKrc4 on KRC5" tab to the Blazor page with live rendering, + code reference, hardware configuration, and sequencer views; added KRC5 + search-registry entries. diff --git a/src/components.kuka.robotics/docs/README.md b/src/components.kuka.robotics/docs/README.md index bee93dcee..9b3d4db30 100644 --- a/src/components.kuka.robotics/docs/README.md +++ b/src/components.kuka.robotics/docs/README.md @@ -2,13 +2,13 @@ The **components.kuka.robotics** is a set of libraries covering the product portfolio of the robotics systems from the vendor [Kuka](https://www.kuka.com/en-gb) for the target PLC platform [Siemens AX](https://www.siemens.com/global/en/products/automation/industry-software/automation-software/simatic-ax.html) and [AxOpen](https://github.com/inxton/AXOpen?tab=readme-ov-file) framework. -The package consists of a PLC library providing control logic and its .NET twin counterpart aimed at the visualization part. This package currently covers the robots driven by KRC4 controller. +The package consists of a PLC library providing control logic and its .NET twin counterpart aimed at the visualization part. This package currently covers robots driven by the **KRC4** and **KRC5** controllers. Both controller families expose the same AXOpen-compatible slot layout (slot 1 reserved, slot 2 = 512 DI / 512 DO, 64-byte cyclic I/O) and are driven by the single `AxoKrc4` proxy class — only the GSDML and PROFINET device template differ between them. ### Components | Component | Description | |-----------|-------------| -| [`AxoKrc4`](AxoKrc4_v_5_x_x.md) | KUKA KRC4 controller proxy (namespace `AXOpen.Components.Kuka.Robotics.v_5_x_x`) exposing programme/motion commands, safety state, tool/zone outputs, and hardware diagnostics. Derives from `AxoComponent` and implements `IAxoRobotics`. | +| [`AxoKrc4`](AxoKrc4_v_5_x_x.md) | KUKA KRC4 / KRC5 controller proxy (namespace `AXOpen.Components.Kuka.Robotics.v_5_x_x`) exposing programme/motion commands, safety state, tool/zone outputs, and hardware diagnostics. Derives from `AxoComponent` and implements `IAxoRobotics`. | ### Configuration & state types @@ -30,18 +30,21 @@ The package consists of a PLC library providing control logic and its .NET twin ### Hardware assets -The library ships the KRC4 GSDML and a ready-to-apply PROFINET device -template so the robot can be dropped into a `plc_line.hwl.yml` without -vendor-side configuration: +The library ships GSDMLs and ready-to-apply PROFINET device templates for +both KRC4 and KRC5, so either controller can be dropped into a +`plc_line.hwl.yml` without vendor-side configuration: -| Asset | Path | Purpose | -|-------|------|---------| -| GSDML | [`ctrl/assets/kuka_krc4/GSDML-V2.33-KUKA-KRC4-ProfiNet_5.0-20181102.xml`](../ctrl/assets/kuka_krc4/GSDML-V2.33-KUKA-KRC4-ProfiNet_5.0-20181102.xml) | Vendor GSDML (KUKA KRC4 ProfiNet 5.0, 2018-11-02) for Siemens hardware catalog import. | -| HW template | [`ctrl/assets/kuka_krc4/kuka_krc4_dio512.hwl.yml`](../ctrl/assets/kuka_krc4/kuka_krc4_dio512.hwl.yml) | PROFINET device template with slot 1 empty (safety) and slot 2 = `512_DI_DO` (64-byte in / 64-byte out). Expected by `AxoKrc4.Run()`. | +| Controller | Asset | Path | Purpose | +|------------|-------|------|---------| +| KRC4 | GSDML | [`ctrl/assets/kuka_krc4/GSDML-V2.33-KUKA-KRC4-ProfiNet_5.0-20181102.xml`](../ctrl/assets/kuka_krc4/GSDML-V2.33-KUKA-KRC4-ProfiNet_5.0-20181102.xml) | Vendor GSDML (KUKA KRC4 ProfiNet 5.0, 2018-11-02) for Siemens hardware catalog import. | +| KRC4 | HW template | [`ctrl/assets/kuka_krc4/kuka_krc4_dio512.hwl.yml`](../ctrl/assets/kuka_krc4/kuka_krc4_dio512.hwl.yml) | PROFINET device template with slot 1 empty (safety) and slot 2 = `512_DI_DO` (64-byte in / 64-byte out). Expected by `AxoKrc4.Run()`. | +| KRC5 | GSDML | [`ctrl/assets/kuka_krc5/GSDML-V2.4-KUKA-KR C5-20220704.xml`](<../ctrl/assets/kuka_krc5/GSDML-V2.4-KUKA-KR C5-20220704.xml>) | Vendor GSDML (KUKA KR C5, 2022-07-04) — note the space in the filename. | +| KRC5 | HW template | [`ctrl/assets/kuka_krc5/kuka_krc5_dio512.hwl.yml`](../ctrl/assets/kuka_krc5/kuka_krc5_dio512.hwl.yml) | PROFINET device template with the same slot 1 / slot 2 = `512_DI_DO` layout as KRC4, using the newer hwc address schema (`Type: IPv4/Profinet`) and a 4-port switch interface. | -The showcase application uses the same template via -`showcase/app/hwc/library_templates/kuka_krc4/kuka_krc4_dio512.hwl.yml` -and wires it into `plc_line.hwl.yml` under the `` region. +The showcase application copies both templates into +`showcase/app/hwc/library_templates/kuka_krc4/` and `.../kuka_krc5/` and +wires them into `plc_line.hwl.yml` under the `` and +`` regions respectively. ### Dependencies @@ -56,3 +59,7 @@ and wires it into `plc_line.hwl.yml` under the `` region. [AxOpen-documentation](https://inxton.github.io/AXOpen/) [KUKA documentation](https://www.kuka.com/en-gb) + +[KUKA KRC4 controller family](https://www.kuka.com/en-gb/products/robotics-systems/industrial-robots/controllers/kr-c4) + +[KUKA KRC5 controller family](https://www.kuka.com/en-gb/products/robotics-systems/industrial-robots/controllers/kr-c5) diff --git a/src/showcase/app/hwc/plc_line.hwl.yml b/src/showcase/app/hwc/plc_line.hwl.yml index 9c3402396..3ae30fb5e 100644 --- a/src/showcase/app/hwc/plc_line.hwl.yml +++ b/src/showcase/app/hwc/plc_line.hwl.yml @@ -51,6 +51,15 @@ Devices: PROFINET_DEVICE_NAME_X1: kuka_rb1 # + # + # KUKA KRC5 Robot + - Apply: kuka_krc5_dio512 + Arguments: + NAME: kuka_rb2 + IP_ADDRESS_X1: '192.168.100.106/24' + PROFINET_DEVICE_NAME_X1: kuka_rb2 + # + # # Mitsubishi TZ535 Robot - Apply: mitsubishi_tz535_64b_inout @@ -299,6 +308,9 @@ IoSystems: # - Ref: kuka_rb1/kuka_rb1/Interface1 # + # + - Ref: kuka_rb2/kuka_rb2/Interface1 + # # - Ref: mitsubishi_tz535_robot/mitsubishi_tz535_robot/Interface # diff --git a/src/showcase/app/ix-blazor/showcase.blazor/Pages/components-kuka-robotics/Documentation/KukaRobotics.razor b/src/showcase/app/ix-blazor/showcase.blazor/Pages/components-kuka-robotics/Documentation/KukaRobotics.razor index 25c235fb5..727b824d6 100644 --- a/src/showcase/app/ix-blazor/showcase.blazor/Pages/components-kuka-robotics/Documentation/KukaRobotics.razor +++ b/src/showcase/app/ix-blazor/showcase.blazor/Pages/components-kuka-robotics/Documentation/KukaRobotics.razor @@ -370,6 +370,148 @@ + +
+
+ Maturity: + +
+

+ The same AxoKrc4 proxy drives a KUKA KRC5 cell — the DIO512 slot layout is identical, + so only the GSDML and the device template differ. This tab runs against the kuka_rb2 + KRC5 device provisioned by kuka_krc5_dio512. +

+ + +
+ +
+
+ +
+
+

Component declaration (ST)

+

+ + — <ComponentDeclaration> region +

+ @if (_c3DeclarationSnippet != null && !_c3DeclarationSnippet.IsError) + { + + } + else if (_loadingCode) + { +
Loading...
+ } + else + { +

Unable to load snippet

+ } +
+
+

Component Run call (ST)

+

+ + — <Initialization> region +

+ @if (_c3InitSnippet != null && !_c3InitSnippet.IsError) + { + + } + else if (_loadingCode) + { +
Loading...
+ } + else + { +

Unable to load snippet

+ } +
+
+
+ +
+
+

Device instantiation (hwl)

+

+ + — <KukaKrc5Device> region +

+ @if (_hwcKrc5DeviceInstanceSnippet != null && !_hwcKrc5DeviceInstanceSnippet.IsError) + { + + } + else if (_loadingCode) + { +
Loading...
+ } + else + { +

Unable to load snippet

+ } +
+
+

Device template (hwl)

+

+ +

+
+
+

PROFINET IO system wiring (hwl)

+

+ + — <KukaKrc5IoSystem> region +

+ @if (_hwcKrc5IoSystemSnippet != null && !_hwcKrc5IoSystemSnippet.IsError) + { + + } + else if (_loadingCode) + { +
Loading...
+ } + else + { +

Unable to load snippet

+ } +
+
+
+ +
+ + +
+

Sequencer Step Logic

+

Each block below is parsed from + . +

+ @if (_c3StepLogicBlocks.Count > 0) + { +
+ @foreach (var step in _c3StepLogicBlocks) + { + _c3StepsBySymbol.TryGetValue(step.StepSymbol, out var liveStep); + + } +
+ } + else if (_loadingCode) + { +
Loading step logic...
+ } + else + { +
+ No sequencer step blocks were detected. +
+ } +
+
+
+
+
+
@@ -388,18 +530,26 @@ private CodeSnippet? _c2DeclarationSnippet; private CodeSnippet? _c2InitSnippet; private List _c2StepLogicBlocks = new(); + // Component 3 (KRC5) snippets + private CodeSnippet? _c3DeclarationSnippet; + private CodeSnippet? _c3InitSnippet; + private List _c3StepLogicBlocks = new(); // HWC snippets private CodeSnippet? _hwcDeviceInstanceSnippet; private CodeSnippet? _hwcDeviceTemplateSnippet; private CodeSnippet? _hwcIoSystemSnippet; + private CodeSnippet? _hwcKrc5DeviceInstanceSnippet; + private CodeSnippet? _hwcKrc5IoSystemSnippet; private bool _loadingCode = true; private string _selectedPresentation = "Command-Control"; private readonly string _plcContextPath = "src/showcase/app/src/components.kuka.robotics/Documentation/KukaRobotics.st"; private readonly string _plcComponent1Path = "src/showcase/app/src/components.kuka.robotics/Documentation/AxoKrc4_v_5_x_x_Showcase.st"; private readonly string _plcComponent2Path = "src/showcase/app/src/components.kuka.robotics/Documentation/AxoKrc4_v_5_x_x_Showcase2.st"; + private readonly string _plcComponent3Path = "src/showcase/app/src/components.kuka.robotics/Documentation/AxoKrc4_v_5_x_x_Krc5Showcase.st"; // Hardware configuration paths private readonly string _hwcPlcLineYmlPath = "src/showcase/app/hwc/plc_line.hwl.yml"; private readonly string _hwcDeviceTemplatePath = "src/showcase/app/hwc/library_templates/kuka_krc4/kuka_krc4_dio512.hwl.yml"; + private readonly string _hwcDeviceKrc5TemplatePath = "src/showcase/app/hwc/library_templates/kuka_krc5/kuka_krc5_dio512.hwl.yml"; // Library resource paths private readonly string _libReadmePath = "src/components.kuka.robotics/docs/README.md"; private readonly string _libComponent1DocPath = "src/components.kuka.robotics/docs/AxoKrc4_v_5_x_x.md"; @@ -408,8 +558,11 @@ private readonly string _libApaxYmlPath = "src/components.kuka.robotics/ctrl/apax.yml"; private readonly string _libHwlYmlPath = "src/components.kuka.robotics/ctrl/assets/kuka_krc4/kuka_krc4_dio512.hwl.yml"; private readonly string _libGsdmlPath = "src/components.kuka.robotics/ctrl/assets/kuka_krc4/GSDML-V2.33-KUKA-KRC4-ProfiNet_5.0-20181102.xml"; + private readonly string _libHwlKrc5YmlPath = "src/components.kuka.robotics/ctrl/assets/kuka_krc5/kuka_krc5_dio512.hwl.yml"; + private readonly string _libGsdmlKrc5Path = "src/components.kuka.robotics/ctrl/assets/kuka_krc5/GSDML-V2.4-KUKA-KR C5-20220704.xml"; private Dictionary _c1StepsBySymbol = new(); private Dictionary _c2StepsBySymbol = new(); + private Dictionary _c3StepsBySymbol = new(); protected override async Task OnInitializedAsync() { try @@ -422,22 +575,35 @@ var c2DeclTask = CodeProvider.GetTaggedRegionAsync(_plcComponent2Path, "ComponentDeclaration"); var c2InitTask = CodeProvider.GetTaggedRegionAsync(_plcComponent2Path, "Initialization"); var c2StepsTask = CodeProvider.GetStepLogicBlocksAsync(_plcComponent2Path); + // Component 3 (KRC5) tasks + var c3DeclTask = CodeProvider.GetTaggedRegionAsync(_plcComponent3Path, "ComponentDeclaration"); + var c3InitTask = CodeProvider.GetTaggedRegionAsync(_plcComponent3Path, "Initialization"); + var c3StepsTask = CodeProvider.GetStepLogicBlocksAsync(_plcComponent3Path); // HWC tasks var hwcInstanceTask = CodeProvider.GetTaggedRegionAsync(_hwcPlcLineYmlPath, "KukaKrc4Device"); var hwcTemplateTask = CodeProvider.GetTaggedRegionAsync(_hwcDeviceTemplatePath, "KukaKrc4Template"); var hwcIoSystemTask = CodeProvider.GetTaggedRegionAsync(_hwcPlcLineYmlPath, "KukaKrc4IoSystem"); + var hwcKrc5InstanceTask = CodeProvider.GetTaggedRegionAsync(_hwcPlcLineYmlPath, "KukaKrc5Device"); + var hwcKrc5IoSystemTask = CodeProvider.GetTaggedRegionAsync(_hwcPlcLineYmlPath, "KukaKrc5IoSystem"); await Task.WhenAll(c1DeclTask, c1InitTask, c1StepsTask, c2DeclTask, c2InitTask, c2StepsTask, - hwcInstanceTask, hwcTemplateTask, hwcIoSystemTask); + c3DeclTask, c3InitTask, c3StepsTask, + hwcInstanceTask, hwcTemplateTask, hwcIoSystemTask, + hwcKrc5InstanceTask, hwcKrc5IoSystemTask); _c1DeclarationSnippet = await c1DeclTask; _c1InitSnippet = await c1InitTask; _c1StepLogicBlocks = await c1StepsTask; _c2DeclarationSnippet = await c2DeclTask; _c2InitSnippet = await c2InitTask; _c2StepLogicBlocks = await c2StepsTask; + _c3DeclarationSnippet = await c3DeclTask; + _c3InitSnippet = await c3InitTask; + _c3StepLogicBlocks = await c3StepsTask; _hwcDeviceInstanceSnippet = await hwcInstanceTask; _hwcDeviceTemplateSnippet = await hwcTemplateTask; _hwcIoSystemSnippet = await hwcIoSystemTask; + _hwcKrc5DeviceInstanceSnippet = await hwcKrc5InstanceTask; + _hwcKrc5IoSystemSnippet = await hwcKrc5IoSystemTask; _c1StepsBySymbol = Entry.Plc.Ctx.kuka_robotics_documentation.axoKrc4_v_5_x_x.Steps .ToDictionary( s => s.Symbol.Substring(s.Symbol.LastIndexOf('.') + 1), @@ -448,6 +614,11 @@ s => s.Symbol.Substring(s.Symbol.LastIndexOf('.') + 1), s => s ); + _c3StepsBySymbol = Entry.Plc.Ctx.kuka_robotics_documentation.axoKrc4_v_5_x_x_krc5.Steps + .ToDictionary( + s => s.Symbol.Substring(s.Symbol.LastIndexOf('.') + 1), + s => s + ); } catch (Exception ex) { @@ -466,6 +637,8 @@ var steps1 = Entry.Plc.Ctx.kuka_robotics_documentation.axoKrc4_v_5_x_x.Steps; var seq2 = Entry.Plc.Ctx.kuka_robotics_documentation.axoKrc4_v_5_x_x_2.Sequencer; var steps2 = Entry.Plc.Ctx.kuka_robotics_documentation.axoKrc4_v_5_x_x_2.Steps; + var seq3 = Entry.Plc.Ctx.kuka_robotics_documentation.axoKrc4_v_5_x_x_krc5.Sequencer; + var steps3 = Entry.Plc.Ctx.kuka_robotics_documentation.axoKrc4_v_5_x_x_krc5.Steps; this.StartPolling(seq1, 250); foreach (var step in steps1) { @@ -482,6 +655,14 @@ this.StartPolling(step.Order, 250); this.StartPolling(step.Descr, 500); } + this.StartPolling(seq3, 250); + foreach (var step in steps3) + { + this.StartPolling(step.IsActive, 250); + this.StartPolling(step.IsEnabled, 250); + this.StartPolling(step.Order, 250); + this.StartPolling(step.Descr, 500); + } } } @@ -505,4 +686,13 @@ + + + + + + + + + } diff --git a/src/showcase/app/ix-blazor/showcase.blazor/Services/Search/ShowcasePageRegistry.cs b/src/showcase/app/ix-blazor/showcase.blazor/Services/Search/ShowcasePageRegistry.cs index 670aeb643..04a800a9d 100644 --- a/src/showcase/app/ix-blazor/showcase.blazor/Services/Search/ShowcasePageRegistry.cs +++ b/src/showcase/app/ix-blazor/showcase.blazor/Services/Search/ShowcasePageRegistry.cs @@ -306,18 +306,22 @@ public static List GetAllPages() => LibraryNamespace = "AXOpen.Components.Kuka.Robotics", Category = "Vendor Components", Vendor = "KUKA", - Description = "Practical reference for integrating KUKA robots in SIMATIC AX applications with runnable command widgets and live component status.", + Description = "Practical reference for integrating KUKA KRC4 and KRC5 robots in SIMATIC AX applications with runnable command widgets and live component status.", Icon = "document-text", - Tags = ["KUKA", "robot", "robotics"], + Tags = ["KUKA", "robot", "robotics", "KRC4", "KRC5"], SourceFilePaths = [ "src/showcase/app/src/components.kuka.robotics/Documentation/KukaRobotics.st", "src/showcase/app/src/components.kuka.robotics/Documentation/AxoKrc4_v_5_x_x_Showcase.st", "src/showcase/app/src/components.kuka.robotics/Documentation/AxoKrc4_v_5_x_x_Showcase2.st", + "src/showcase/app/src/components.kuka.robotics/Documentation/AxoKrc4_v_5_x_x_Krc5Showcase.st", "src/showcase/app/hwc/library_templates/kuka_krc4/kuka_krc4_dio512.hwl.yml", + "src/showcase/app/hwc/library_templates/kuka_krc5/kuka_krc5_dio512.hwl.yml", "src/components.kuka.robotics/docs/README.md", "src/components.kuka.robotics/docs/AxoKrc4_v_5_x_x.md", "src/components.kuka.robotics/docs/TROUBLES.md", "src/components.kuka.robotics/ctrl/src/AxoKrc4_v_5_x_x.st", + "src/components.kuka.robotics/ctrl/assets/kuka_krc4/kuka_krc4_dio512.hwl.yml", + "src/components.kuka.robotics/ctrl/assets/kuka_krc5/kuka_krc5_dio512.hwl.yml", "src/components.kuka.robotics/ctrl/apax.yml", ] }, diff --git a/src/showcase/app/src/components.kuka.robotics/Documentation/AxoKrc4_v_5_x_x_Krc5Showcase.st b/src/showcase/app/src/components.kuka.robotics/Documentation/AxoKrc4_v_5_x_x_Krc5Showcase.st new file mode 100644 index 000000000..678e69b41 --- /dev/null +++ b/src/showcase/app/src/components.kuka.robotics/Documentation/AxoKrc4_v_5_x_x_Krc5Showcase.st @@ -0,0 +1,211 @@ +USING AXOpen.Core; + +NAMESPACE AXOpen.Components.Kuka.Robotics + {S7.extern=ReadWrite} + CLASS AxoKrc4_v_5_x_x_Krc5Showcase EXTENDS AXOpen.Core.AxoObject + // + VAR PUBLIC + // KRC5 controller driven by the same AxoKrc4 proxy — + // the slot-2 DIO512 layout is identical between KRC4 and KRC5. + ExampleRobot : AXOpen.Components.Kuka.Robotics.v_5_x_x.AxoKrc4; + END_VAR + // + + // + VAR PUBLIC + movementParams : AXOpen.Components.Abstractions.Robotics.AxoRoboticsMovementsParams; + {#ix-set:AttributeName = "<#Activate manual control#>"} + ActivateManualControl : BOOL; + END_VAR + // + + METHOD PUBLIC OVERRIDE Run + VAR_INPUT + inParent : IAxoObject; + END_VAR + + SUPER.Run(inParent); + + IF ActivateManualControl THEN + ExampleRobot.ActivateManualControl(); + END_IF; + + // + // kuka_rb2_HwID points at the KRC5 device (192.168.100.106) + // provisioned by the kuka_krc5_dio512 template in plc_line.hwl.yml. + ExampleRobot.Run(THIS, AXOpen.Showcase.HwIdentifiers#kuka_rb2_HwID); + // + + THIS.UseInSequencer(); + END_METHOD + + // + VAR PUBLIC + Sequencer : AxoSequencer; + Steps : ARRAY[0..19] OF AXOpen.Core.AxoStep; + END_VAR + + METHOD PRIVATE UseInSequencer + + Sequencer.Run(THIS); + Sequencer.Open(); + Sequencer.SequenceMode := eAxoSequenceMode#RunOnce; + + IF(Steps[0].Execute(Sequencer, 'Restore')) THEN + ActivateManualControl := FALSE; + ExampleRobot.Config.InfoTime := LTIME#2S; + ExampleRobot.Config.TaskTimeout := LTIME#0S; + ExampleRobot.Config.ErrorTime := LTIME#0S; + ExampleRobot.Restore(); + Sequencer.MoveNext(); + END_IF; + + IF(Steps[1].Execute(Sequencer, 'Start at main')) THEN + IF(ExampleRobot.StartAtMain().IsDone()) THEN + Sequencer.MoveNext(); + END_IF; + END_IF; + + IF(Steps[2].Execute(Sequencer, 'Start motors and program')) THEN + IF(ExampleRobot.StartMotorsAndProgram().IsDone()) THEN + Sequencer.MoveNext(); + END_IF; + END_IF; + + IF(Steps[3].Execute(Sequencer, 'Move to position 100')) THEN + movementParams.ActionNo := BYTE#100; + movementParams.GlobalSpeed := BYTE#5; + movementParams.ToolNo := BYTE#10; + movementParams.WorkobjectNo := BYTE#15; + movementParams.PointNo := BYTE#20; + movementParams.UserSpecSpeed1 := INT#25; + movementParams.UserSpecSpeed2 := INT#30; + movementParams.Coordinates.X := REAL#-1.2; + movementParams.Coordinates.Y := REAL#2.3; + movementParams.Coordinates.Z := REAL#3.4; + movementParams.Coordinates.Rx := REAL#4.5; + movementParams.Coordinates.Ry := REAL#5.6; + movementParams.Coordinates.Rz := REAL#6.7; + + IF(ExampleRobot.StartMovements(movementParams).IsDone()) THEN + ExampleRobot.StartMovementsTask.Restore(); + Sequencer.MoveNext(); + END_IF; + END_IF; + + IF(Steps[4].Execute(Sequencer, 'Move to position 1')) THEN + movementParams.ActionNo := BYTE#1; + + IF(ExampleRobot.StartMovements(movementParams).IsDone()) THEN + ExampleRobot.StartMovementsTask.Restore(); + Sequencer.MoveNext(); + END_IF; + END_IF; + + IF(Steps[5].Execute(Sequencer, 'Move to position 3')) THEN + movementParams.ActionNo := BYTE#3; + + IF(ExampleRobot.StartMovements(movementParams).IsBusy() AND Sequencer.CurrentStep.Duration >= T#500ms) THEN + Sequencer.MoveNext(); + END_IF; + END_IF; + + IF(Steps[6].Execute(Sequencer, 'Stop during movement')) THEN + ExampleRobot.StartMovements(movementParams); + IF(ExampleRobot.StopMovements().IsDone()) THEN + Sequencer.MoveNext(); + END_IF; + END_IF; + + IF(Steps[7].Execute(Sequencer, '<#Unlocking and opening the robotic cell#>')) THEN + ExampleRobot.StartMovements(movementParams); + IF (Sequencer.CurrentStep.Duration >= T#1s) THEN + Sequencer.MoveNext(); + END_IF; + END_IF; + + IF (Steps[8].Execute(Sequencer, '<#Closing and locking the robotic cell#>')) THEN + ExampleRobot.StartMovements(movementParams); + IF (Sequencer.CurrentStep.Duration >= T#1s) THEN + Sequencer.MoveNext(); + END_IF; + END_IF; + + IF(Steps[9].Execute(Sequencer, 'Start motors and program')) THEN + ExampleRobot.StartMovements(movementParams); + IF(ExampleRobot.StartMotorsAndProgram().IsDone() AND Sequencer.CurrentStep.Duration >= T#1s) THEN + Sequencer.MoveNext(); + END_IF; + END_IF; + + IF(Steps[10].Execute(Sequencer, 'Continue to position 3')) THEN + ExampleRobot.StartMovements(movementParams); + IF(ExampleRobot.StartMovementsTask.IsDone()) THEN + ExampleRobot.StartMovementsTask.Restore(); + Sequencer.MoveNext(); + END_IF; + END_IF; + + IF(Steps[11].Execute(Sequencer, 'Move to position 100')) THEN + movementParams.ActionNo := BYTE#100; + + IF(ExampleRobot.StartMovements(movementParams).IsDone()) THEN + ExampleRobot.StartMovementsTask.Restore(); + Sequencer.MoveNext(); + END_IF; + END_IF; + + IF(Steps[12].Execute(Sequencer, 'Move to position 1')) THEN + movementParams.ActionNo := BYTE#1; + + IF(ExampleRobot.StartMovements(movementParams).IsDone()) THEN + ExampleRobot.StartMovementsTask.Restore(); + Sequencer.MoveNext(); + END_IF; + END_IF; + + IF(Steps[13].Execute(Sequencer, 'Stop movement and program')) THEN + IF(ExampleRobot.StopMovementsAndProgram().IsDone()) THEN + Sequencer.MoveNext(); + END_IF; + END_IF; + + IF(Steps[14].Execute(Sequencer, 'Stop motors')) THEN + IF(ExampleRobot.StopMotors().IsDone()) THEN + Sequencer.MoveNext(); + END_IF; + END_IF; + + IF(Steps[15].Execute(Sequencer, 'Reset all outputs')) THEN + IF(ExampleRobot.ResetAllOutputs().IsDone()) THEN + Sequencer.MoveNext(); + END_IF; + END_IF; + + IF(Steps[16].Execute(Sequencer, 'Start motors, program and movements combined')) THEN + IF(ExampleRobot.StartMotorsProgramAndMovements(movementParams).IsDone()) THEN + Sequencer.MoveNext(); + END_IF; + END_IF; + + IF(Steps[17].Execute(Sequencer, 'Stop program')) THEN + IF(ExampleRobot.StopProgram().IsDone()) THEN + Sequencer.MoveNext(); + END_IF; + END_IF; + + IF(Steps[18].Execute(Sequencer, 'Start program')) THEN + IF(ExampleRobot.StartProgram().IsDone()) THEN + Sequencer.MoveNext(); + END_IF; + END_IF; + + IF(Steps[19].Execute(Sequencer, 'Restore')) THEN + ExampleRobot.Restore(); + Sequencer.CompleteSequence(); + END_IF; + END_METHOD + + // + END_CLASS +END_NAMESPACE diff --git a/src/showcase/app/src/components.kuka.robotics/Documentation/KukaRobotics.st b/src/showcase/app/src/components.kuka.robotics/Documentation/KukaRobotics.st index bc4839a3a..4626dda6d 100644 --- a/src/showcase/app/src/components.kuka.robotics/Documentation/KukaRobotics.st +++ b/src/showcase/app/src/components.kuka.robotics/Documentation/KukaRobotics.st @@ -5,12 +5,14 @@ NAMESPACE AXOpen.Components.Kuka.Robotics _rootObject : AxoObject; axoKrc4_v_5_x_x : AxoKrc4_v_5_x_x_Showcase; axoKrc4_v_5_x_x_2 : AxoKrc4_v_5_x_x_Showcase2; + axoKrc4_v_5_x_x_krc5 : AxoKrc4_v_5_x_x_Krc5Showcase; END_VAR METHOD PUBLIC Execute _rootObject.Run(THIS); axoKrc4_v_5_x_x.Run(_rootObject); axoKrc4_v_5_x_x_2.Run(_rootObject); + axoKrc4_v_5_x_x_krc5.Run(_rootObject); END_METHOD END_CLASS END_NAMESPACE \ No newline at end of file