บทที่ O06 · SCADA · CX-Supervisor

SCADA ด้วย Omron CX-Supervisor

จาก HMI หน้าเดียวไปสู่ SCADA ที่ มองทั้งโรงงาน — บทนี้แนะนำ Concept SCADA, เปรียบเทียบกับ HMI, และพาเริ่มต้นใช้ CX-Supervisor เพื่อทำ Visualization บน PC ที่เชื่อมกับ CP1L (และอุปกรณ์อื่น) ผ่าน Modbus / FINS / OPC

SCADA Software for Learning book cover
ปกหนังสือ "SCADA Software for Learning — เริ่มต้นการเรียนรู้ SCADA Software" ของ Omron Thailand — ตำราเรียนภาษาไทยที่ใช้ใน Lab
Gallery of SCADA screenshots
ตัวอย่าง SCADA จริงในอุตสาหกรรม — Plant overview, Tank levels, 3D process view, Web-based dashboard, Trend charts — ทั้งหมดสร้างด้วย SCADA software

SCADA vs HMI — ต่างกันยังไง

HMISCADA
Hardwareกล่องสำเร็จรูป + Touch ScreenSoftware รันบน Windows PC
หน้าจอ1 เครื่อง, 1 ตู้Multi-screen + Multi-station
จำนวน Tagหลักร้อยหลักหมื่น–แสน
การเชื่อมต่อ1-2 PLCหลาย PLC + Database + Web
Trend / Historyระยะสั้น (จำกัด SD card)เก็บนาน, ต่อ SQL DB ได้
Alarm / EventPopup+ Email / SMS / Database log
Scriptingจำกัด (Macro)VBScript / Python / Recipe
ตัวอย่างสินค้าSamkoon SK-070FS, Weintek MT8071, Pro-faceCX-Supervisor, FactoryTalk, Wonderware, Ignition
ราคา~5,000–30,000 บาท/ตัวLicense ~50,000+ บาท (ต่อ runtime)
เมื่อไหร่ต้องใช้ SCADA? ใช้ HMI ถ้าควบคุมเครื่องจักร เดี่ยว ๆ · ใช้ SCADA เมื่อ:
· มี PLC หลายตัวที่ต้องมองพร้อมกัน
· ต้องการเก็บ Production Data ลง Database
· มี Operator ดูจากห้อง Control Room แยกออกจากเครื่อง
· ต้องการ KPI / Reporting / Email Alarms

CX-Supervisor — รุ่นและ License

LicenseTag limitราคาประมาณเหมาะกับ
CX-Supervisor Lite500 tags~50,000 บาทเครื่องจักรขนาดเล็ก, lab
CX-Supervisor Plus (Machine Edition)2,000 tags~100,000 บาทเครื่องจักรขนาดกลาง
CX-Supervisor ProUnlimited~250,000 บาทSCADA ทั้งโรงงาน
CX-Supervisor Developer Trial2 ชั่วโมง runtimeฟรีเรียนรู้และทำ Lab
สำหรับ Lab — ใช้ Trial ดาวน์โหลด CX-Supervisor Trial จาก Omron — ใช้งานได้ครบทุกฟีเจอร์ แค่ Runtime ตัดที่ 2 ชั่วโมงต่อ session เพียงพอสำหรับการเรียนและ Demo

Editor Toolbar ของ CX-Supervisor

CX-Supervisor editor icons reference
8 Editor หลักใน CX-Supervisor:
📁 Work Space — แสดงรายการทุกอย่างใน Project
🔔 Alarm Editor — เพิ่ม/แก้ Alarm
🎬 Animation Editor — Add Script ให้ Page
📍 Point Editor — เพิ่ม Tag (Point) ที่เชื่อมกับ PLC
📄 Project Editor — ดูรายชื่อ Page ทั้งหมด
🍲 Recipe Editor — กำหนดสูตรการผลิต
📚 Graphic Library Editor — เลือก Symbol สำเร็จรูป
▶️ Run The Project — เริ่มรัน SCADA

