Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
52 changes: 52 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,55 @@
### [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 `<KukaKrc5Device>` (IP `192.168.100.106`, `kuka_rb2`) and `<KukaKrc5IoSystem>` 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.

- docs: Added `<AxoKukaRoboticsConfigDeclaration>` and `<AxoKukaRoboticsHWIDsDeclaration>` 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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
NAMESPACE AXOpen.Components.Kuka.Robotics.v_5_x_x
// <AxoKukaRoboticsConfigDeclaration>
{#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#>"}
ErrorTime : LTIME := LT#5S;
{#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
// </AxoKukaRoboticsConfigDeclaration>
END_NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
NAMESPACE AXOpen.Components.Kuka.Robotics.v_5_x_x
NAMESPACE AXOpen.Components.Kuka.Robotics.v_5_x_x
// <AxoKukaRoboticsHWIDsDeclaration>
{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;
{#ix-set:AttributeName = "<#Hardware ID of the 'None' submodule#>"}
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
// </AxoKukaRoboticsHWIDsDeclaration>
END_NAMESPACE
148 changes: 138 additions & 10 deletions src/components.kuka.robotics/docs/AxoKrc4_v_5_x_x.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,55 @@
# AxoKrc4_v_5_x_x

_KUKA KRC4 industrial robot controller_

Generated documentation for the `AxoKrc4_v_5_x_x` component.
_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 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`.
- 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)

Expand All @@ -26,20 +73,42 @@ 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)]

## 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/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

Expand All @@ -61,20 +130,79 @@ 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 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).

### KRC5

- GSDML — [`ctrl/assets/kuka_krc5/GSDML-V2.4-KUKA-KR C5-20220704.xml`](<https://github.com/Inxton/AXOpen/tree/dev/src/components.kuka.robotics/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

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 or KRC5 device
in the configured hardware layout. The component then:

## Device instantiation
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`
for the KRC4 instance and `kuka_rb2_HwID` for the KRC5 instance).

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

---
Loading
Loading