Академический Документы
Профессиональный Документы
Культура Документы
Ladder Diagram(LD)
Function Block Diagram(FBD)
Structured Text(ST)
Instruction List(IL)
Sequential Function Chart(SFC)
From all of these five languages mostly ladder diagram and function block diagram are most popular
for the programming of the Controller.
1. Ladder diagram
The ladder diagram is graphical representation of programming language using relay based
logic. To programming a DCS controller in ladder logic follows the same ladder logic as in the PLC.
All the connections and logics are same for both that controllers.
The ladder name is derived from the programs resemblance to a ladder with two vertical rails and a
series of horizontal rungs between them. The rails included in the ladder logic are called a power
rails. DCS ladder logic contains all the logics and instructions as the PLC logic contains.
DCS ladder logic is used for the higher level application. All the logics and instructions in both the
controllers are same as each other.
There are many types of instructions in ladder logic as shown below.
1. Basic instructions- NO -||- , NC -|/|- and output relay logic.
2. Arithmetic instructions- in which all the addition, subtraction, multiplication and dividing
functions contains.
3. Timer & Counter instructions- from which we can set the timers to automatically on-off the
process after some time.
So there are so many instruction format contains in the ladder logic. And it is also a simplest level
language format among all the other formats and also mostly used format for programming also.
2. Functional Block Diagram (FBD)
A functional block diagram, also a graphical representation of various mathematical and logical
functions, is primarily developed for programming continuous process automation, even though it
also supports discrete process automation.
FBD has also some rules and it based on the following:
Graphical representation of programming elements, which are modular, repetable, and
reusable in different parts of the program.
VAR_GLOBAL
RETAIN
CONSTANT
END_VAR
Global variable
Value is retained when the power is lost
a value that cannot be changed
marks the end of a variable declaration
Number types includes: Integers, Real numbers, Real with exponents, Binary numbers, Octal
numbers, Hexadecimal numbers & Boolean numbers. Almost all Mathematical, Logical and
Conditional operators used in C are available in ST also.
Control programs can become very large. When written in a single program these become confusing,
and hard to write/debug. The best way to avoid the endless main program is to use subroutines to
divide the main program. The IEC61131 standard allows the definition of subroutines/functions. The
function will accept up to three inputs and perform a simple calculation. It then returns only one
value.
4. Instruction List (IL)
Instruction List is a low level language and resembles assembly language of programming
controllers. It uses very simple instructions similar to the original mnemonic programming languages
developed for PLCs. It is the most fundamental level of programming language - all other
programming languages can be converted to IL programs. Most programmers do not use IL
programming on a daily basis, unless they are using hand held programmers.
Program control (control flow) is achieved by jump instructions, function calls and subroutines. A
rung of ladder logic contains four inputs, and one output. It can be expressed in a Boolean equation
using parentheses and in turn the Boolean equation can then be directly converted to instructions of
Instruction List.
The beginning of the program begins at the START: label. At this point the first value is loaded, and
the rest of the expression is broken up into small segments. The only significant change is that AND
NOT becomes AND.
All instructions are to be enclosed in a parenthesis. An important concept in this programming
language is the stack. The instruction values are pushed on the stack until the most deeply nested
term is found. The LD instruction pushes the first value on the stack. The end of a parenthesis sends
the stack downwards and the value of stack is incremented.
Allen Bradley and Siemens both have their own version of IL programming. Allen Bradley only
supports IL programming on the Micrologix 1000, and does not plan to support it in the future.
5. Sequential Function Chart (SFC)
All of the previous methods are well suited to processes that have a single state active at any one
time. This is adequate for simpler machines and processes, but more complex machines are designed
perform simultaneous operations. This requires a controller that is capable of concurrent processing this means more than one state will be active at any one time. This could be achieved with multiple
state diagrams, or with more mature techniques such as Sequential Function Charts.
Sequential Function Chart (SFC) is a graphical technique for writing concurrent control programs. It
can be used to program processes that can be split into steps.
Main components of SFC are:
Steps with associated actions
Transitions with associated logic conditions
Directed links between steps and transitions
Steps in an SFC diagram can be active or inactive. Actions are only executed for active steps. A step
can be active for one of two motives:
It is an initial step as specified by the programmer
It was activated during a scan cycle and not deactivated since
Steps are activated when all steps above it are active and the connecting transition (its associated
condition) is true. When a transition is passed, all steps above are deactivated at once and after all
steps below are activated at once. Actions associated with steps can be of several types, the most
relevant ones being Continuous (N), Set (S) and Reset (R). Apart from the obvious meaning of Set
and Reset, an N action ensures that its target variable is set to 1 as long as the step is active.
An SFC rule states that if two steps have an N action on the same target, the variable must never be
reset to 0. It is also possible to insert LD (Ladder Diagram) actions inside an SFC program.
SFC is an inherently parallel language in that multiple control flows can be active at once. Nonstandard extensions to the language include actions inside a program unit that influence the state of
another program unit. The most relevant such action is "forcing", in which a functional block can
decide the active steps of another functional block.
SFC diagrams can be converted to ladder logic using MCR blocks. The sequence of operations is
important when converting SFCs to ladder logic.
Assignment: Which programming languages are supported by the any one DCS available in the
market?