Title: Implementation of Control Theory
Course: 2016FA-MCO-110-401 > Section: Module 5: Control Theory

Click here for a downloadable version of this document:(EXTERNAL) Implementation of Control Theory

(There are other methods of implementation that we will not cover; for the purpose of this course we will focus on the following.)

Relay Ladder Logic

Ladder logic was the first language of programmable controllers. Electricians would draw relay ladders to document the design of a relay rack. Ladder logic functions are implemented through the development of the ladder diagram. It uses relays or a switch to implement Boolean[1] expressions. However, today most implementations are achieved with the use of PLCs, instead of relays.

A ladder diagram is used to represent the logic in an easy to see graphical format. The diagram is named ladder because it is made up of two vertical lines resembling the rails of ladder and of horizontal lines resembling the steps or rungs on a ladder. The vertical lines are energized at different voltages. Each rung on the ladder (or horizontal line) contains at least one device that energy can flow through. These can be relays or a device mimicking a relay, indicator lamps, or other devices [11].

IEC 61131-3

In 1993 the International Electrotechnical Commission published the IEC 61131-3 standard; its purpose was to standardize existing PLC languages. This is an eight part standard that specifies the syntax and semantics of a suite of programming languages for programmable controllers.

IEC 61131-3: 2013

- Textual Languages
  - Instruction List (IL)
  - Structured Text (ST)
- Graphical Languages
  - Ladder Diagram (LD)
  - Function Block Diagram (FBD)

The most recent version was written in 2013 and an abstract of the standard can be accessed through the IEC website [12] [13].

PLC Programming Languages

Instruction List

Instruction List (IL) is a low level language that is compact and similar to assembly language [14]. IL is similar to mnemonic programming languages.

Structured Text

Structured Text (ST) language is a high level language similar in structure to Pascal [14]. ST is made up of variables, operators, expressions, and control flow [15].

Ladder Diagram (Ladder Logic)

Ladder Diagram (LD) language or Ladder Logic mimics the logic creation that was used with relay systems and was created to be easily used by plant electricians who were already well versed in relays and the electrical wiring and contacts that were used with them to create logic. (This way electricians could still work in plants as they moved from relays to PLCs and they were not overwhelmed by having to learn a completely new language [14].) LD is considered the first language used for PLCs and is still the most commonly used.

Function Block Diagram

Function Block Diagram (FBD) is a language that lends itself to maintaining programs, it is structured with blocks that contain functions that act on input wires and output the result [14]. FBD is a graphical dataflow programming method.

Sequential Function Chart

Sequential Function Chart (SFC) language is a self-documenting, graphical language that makes is easy to see the big picture of overall program flow [14]. SFC is similar to flowcharts. It consists of steps which initiate action blocks and action qualifiers which direct (logic).

Structured Programming

Structured programming is a type of programming that uses a hierarchy or is sometimes considered top down programming. It can be broken down into three categories: sequential, test, and iteration [16]. Examples could include Java and C.

Event Driven Programming

Programming in which events (like mouse clicks or key presses) determine the flow of program execution is called Event Driven programming [17]. An event could actually be either user generated or a system event (like a program loading) [18]. Event driven programming is an approach to programming and does not require its own language, therefore event driven programming or applications can be made in any programming language. LabVIEW (which is the shortened version of Laboratory Virtual Instrument Engineering Workbench), a National Instruments developed system design platform for a visual programming language called G, makes use of Event Driven programming [19]. You may use LabVIEW already, it is used in industry and education as a tool that helps boost productivity. Additionally, many various web applications use event driven programming.

[1] Boolean – “A subset of Algebra used for creating true/false statements. Boolean expressions use the operators AND, OR, XOP, and NOT to compare values and return a true or false result [37]”.

Objectives met:
- C5
- 5.9