เริ่มสร้าง Project ใน CX-Supervisor

  1. เปิด CX-Supervisor Developer Start → CX-Supervisor → CX-Supervisor Developer — ตัว Developer ใช้สำหรับสร้าง ส่วน Runtime คือตัวรันโปรเจคที่ทำเสร็จแล้ว
  2. สร้าง Project ใหม่ File → New Project → ตั้งชื่อ → เลือกโฟลเดอร์เก็บ → กด OK
  3. เพิ่ม PLC Connection Project → Add PLC
    • PLC Type: CP1L
    • Network: FinsEthernet หรือ FinsGateway (สำหรับ USB/Serial)
    • IP Address: 192.168.250.1 (IP ของ PLC)
    • Node Number: 1
  4. กด Test Connection ต้องได้ "Connection OK" — ถ้าไม่ได้ ตรวจ IP / Firewall / สาย LAN ก่อน
  5. สร้าง Points (Tags) Project → Points → เพิ่ม Point ใหม่ →
    • Name: Pump_Run
    • Type: Boolean
    • I/O Source: PLC ที่เพิ่มไว้
    • Address: 100.00 (= Y0 ของ PLC)
    ทำเหมือนกันสำหรับทุก Tag ที่ต้องใช้ (Temperature, Pressure, Speed, ฯลฯ)

🏷️ ลองเชื่อม Tag → PLC Address

ลองดูว่าตัวแปรในระบบจริงควรไปวางที่ Address ไหนของ CP1L · ลากแต่ละชิ้นไปหา address ที่ถูกต้อง (ใส่ Boolean ใน CIO bit, Word ใน DM):

การออกแบบหน้าจอ (Mimic)

Mimic = หน้าจอ Process Visualization ของ SCADA — ใช้ Drag-Drop วาง object แล้ว link กับ Points:

SCADA mimic example — Sugar process plant
ตัวอย่าง Mimic ที่สมบูรณ์ — กระบวนการผลิตน้ำเชื่อม: Steam Valve / Stew Motor / Syrup Valve / Sugar Hopper / Hot Water Valve / Cyclone · แสดง TEMP 647°C + LEVEL 1030 L real-time · ปุ่ม START SYSTEM / CLOSE valves · Alarm log ซ้ายล่าง (OVER_LEVEL → NORMAL)
CX-Supervisor Percentage Fill animation dialog
หน้าตั้งค่า Percentage Fill animation — Active Expression Range (Min 0 / Max 100) → เปอร์เซ็นต์ของพื้นที่ object ที่จะถูก fill, Fill Direction Left to Right หรือ Right to Left — เหมาะกับ tank level / progress bar
  1. สร้าง Page Project → Add Page → Main
  2. วาง Object พื้นฐาน Toolbox มี:
    • Rectangle, Line, Polygon — สำหรับวาด Process Diagram (ท่อ, ถัง, มอเตอร์)
    • Button — Toggle Bit / Push command
    • Numeric Display — แสดงค่าตัวเลข
    • Text Display — แสดงข้อความสถานะ
    • Bar Graph / Trend — Visualization ค่าตามเวลา
    • Library Symbol — มอเตอร์, วาล์ว, ท่อ, ถัง — สำเร็จรูป
  3. Link Object กับ Point คลิกขวา → Properties → Animations tab → เลือก:
    • Visible / Hidden — แสดงเมื่อ Bit ON/OFF
    • Color Change — เปลี่ยนสีตามสถานะ
    • Movement / Rotation — เคลื่อนที่ตามค่า (เช่น Pointer)
    • Text/Value Update — เปลี่ยนข้อความหรือตัวเลขตาม Point

การทำ Trend Chart

  1. วาง Trend Object Toolbox → Trend → ลากวางใน Page
  2. เพิ่ม Pens (เส้นกราฟ) คลิกขวาที่ Trend → Properties → Pens tab → Add:
    • Point: Temperature_PV
    • Color: แดง
    • Min/Max: 0 – 100°C
    เพิ่มได้หลายเส้น (เช่น PV, SV, MV พร้อมกัน)
  3. ตั้ง Sampling Properties → General tab → Sample interval = 1 วินาที, History buffer = 1 hour
CX-Supervisor Axis Scaling dialog
หน้า Axis Scaling สำหรับ Trend Graph — Minimum/Maximum Scale Value (0–1000), Minor/Major Display Units (100/200), Scale Units (Y-Axis), Style: Display Ticks/Units/Grid

