📋 2 Scenario & Required Tasks
📋

Scenario & Required Tasks

1 Connectivity & Asset Model (Weight 20 %)

  1. Connect OPC-UA, API, DB ผ่าน Ignition or Peakboard

  2. จัด Asset Model (Ideally according to ISA-95 Format)

2 Event & Transaction Tables (Weight 30%)

ในการออกแบบ MES ที่ดี จำเป็นต้องแยกข้อมูลออกเป็น Event Tables ที่ชัดเจน เพื่อง่ายต่อการคำนวณ วิเคราะห์ และสร้าง Dashboard ภายหลัง

🔧 ตารางที่ควรสร้างทั้งหมด

Table name Format Logic Hints
state_history timestamp, asset_id, state เก็บทุกครั้งที่เครื่องจักรเปลี่ยนสถานะ อ่านจาก N3StateCode (OPC-UA)Mapping:801 = Running803 = Stoppedอื่นๆ = Offline
count_history timestamp, machine_id, good_cnt, reject_cnt เก็บค่าการผลิตทุก 1 นาที ใช้ค่า Counter (OPC-UA) สำหรับ good_cntReject count = 0 (ไม่มี reject data ในโจทย์นี้)เก็บแบบ delta หรือ snapshot ได้
prod_run run_id, line, start_ts, end_ts, planned_qty, total_count, total_downtime_s สร้างรอบการผลิตอัตโนมัติ Auto-start ทุกวันตาม slot:00:00-04:00, 08:00-12:00, 12:00-16:00, 16:00-20:00, 20:00-00:00ใส่ planned_qty เป็น NULL หรือ 0 สำหรับโจทย์นี้
hvac_state timestamp, state เก็บสถานะ Run/Stop ของ HVAC อ่านจาก vibration sensor RMS Acceleration (เลือก X หรือ Z Axis)กำหนด Threshold โดยประมาณจากค่าเฉลี่ยเริ่มต้นเช่น 0.5 Gถ้า RMS ≥ Threshold → RUNต่ำกว่า → STOP
power15m period_start, area, kWh รวมการใช้พลังงานทุก 15 นาที อ่าน EqvActivePower จาก API Server (Area 1 และ Area 3)คำนวณ kWh = Σ(kW × 15min ÷ 60)บันทึกผลแยกตาม Area

🏭 คำอธิบายเพิ่มเติมสำหรับ Production Run (prod_run)

  • การมี Production Run Table ช่วยให้การคำนวณ KPI ต่อรอบทำได้ง่าย เช่น Downtime ต่อ Run, Output ต่อ Run, Energy Consumption ต่อ Run

  • ช่วยลดความซับซ้อนเวลา query เพราะสามารถ Join ตาม run_id ได้ตรง ๆ

  • ใน MES ระบบจริง เช่น Ignition, Tulip, Plex — Production Run จะเป็นหนึ่งใน Master Transaction หลัก

  • การออกแบบนี้ถือเป็น Best Practice สำหรับระบบ MES ที่ต้องการความยืดหยุ่นในการทำ Reporting ในอนาคต

คำอธิบายเพิ่มเติมสำหรับ HVAC State (hvac_state)

  • HVAC Chiller ไม่มี Tag แสดงสถานะ Run/Stop โดยตรง

  • ใช้ค่า Vibration Sensor (RMS Acceleration) เพื่อวิเคราะห์สถานะ Run

  • Threshold สามารถกำหนดจากค่าอ่านจริงในช่วง Start-Up (ค่าตัวอย่างประมาณ 0.5 G)

  • เมื่อค่า RMS ข้าม threshold → เก็บ State Change ลงใน hvac_state Table พร้อม timestamp

💡 หมายเหตุรวม (General Notes)

  • Timestamp ทั้งหมดให้เก็บตามเวลาระบบ (Local Server Time)

  • สามารถออกแบบระบบ logging โดยใช้:

    • Transaction Group

    • Tag Event Script

    • Named Query

    • Expression หรือ Python Scripting (ใน Ignition)

3 Visualization & UX (Weight 40%)

ในระบบ MES Application จะมี 3 กลุ่มงานหลักของ Visualization ได้แก่:

  • 3.1 Production Monitoring

  • 3.2 Predictive Maintenance — HVAC Monitoring

  • 3.3 Energy Management

