หลักการเขียนแลดเดอร์ไดอะแกรม
5.1 หลักการเขียนแลดเดอร์ไดอะแกรม(Ldder Diagram) แลดเดอร์ไดอะแกรมเป็นโปรแกรมเป็นภาษาที่นิยมเขียนกันมากเพราะคล้ายกับวงจรรีเลย์เพียงแต่ต้องรู้ หลักการแลดเดอร์ไดอะแกรม เพิ่มเติมโดยมีหลัการเขียนดังต่อไปนี้




















5.2 การเขียนคำสั่งภาษาบูลีนจากแลดเดอร์ไดอะแกรม
ในการป้อนโปแกรมในนอกจากภาษาแลดเดอร์แล้เรายังสามารถใช้คำสั่งภาษาบูลลีนในการป้อนโปรแกมซึ่งPLCขนาดกลาง
นิยมใช้คำสั่งภาษาบูลลีนมากทั้งนี้ได้มีการแปลงจากแลเดอร์ไดอะแกรมมาเป็นภาษาบูลลีน
โครงสร้างโปรแกรมภาษาบูลลีนประกอบด้วย 3 ส่วนหลักดังนี้
1. หมายเลขกำหนดลำดับของบรรทัด(ADDRESS)
2. ส่วนที่เป็นคำสั่ง(INSRUCTION)
3. หมายกับกับอุปกรณ์ภายใน PLCและหน้าสัมผัสต่าง(DATA)
5.3 ตัวอย่างการเขียนคำสั่งภาษาบูลลีนจากแลเดอร์ไดอะแกรม

![]() แลดเดอร์ไดอะแกรม วงจรสัญญาณเข้าเพียงหนึ่งตัว |
|

![]() วงจรอันดับหรือวงจรอนุกรม(Series Cricuti) |
|

![]() วงจรขนาน (Parallel Cricuit) |
|

![]() วงจรรักษาสภาวะให้คงไว้(Self Honlding Curit) |
|

![]() วงจรสลับการทำงานหรือเลือกลำดับในการทำงาน |
|

![]() วงจรผสม(Compound Criccurit) |
|

![]() วงจรผสมชนิดใช้คำสั่ง OR LD(Copound Curit (OR LD)) |
ADDRESS
|
INSTRUCTION
|
DATA
|
00000
|
LD
|
00001
|
00001
|
LD
|
00002
|
00002
|
AND
|
00003
|
00003
|
OR LD
|
-
|
00004
|
AND
|
00004
|
00005
|
OUT
|
00002
|
00006
|
END
|
-
|

![]() วงจรผสมใช้คำสั่งชนิด AND LD |
ADDRESS
|
INSTRUCTION
|
DATA
|
00000
|
LD
|
00001
|
00001
|
AND NOT
|
00002
|
00002
|
LD
|
00003
|
00003
|
OR
|
00004
|
00004
|
AND LD
|
-
|
00005
|
AND NOT
|
00005
|
00006
|
OUT
|
00200
|
00007
|
END
|
-
|

![]() วงจรผสมชนิดใช้คํ่าสั่งAND LD และ OR LD |
ADDRESS
|
INSTRUCTION
|
DATA
|
00000
|
LD
|
00001
|
00001
|
OR
|
00200
|
00002
|
LD
|
00003
|
00003
|
AND
|
00004
|
00004
|
LD
|
00005
|
00005
|
AND
|
00006
|
00006
|
OR LD
|
-
|
00007
|
AND LD
|
-
|
00008
|
OUT
|
00200
|
00009
|
END
|
-
|

![]() วงจรสัญญาณออกรวม |
ADDRESS
|
INSTRUCTION
|
DATA
|
00000
|
LD
|
00001
|
00001
|
OUT
|
00200
|
00002
|
AND
|
00002
|
00003
|
OUT
|
00201
|
00004
|
AND
|
00003
|
00005
|
OUT
|
00202
|
00006
|
END
|
-
|
ไม่มีความคิดเห็น:
แสดงความคิดเห็น