IOTService: ใช้ Node-RED อ่านค่า PLC RS485 ผ่าน Serial Server Hi-Flying
Node-RED เป็น Low-Code Platform ยอดนิยมสำหรับ Industrial IoT ที่รองรับการเชื่อมต่อ Modbus TCP ได้โดยตรง เมื่อรวมกับ Serial Server Hi-Flying และ IOTService จะทำให้ Node-RED อ่านค่า PLC RS485 ผ่าน Network ได้ง่ายมาก
Architecture ของระบบ
Node-RED Nodes ที่ต้องติดตั้ง
node-red-contrib-modbus— สำหรับ Modbus TCPnode-red-dashboard— สำหรับ Dashboard แสดงผล
ขั้นตอนการตั้งค่า
ขั้นที่ 1: ตั้งค่า Serial Server
- IOTService → Edit Page → Socket Mode = TCP Server
- Local Port = 502 (Modbus TCP Port มาตรฐาน)
- UART = ค่าที่ตรงกับ PLC (เช่น 9600-8N1)
ขั้นที่ 2: ตั้งค่า Node-RED
- ลาก Node Modbus-Read ลง Flow
- Config: Server = IP ของ Serial Server, Port = 502
- FC = 03 (Read Holding Registers)
- Address = Register ที่ต้องการอ่าน
- Quantity = จำนวน Register
- เชื่อมกับ Debug/Dashboard Node
ขั้นที่ 3: Deploy และดูผล
- กด Deploy ใน Node-RED
- เปิด Debug Panel → เห็นค่า Register จาก PLC
- สร้าง Dashboard แสดงค่าแบบ Real-Time
ตัวอย่าง Node-RED Flow สำหรับ Energy Meter
Modbus-Read → FC3, Addr:0, Qty:2 → Function (Convert to Float) → Dashboard Gauge
ประโยชน์ของ Node-RED + Serial Server
- 📊 สร้าง Dashboard มอนิเตอร์ PLC ได้ในชั่วโมง
- 💾 บันทึกข้อมูลลง InfluxDB หรือ MySQL ได้ง่าย
- 📤 ส่งข้อมูลขึ้น MQTT Broker หรือ Cloud
- ⚡ สร้าง Alert เมื่อค่าเกิน Threshold
- 🔗 เชื่อมต่อกับ LINE Notify, Email, Telegram
Node-RED + Serial Server | English Summary
Combine Node-RED with Hi-Flying Serial Server for a powerful, low-code Industrial IoT solution. Set the Serial Server to TCP Server Mode on Port 502, then use the node-red-contrib-modbus package to read Modbus RTU data via Modbus TCP. Build real-time dashboards, log data to databases, and trigger alerts — all without traditional programming skills. IOTService manages the serial server while Node-RED handles the data flow.
📥 ดาวน์โหลด IOTService สำหรับ Node-RED Integration ที่ VR Automation
🛒 สนใจซื้อ Serial Server Hi-Flying พร้อม IOTService?
VR Automation จำหน่าย Serial Server, PLC, HMI, Inverter, Servo Motor ครบวงจร
📧 [email protected] | 🌐 vrautomation.co.th