3.1 Production Monitoring (การติดตามกระบวนการผลิต)

A. Operator Interface (Real-Time HMI Application)
  • แสดงสถานะเครื่องจักร (Machine Status: Traffic Light Style)
    • Running = Green, Stopped = Yellow, Offline = Red
  • แสดง Current Production Run Count (จำนวนชิ้นงานที่ผลิตในรอบการผลิตปัจจุบัน)
  • แสดง Actual Cycle Time / Run Rate (จำนวนชิ้นงานต่อชั่วโมง / นาที)
  • แสดงช่วงเวลา Production Run Slot ที่กำลังทำงานอยู่
B. Production Overview ANDON State (Production Snapshot)
  • หน้าจอรวมสถานะเครื่องจักรทุกเครื่องในสายการผลิต (Overview Board)
  • เหมาะสำหรับ Supervisor ใช้ตรวจสอบสถานะเครื่องจักรในภาพรวมแบบ real-time
C. Production Scorecard
  • สรุปผลผลิตรวมในแต่ละช่วงเวลา:
    • ต่อรอบการผลิต (Production Run)
    • ต่อกะการทำงาน (Shift Summary)
    • ต่อวัน (Daily Summary)
  • สรุป Downtime (%) ต่อรอบ
  • (สามารถเพิ่ม OEE KPI เป็น Bonus Option ได้)

3.2 Predictive Maintenance — HVAC Monitoring

A. HVAC Runtime State Visualization
  • แสดงช่วงเวลาที่ HVAC อยู่ในสถานะ RUN / STOP
  • ใช้ Gantt Chart หรือ Bar Chart สรุปรายวันหรือย้อนหลัง 24 ชั่วโมง
B. HVAC Asset Health Monitoring
  • แสดงค่า Vibration RMS (เลือก Axis X หรือ Z)
  • แสดงค่า Peak Velocity และ Temperature
  • สร้าง Trend Graph สำหรับวิเคราะห์แนวโน้มสุขภาพของ HVAC ในเชิง Predictive Maintenance
C. HVAC Alarm
  • ตั้งเงื่อนไข Alarm:
    • เมื่อค่า Vibration RMS > 115% ของค่าเฉลี่ยใน Production Run
  • ต้องแสดงผล:
    • Active Alarms (ปัจจุบัน)
    • Alarm Log (ประวัติย้อนหลังพร้อม Timestamp)

3.3 Energy Management

A. 15-Minute Energy Usage Trend
  • แสดงการใช้พลังงานของแต่ละพื้นที่ (Area 1 & Area 3)
  • ใช้ข้อมูลจาก power15m
  • แสดงผลเป็น:
    • Bar Chart
    • หรือ Heatmap (แสดง Pattern การใช้พลังงานตามช่วงเวลาในวัน)
B. Daily Energy Summary
  • สรุปผลรวมพลังงานไฟฟ้า (kWh) ต่อวัน
  • แยกตามแต่ละ Area

3.4 หลักการออกแบบ Visualization (Design Guideline)

  • แบ่งหน้าจอแยกตามหมวด (Function Group)

    • Production Monitoring → หน้า Operator & Supervisor

    • HVAC Monitoring → หน้า Predictive Maintenance

    • Energy Usage → หน้า Energy Management

  • ใช้ Layout ที่ชัดเจน เข้าใจง่าย (Simple & Clean)

  • ใช้ Color Code, Icons และ Indicators ให้เข้าใจภายใน 3 วินาที

4 Documentation & Packaging (Weight 10%)

  • README.md (EN) อธิบาย architecture, tag path, DB schema, import steps

  • Export Ignition project .zip หรือ Peakboard/N3uron config + SQL script

Deliverables

File/Artifact Format
Project Backup IgnitionProject.gwbk หรือ PBConfig.pb / N3Config.json
SQL Script schema.sql + sample queries
Short Video Demo (≤ 5 min) .mp4 / YouTube unlisted
README Markdown / PDF

Submission: share and send to recruit@appomax.co

Evaluation Matrix

Category Max Pts
Connectivity & Asset Model 20
Data Tables & Logic Accuracy 30
UI/UX & Dashboard Quality 40
Code Quality & Documentation 10
Total 100


GOOD LUCK!!!