392
SECTION
3
PLC
Programming
Industrial Text & Video Company 1-800-752-8398
www.industrialtext.com
CHAPTER
10
The IEC 1131 Standard and
Programming Language
PROGRAMMING LANGUAGE NOTATION
One of the greatest advantages of sequential function charts is that they are
easier to troubleshoot than standard ladder diagram programs. For example,
in the sequential function chart shown earlier in Figure 10-17c, if the action
Clamp_Solenoid (solenoid ON) at step 3 does not make the transition to step
4, it is easy to recognize that a problem occurred at the transition after step 3,
which corresponds to the activation of the At_Depth_LS transition. Thus, an
SFC pinpoints the step or transition where a fault occurs.
As we have noted, sequential function charts can provide the infrastructure
for a control program, which is then built using one or more of the four IEC
1131-3 programming languages. In the next section, we will further explain
how SFCs can be used implement a control program. However, let’s first
review the similarities between programming notations in the ladder dia-
gram (LD), function block diagram (FBD), structured text (ST), and instruction
list (IL) languages.
Figure 10-19 shows a simple ladder diagram and its FBD, ST, and IL
language equivalents. Note that the ST language (see Figure 10-19c) uses two
operators, AND and &, to denote the AND function. The := symbol is used in
an ST program to assign an output variable (e.g., Valve_3) to a logic
expression. In instruction list (see Figure 10-19d), the first instruction
(instruction LD) loads the status of variable Limit_S_1 to the accumulator
register, which IL calls the result register. The second instruction (instruc-
tion AND) ANDs the status of Limit_S_1 with the variable Start_Cycle and
stores the outcome back in the result register. The third instruction (instruc-
tion ST) stores the contents of the result register as the output variable,
Valve_3. This process is similar to Boolean programming language.
As demonstrated, the instructions used to implement control sequences in
each programming language are very similar in their construction, as well as
their visual representation. Depending on the PLC application, an SFC may
use one or more of these languages to program instructions inside its actions.
To differentiate between languages, some software manufacturers include
starting and ending commands that define the language being used. Other
manufacturers allow the mixing of languages without any differentiation
between them. Figure 10-20 illustrates a group of instructions that have
been labeled with a differentiation mnemonic. The term #Language=name
signals the beginning of a language, and #ENDlanguagename signals the
end of it.