Lecture 27 PLC Languages
-
Upload
bmshivakumar -
Category
Documents
-
view
6 -
download
0
description
Transcript of Lecture 27 PLC Languages
Programmable Logic Programmable Logic ControllersControllers
Lecture 27Lecture 27
PLC LanguagesPLC Languages
Jesus is a friend who knows all your faults and still loves you anyway.
But God demonstrates his own love for us in this: While we were still sinners, Christ died for us. Romans 5:8
AgendaAgenda
IEC 61131 StandardProgramming ModelsInstruction ListStructured TextLadder DiagramFunction Block DiagramSequential Function Charts
IEC 61131 StandardIEC 61131 Standard
•Common and open framework •Loosely defined•Approved in 1992•Six Main Components
- IEC 61131-1 Overview- IEC 61131-2 Requirements and Test Procedures- IEC 61131-3 Data Types and Programming- IEC 61131-4 User Guidelines- IEC 61131-5 Communications- IEC 61131-7 Fuzzy Control
Programming ModelsProgramming Models
IL (Instruction List)ST (Structured Text)LD (Ladder Diagram)FBD (Function Block Diagram)SFC (Sequential Function Charts)
Instruction ListInstruction List
•Textual PLC Programming Language•Effectively Like Assembly Programming •Best Suited for Small Uncomplicated Programs•Instructions Consist of:
- Operator- Modifier- Operand
Example: AND NOT 00200
Instruction List ExampleInstruction List Example
Instruction List Example 2Instruction List Example 2
Structured TextStructured Text
• Textual PLC programming language• Effectively like BASIC programming • Easiest to troubleshoot and understand• Useful for implementing calculation-intensive functions and other difficult functions• Instructions consist of constructs
•Example: Analog_Out := Error * Gain;
Structured TextStructured Text
* Sample Structured Text Code * (comments)VAR (variables)
temp: INT;error: BOOL;
END_VARtemp := %IW4; (addresses)IF temp > 3200 THEN
error := TRUE;%QW := 200;
ELSE%QW := temp / 16;
END_IF;
Ladder DiagramLadder Diagram
• Primary programming language• Resembles original relay logic documentation• Addressing and memory is different for every manufacturer• Ladder logic scanning (rung order vs. network column)• Not purely parallel processor like relay logic
Ladder DiagramLadder Diagram
Function Block DiagramFunction Block Diagram
• Graphical data-flow programming method• Interconnected blocks• Similar to Ladder Logic
Function Block Diagram ExampleFunction Block Diagram Example
Sequential Function ChartsSequential Function Charts
• Graphical method for structuring programs• Design tool for sequential problems•Consists of:
- Interconnected steps- Actions- Transitions
Sequential Function Chart Sequential Function Chart ExampleExample