Skip to content
Open
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
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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 `<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
106 changes: 100 additions & 6 deletions src/components.kuka.robotics/docs/AxoKrc4_v_5_x_x.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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

Expand All @@ -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

Expand Down
23 changes: 23 additions & 0 deletions src/components.kuka.robotics/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` — `<AxoKukaRoboticsConfigDeclaration>`.
- `AxoKukaRobotics_HWIDs.st` — `<AxoKukaRoboticsHWIDsDeclaration>`.

### 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.
50 changes: 49 additions & 1 deletion src/components.kuka.robotics/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<KukaKrc4Device>` 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)
Loading
Loading