Skip to content

Latest commit

 

History

History
323 lines (263 loc) · 8.54 KB

File metadata and controls

323 lines (263 loc) · 8.54 KB

6. Module-Specific Documentation

Table of Contents

6.1 Overview of All Modules

The APS consists of eight distinct module types, each serving a specific role in the production process.

Production Module Summary

Module Type Primary Function Commands Supported
MILL Processing Milling/machining workpieces PICK, MILL, DROP
DRILL Processing Drilling operations PICK, DRILL, DROP
OVEN Processing Heat treatment/baking PICK, FIRE, DROP
AIQS Quality Control Automated quality inspection CHECK_QUALITY, PICK, DROP
DPS I/O Goods receipt and delivery PICK, DROP
HBW Storage High-bay warehouse storage PICK, DROP
AGV Transport Automated Guided Vehicle DOCK, PASS, TURN
CGW Integration Cloud gateway bridge N/A (bridge only)

6.2 Common Topics for All Modules

All production modules (MILL, DRILL, OVEN, AIQS, DPS, HBW) use the same topic structure:

Subscribed Topics (Module receives from CCU)

module/v1/ff/<serial>/order          # Production commands
module/v1/ff/<serial>/instantAction  # Immediate actions

Published Topics (Module sends to CCU)

module/v1/ff/<serial>/state          # Current state (1Hz or on change)
module/v1/ff/<serial>/connection     # ONLINE/OFFLINE status (retained + LWT)
module/v1/ff/<serial>/factsheet      # Capabilities (on startup)

AGV uses parallel topics with the fts/ prefix instead of module/.

6.3 Common Commands

All production modules support these basic commands:

Note: For system-wide commands (like Factory Reset or Park), see Section 8.6 System-Wide Actions.

PICK Command

Purpose: Take a workpiece from the AGV onto the module

Example Order Message:

{
  "timestamp": "2024-12-08T10:30:00.000Z",
  "serialNumber": "MILL001",
  "orderId": "order-123",
  "orderUpdateId": 1,
  "action": {
    "id": "action-456",
    "command": "PICK"
  }
}

Expected Behavior:

  1. Module activates suction/gripper
  2. Picks up workpiece from AGV loading bay
  3. Transports workpiece to processing position
  4. Reports FINISHED when complete

State Updates:

// During execution
{
  "actionState": {
    "id": "action-456",
    "state": "RUNNING",
    "command": "PICK"
  }
}

// On completion
{
  "actionState": {
    "id": "action-456",
    "state": "FINISHED",
    "command": "PICK"
  },
  "loads": [
    {
      "loadId": null,
      "loadType": "WHITE",
      "loadPosition": "MODULE"
    }
  ]
}

DROP Command

Purpose: Place workpiece from module onto AGV

Example Order Message:

{
  "timestamp": "2024-12-08T10:35:00.000Z",
  "serialNumber": "MILL001",
  "orderId": "order-123",
  "orderUpdateId": 3,
  "action": {
    "id": "action-789",
    "command": "DROP"
  }
}

Expected Behavior:

  1. Module transports workpiece to handover position
  2. Places workpiece on AGV loading bay
  3. Releases workpiece
  4. Returns to home position
  5. Reports FINISHED when complete

State Updates:

// On completion
{
  "actionState": {
    "id": "action-789",
    "state": "FINISHED",
    "command": "DROP"
  },
  "loads": []
}

6.4 Module-Specific Processing Commands

Each processing module has its unique production command:

Module Command Metadata Duration
MILL MILL duration (seconds) Configurable, default 5s
DRILL DRILL duration (seconds) Configurable, default 5s
OVEN FIRE duration (seconds) Configurable, default 10s
AIQS CHECK_QUALITY None Fixed (~3s)

Example MILL Command:

