BIION-D Docs

Case 1: Plastic Discs — Case 0 with Dashboard & PLC

Training Exercise 1 — Extend Case 0 YOLO face detection and counting with custom dashboard telemetry and PLC line integration.

Scenario Overview

Start from the working Case 0 pipeline: YOLO detects each plastic disc, identifies Face A or Face B, and the Plugin exports count_a, count_b, and total_count. Extend that same workflow to communicate the results to a custom dashboard and the line PLC:

  • Face Orientation and Counting: Keep the Case 0 YOLO detections and per-face counts.
  • Telemetry Dispatch: Send the counts and cycle metadata via Webhook to an external custom dashboard.
  • PLC Handshaking:
    • Read the cycle trigger and active batch ID from the line PLC via OPC-UA Reader.
    • Write the count of Face A and Face B back to the PLC registers via OPC-UA Writer.

Scope Note: Reuse Case 0 without adding anomaly detection or surface defect inspection. The new work is dashboard and PLC integration.


Assignment Tasks

You are required to build and configure the inspection pipeline:

  1. Pipeline Architecture: Extend the Case 0 Action Plan to sequence PLC reading, image capture, YOLO detection, counting, and external communication.
  2. Detection and Counting: Keep the Case 0 Object Detection classes (disc_face_a and disc_face_b) and Plugin outputs (count_a, count_b, and total_count). Format a JSON payload from the exported counts and cycle metadata.
  3. Webhook Dashboard Dispatch: Configure a Webhook module to HTTP POST the counts and telemetry payload to the dashboard endpoint.
  4. PLC Output Handshaking: Configure the OPC-UA Writer module to map the exported counts (count_a, count_b) to their corresponding PLC nodes.

System Specifications & Constraints

Parameter Specification
Inspection Scope Classify disc face orientation (Face A vs Face B) and count the quantity of each.
Available Camera 1 camera.
Available Lighting few lights.
Model Type Object Detection (classes disc_face_a and disc_face_b).
Plugin Output Count of Face A (count_a), count of Face B (count_b), and total (total_count).
External Dashboard HTTP POST endpoint receiving JSON payload with count_a, count_b, and total_count.
PLC Communication OPC-UA server on Main_PLC with readable Trigger/BatchID and writable count registers.

Acceptance Criteria

Your solution will be evaluated against the following criteria:

  • [ ] The pipeline contains the correct sequence of modules from input capture to external output without dependency conflicts.
  • [ ] The Case 0 detection and per-face counting still work for all visible discs.
  • [ ] The Webhook module sends a valid JSON payload containing the counts to the dashboard endpoint.
  • [ ] The OPC-UA tags in the PLC update with the matching count_a and count_b values.