Ladder Diagram (LAD) คือภาษาโปรแกรม PLC ที่นิยมที่สุดในโลก มีรูปแบบคล้าย "บันได" ที่มีเส้นแนวตั้ง 2 เส้น (Rail) และ Rung แนวนอน ออกแบบให้วิศวกรไฟฟ้าที่คุ้นกับ Relay Diagram สามารถเรียนรู้ได้เร็ว
ส่วนประกอบพื้นฐานของ Ladder Diagram
- Normally Open Contact (NO) [ ]: ส่งผ่านสัญญาณเมื่อ Bit = 1
- Normally Closed Contact (NC) [/]: ส่งผ่านสัญญาณเมื่อ Bit = 0
- Output Coil ( ): Set Bit เป็น 1 เมื่อ Rung เป็น True
- Timer: นับเวลาก่อน Activate Output เช่น ON-Delay 5 วินาที
- Counter: นับจำนวนครั้งที่ Input เปลี่ยนสถานะ เช่น นับชิ้นงาน
ตัวอย่าง: เปิด Motor เมื่อกดปุ่ม Start หยุดเมื่อกดปุ่ม Stop
Logic ของ Self-latching Motor Circuit:
Rung แรก: Motor ON เมื่อ Start ถูกกดและ Stop ยังไม่ถูกกด
Self-latch: Motor_Output NO ต่อขนาน Start ทำให้ Motor ค้างอยู่แม้ปล่อยปุ่ม Start
[Start_Button NO] ——[Stop_Button NC]——( Motor_Output )
[Motor_Output NO] ————————————————Rung แรก: Motor ON เมื่อ Start ถูกกดและ Stop ยังไม่ถูกกด
Self-latch: Motor_Output NO ต่อขนาน Start ทำให้ Motor ค้างอยู่แม้ปล่อยปุ่ม Start
ปรึกษาวิศวกรผู้เชี่ยวชาญได้ฟรี
ทีม Xeniel Automation เข้าหน้างานด่วนได้ในพื้นที่ชลบุรี ระยอง ฉะเชิงเทรา
ปรึกษาฟรีทาง LINE โทร 098-965-3845Instruction ที่ใช้บ่อยใน Ladder Diagram
| Instruction | Mitsubishi | Siemens S7 | Omron | หน้าที่ |
|---|---|---|---|---|
| Output Coil | OUT Y | Q bit | OUT | เปิด/ปิด Output |
| Set Coil | SET Y | S bit | KEEP | ค้างค่า 1 ถาวร |
| Reset Coil | RST Y | R bit | KEEP | Reset กลับ 0 |
| On-Delay Timer | OUT T | TON | TIM | นับเวลาก่อน ON |
| Off-Delay Timer | OUT T (พร้อม NC) | TOF | TIMH | นับเวลาก่อน OFF |
| Up Counter | OUT C | CTU | CNT | นับขึ้น |
| Compare | CMP | CMP | CMP | เปรียบเทียบตัวเลข |
| Move | MOV | MOVE | MOV | คัดลอกค่าระหว่าง Register |
ตัวอย่าง Ladder ที่ใช้จริงในโรงงาน
1. Self-latching Motor Circuit (ที่ใช้บ่อยที่สุด)
|--[Start_PB]--+--[Stop_PB_NC]--[OL_NC]--(Motor_Run)--| |--[Motor_Run]-+ |Motor ON เมื่อกด Start AND Stop ไม่ถูกกด AND Overload ไม่ Trip Motor ค้างอยู่ด้วย Self-latch (Motor_Run ขนาน Start)
2. Timer Sequence (Cylinder A → Cylinder B)
|--[Start]---------------------(Cyl_A_FWD)--| |--[Cyl_A_FWD_Sensor]--[T1_DN_NC]--(T1 K30)--| (* Timer 3 วินาที *) |--[T1_DN]-----------------------------(Cyl_B_FWD)--|กด Start → Cylinder A ยืดออก → หลัง 3 วินาที → Cylinder B ยืดออก
ความแตกต่าง Ladder Diagram กับภาษา IEC 61131-3 อื่น
| ภาษา | ย่อ | ลักษณะ | เหมาะกับ |
|---|---|---|---|
| Ladder Diagram | LAD | กราฟิกคล้าย Relay Circuit | ช่างไฟ, Sequence Control ทั่วไป |
| Function Block Diagram | FBD | กล่อง Function เชื่อมต่อกัน | Process Control, PID |
| Structured Text | ST | คล้ายภาษา Pascal/C | Math, Recipe, Complex Logic |
| Sequential Function Chart | SFC | Flowchart State Machine | Step Sequence ที่ซับซ้อน |
| Instruction List | IL | Assembly-like | Legacy, ไม่ค่อยใช้ใหม่ |
ควรเรียกผู้เชี่ยวชาญเมื่อไหร่?
- ต้องการเขียนโปรแกรม Ladder ใหม่สำหรับเครื่องจักรที่ยังไม่มีโปรแกรม
- ต้องการแก้ Logic เดิมที่อ่านไม่ออก ไม่มี Comment
- ต้องการ Training ทีม Maintenance ให้อ่าน Ladder Diagram ได้
สรุป
Ladder Diagram เป็นภาษาที่เรียนรู้ง่ายที่สุดสำหรับงาน Sequence Control พื้นฐาน เหมาะสำหรับช่างโรงงานที่คุ้นกับ Relay Circuit มาก่อน Xeniel Automation รับเขียนและแก้ไขโปรแกรม Ladder Diagram ทุกยี่ห้อสำหรับโรงงานในชลบุรีและระยอง
ต้องการเขียน Ladder Diagram? ปรึกษา Xeniel ฟรี
Xeniel Automation รับเขียนและแก้ไข Ladder Diagram PLC ทุกยี่ห้อ Mitsubishi Siemens Omron ออนไซต์ชลบุรีและระยอง
ปรึกษาฟรีทาง LINE โทร 098-965-3845