Alarms

  1. กำหนด Alarm Point Project → Points → เลือก Point → Alarms tab → Add:
    • Type: High (เกิดเมื่อค่าเกิน), Low, Equal
    • Limit: 80 (เช่น Temperature High Alarm)
    • Priority: 1-15
    • Message: "Temperature exceeded 80°C"
  2. เพิ่ม Alarm Display ใน Page → ลาก Alarm Summary object → จะ list alarms ที่กำลัง active
  3. Acknowledge Operator คลิกที่ Alarm → กด Acknowledge → Alarm ย้ายไป "Acknowledged" list (แต่ยังคง active จนเงื่อนไขกลับ normal)

Scripting (VBScript)

CX-Supervisor รองรับ VBScript สำหรับ Logic ที่ Mimic ทำไม่ได้:

' ตรวจสอบทุก 1 วินาที ถ้า Temperature > 90 → ดับ Pump
Sub Page1_OnTick()
    If Temperature_PV.Value > 90 Then
        Pump_Run.Value = 0
        Application.LogEvent "Auto-stop: Temp too high"
    End If
End Sub

' เมื่อกดปุ่ม Start
Sub btnStart_OnClick()
    If Door_Closed.Value = 1 And Emergency_OK.Value = 1 Then
        Pump_Run.Value = 1
    Else
        MsgBox "Safety condition not met!"
    End If
End Sub

Recipe (สูตรการผลิต)

SCADA ให้ Operator เลือก Recipe แล้วโหลดทุกค่า Setpoint ลง PLC พร้อมกัน:

  1. สร้าง Recipe Group Project → Add → Recipe — ตั้งชื่อ "Production_Recipes"
  2. กำหนด Fields
    • Temperature_SP (Number)
    • Pressure_SP (Number)
    • Speed_SP (Number)
    • Duration (Number)
  3. เพิ่ม Recipes เพิ่มแถว: "Product_A" (Temp=60, Pressure=2.5, Speed=1500), "Product_B" (Temp=80, ...) ฯลฯ
  4. Load Recipe จากปุ่ม Button → Script: RecipeLoad "Production_Recipes", "Product_A" — ค่าทั้งหมดจะไปอยู่ใน Points ที่ map ไว้ → ส่งเข้า PLC ทันที

Architecture ตัวอย่างของระบบ Lab

PC (Windows)

CX-Supervisor Runtime

  • Mimic Pages
  • Trend / Alarm
  • Recipe Database
  • Operator Login

PLC + Field

CP1L-EM30DT-D · Ethernet

  • Modbus RTU Master
  • → Inverter + E5CC + …
FINS / Modbus TCP บน Ethernet LAN

SQL Database (optional)

← เก็บ Trend log · Production records · Alarm history

SCADA ทางเลือก — สำรวจตลาด 2026

SCADAผู้ผลิตเด่นที่
CX-SupervisorOmronใช้คู่ Omron PLC ได้สนิทที่สุด (Native FINS)
Sysmac Studio HMIOmronสำหรับ NJ/NX — ใช้ NA-series HMI
FactoryTalk View SERockwellคู่ Allen-Bradley PLC
Wonderware (AVEVA) InTouchAVEVAตัวเก่าแก่ที่นิยม โรงงานใหญ่
Inductive Automation IgnitionInductive AutomationLicense แบบ Server (จ่ายครั้งเดียว) · MQTT-friendly · Modern Web-based — กำลังร้อนแรงในไทย
WinCC (Siemens)Siemensสำหรับ Siemens PLC
Node-RED / Grafana (Open Source)Communityฟรี — เหมาะกับ Hobbyist และต้นแบบ
เลือก SCADA ยังไง? ดูที่ PLC ที่ใช้ ก่อน — ถ้าทุก PLC ของโรงงานเป็น Omron → CX-Supervisor ได้ Native integration ถ้าผสมหลาย Brand → ใช้ SCADA ที่รองรับ OPC UA (Ignition, Wonderware) จะ flexible กว่า

สรุปบทนี้

เอกสารอ้างอิงสำหรับบทนี้

ถัดไป — ลงมือทำ SCADA จริง

บทนี้ปูพื้นความเข้าใจเรื่อง SCADA Concept ครบแล้ว — ขั้นต่อไปคือ Workshop: O07 — SCADA Workshop ที่จะให้คุณ ลงมือสร้าง SCADA จริง 3 Step ติด: หลอดกะพริบ → ระบบเติมน้ำ → โรงงานช็อกโกแลต (Capstone) — มีทั้ง Browser Sim ให้กดเล่น และ CX-Supervisor Lab Handout