{
  "timestamp": "2024-12-08T10:32:00.000Z",
  "serialNumber": "MILL001",
  "orderId": "order-123",
  "orderUpdateId": 2,
  "action": {
    "id": "action-def",
    "command": "MILL",
    "metadata": {
      "duration": 8
    }
  }
}

6.5 Operating Modes

Modules can operate in different modes:

AUTOMATIC Mode

Normal production operation. Module executes commands from the CCU.

State Message:

{
  "operatingMode": "AUTOMATIC",
  "actionState": {...}
}

TEACHIN Mode (Calibration)

Module is in calibration/setup mode. Only calibration instant actions are processed.

State Message:

{
  "operatingMode": "TEACHIN",
  "actionState": null
}

How to Enter: Send instant action:

{
  "serialNumber": "MILL001",
  "timestamp": "2024-12-08T11:00:00.000Z",
  "actions": [
    {
      "actionType": "startCalibration",
      "actionId": "calib-123"
    }
  ]
}

6.6 Availability States

The CCU tracks module availability based on state messages:

State Description Can Accept Orders?
READY Idle, no active action, no errors ✅ Yes
BUSY Executing an action ❌ No
BLOCKED Error state or offline ❌ No

6.7 Error Handling

When a module encounters an error:

  1. Set Action State to FAILED:
{
  "actionState": {
    "id": "action-456",
    "state": "FAILED",
    "command": "PICK"
  }
}
  1. Add Error to errors Array:
{
  "errors": [
    {
      "errorType": "PICK_ERROR",
      "timestamp": "2024-12-08T10:30:15.000Z",
      "errorLevel": "FATAL",
      "errorReferences": [
        {
          "referenceKey": "reason",
          "referenceValue": "no_workpiece_detected"
        }
      ]
    }
  ]
}
  1. CCU Response:
    • Marks order as ERROR
    • May retry or cancel depending on error type
    • Logs error for monitoring

6.8 Typical Action Sequence

Example: Milling a workpiece

1. AGV arrives and docks at MILL
   AGV publishes: {lastNodeId: "MILL001", waitingForLoadHandling: true}

2. CCU sends PICK command to MILL
   → module/v1/ff/MILL001/order {action: {command: "PICK"}}

3. MILL picks up workpiece
   MILL publishes: {actionState: {state: "RUNNING", command: "PICK"}}
   MILL publishes: {actionState: {state: "FINISHED", command: "PICK"}, loads: [{loadType: "WHITE"}]}

4. CCU sends clearLoadHandler to AGV
   → fts/v1/ff/AGV001/instantAction {actionType: "clearLoadHandler", metadata: {loadDropped: true}}

5. AGV acknowledges
   AGV publishes: {waitingForLoadHandling: false, load: []}

6. CCU sends MILL command to MILL
   → module/v1/ff/MILL001/order {action: {command: "MILL", metadata: {duration: 5}}}

7. MILL processes workpiece
   MILL publishes: {actionState: {state: "RUNNING", command: "MILL"}}
   [5 seconds pass]
   MILL publishes: {actionState: {state: "FINISHED", command: "MILL"}}

8. CCU sends DROP command to MILL
   → module/v1/ff/MILL001/order {action: {command: "DROP"}}

9. MILL returns workpiece to AGV
   MILL publishes: {actionState: {state: "RUNNING", command: "DROP"}}
   MILL publishes: {actionState: {state: "FINISHED", command: "DROP"}, loads: []}

10. CCU sends clearLoadHandler to AGV
    → fts/v1/ff/AGV001/instantAction {actionType: "clearLoadHandler", metadata: {loadDropped: false, loadType: "WHITE"}}

11. AGV acknowledges and can continue
    AGV publishes: {waitingForLoadHandling: false, load: [{loadPosition: "2", loadType: "WHITE"}]}

6.9 Module Documentation Links

For detailed command references, examples, and module-specific behavior:

Next Steps

  • Review individual module documentation for specific examples
  • See Calibration for tuning production parameters
  • Check Manual Intervention for safety guidelines