Sequential Applications Teoría
Sequential Applications Teoría
Chapter Topics:
• Function charts
• Parallel operations
OBJECTJVES
Scenario: Using a proximity sensor to detect material moving into and out of a station.
Commonly, only one sensor is used to detect the presence of material as it moves into a
station, is processed, and moves out ofthe station. A s a n example, consider the problem of
retro-reflective proximity sensor (PROX) is used to detect the presence ofthe box. Assume
PROX tums on when the box is in the proper position to have the label applied. When the
labeling station is started, the presence of a box must be detected, the label is applied
(involving multiple steps ), and then the operation is repeated. A chart of the steps of this
process is shown in Figure 6 . 2. The process starts waiting for a box to be detected. When
PROX tums on, then the machinery applies the ]abe! (multiple steps). When the labeling
steps are finished, then the station waits for the next box. However, as depicted in Figure
6.2, the operation does not work! After applying the !abe!, PROX remains on, (box still in
Reflector
                                                                                                             295
296      Sequential Applications
                                                                         Start
                    Start
PROXon PROX on
Steps to Steps to
(conveyor (conveyor
stopped) stopped)
Wait for
operation.
PROX off
station operation.
station) and so the condition that indicates a new box (PROX on) is true. Therefore, a new
!abe! is applied to the box before it leaves the station. If left to run unattended, this station
will continue to apply multiple labels to the first box that enters the station!
Solution: The station must detect that a labeled box has exited the station before detecting
that a new box has entered. Therefore, a step must be added to wait for the box to leave the
station, detecting PROX is off. The correct chart ofthis process is shown in Figure 6 . 3 . The
moral ofthis scenario is to remember that one must detect that a proximity sensor is first off
Design Tip
When one proximity sensor is used to sense material moving in/out, one must
detect that the sensor is off before detecting the sensor is on (or vice versa).
6.1 INTRODUCTION
With the basic ladder logic contact, timer, and counter instructions, one is able to tackle
more    significant    problems.      This    chapter   introduces   ladder   logic   program   design   for
                                                                     6.2 FUNCTION CHART                 297
sequential applications, a significant contribution ofthe text. More advanced techniques for
The sequential design technique is based on describing the operation as a function chart
and then translating the function chart to ladder logic code. The ladder logic primarily uses
the basic contact and coi! instructions. Timers and counters are used only when explicitly
needed by the operation. The ability to pause and reset an operation is added to the basic
sequential design. Operations with parallel steps and machine control involving manual and
single-step modes are also considered. Since the design technique uses the set/reset
instructions, the last section presents an altemate implementation using only the ordinary
output coi! that may be used for PLCs that do not have the set/reset coi! instructions.
The basic too! used to design sequential control applications is the function chart. This
method of describing sequential operations is described in the IEC 848 standard (IEC,
1 9 8 8 ) and incorporated as one ofthe IEC 6 1 1 3 1 - 3 languages (IEC, 1 9 9 3 ) . The form ofthe
function chart described in this chapter is a simplified version of the IEC 6 1 1 3 1 - 3 SFC
(sequential function chart) language. The full IEC sequential function chart language is
described in Chapter 1 4 .
The general form of the function chart is shown in Figure 6.4. The function chart has
The initial step is indicated by the double-line rectangle. The initial step is the initial
state of the ladder logic when the PLC is first powered up or when the operator resets the
operation. The steps ofthe operation are shown as rectangles on the left side ofthe diagram.
Unless shown by an arrow, the progression ofthe steps proceeds from top to bottom. Each
step rectangle contains a short description ofwhat is happening during the step. To the left
ofthe step rectangle is the variable/symbol/tag name ofthe step-in-progress coi! (or bit) that
is on when that step is active. The transition condition is shown as a horizontal bar
between steps. If a step is active and the transition condition below that step becomes true,
the step becomes inactive, and the next step becomes active. The stepwise flow continues
until the bottom ofthe diagram. At the bottom, the sequencing may end, as indicated by a
filled black circle within another circle, or it may repeat by going back to the first step. The
actions associated with a step are shown in the rectangle to the right ofthe step. The actions
are output(s) that are on when a step is active. Any outputs not listed are assumed to be off.
However, the set/reset of outputs may be indicated. Any timer or counter active during a
The function chart is prepared from the operational description of the system. Often,
the hardest part about formulating the function chart is making a distinction between the
transitions and the steps. Also, one must remember that physical outputs are actions
associated with a step. In order to help in the recognition ofthe steps and transitions within
Initial
Transition Condition
Transition Condition
Transition Condition
Other steps
Stop @
Transitions
Step:
Transition:
-or-
device or interna! coi! tuming on or off. Alternatively, the end of a defined time period also
                                                                      6.2 FUNCTION CHART                    299
signals a transition to the next step. Ifthe narrative describes a physical output being tumed
on/off, that is n o t a transition. A physical output is considered a step action and the tuming
on/off of a physical output is handled by a change in the active step. For example, if
"Outputl" is being tumed on as the active step is changed from "Step l " to "Step2," it is
action. Outputl is n o t a transition condition. The change in Outputl <loes not cause a change
in the active step, but is a consequence of the change in the active step.
Design Tip
When constructing the function chart, remember that physical outputs never
occur as part ofthe transition condition. Also, physical inputs are never an action.
Example 6.1. Metal Shear Control. Design the function chart ofthe program to control the
metal shear shown in Figure 6.5 and whose operation is described as:
The shear cuts a continuous length of steel strip. Two conveyors (driven by
sheared. When the strip is in position, both conveyors should stop. A hydraulic
down to cut the material. Limit switch DOWN_LS closes (tums on) when the
shear is fully down. The cylinder is then extended to move the shear blade up.
Limit switch UP _LS closes when the shear blade is fully up. Conveyor 2
(controlled by CONV2_MTR) is now tumed on to move the cut sheet out ofthe
station. The proximity sensor PROX tums off when the sheet has been moved out
ofthe station. Both conveyors are now operated to move the strip into position, and
hydraulic cylinder. Once SHEAR_CYL _RET is energized, the shear blade moves
down to cut the material until a mechanical stop is reached and remains in the
"down" position as long as power is applied (tumed on). The shear blade moves up
Upon initial startup, no material is in the shear and the conveyors operate to
bring the material into the shearing position (PROX tums on). The start switch
should have no effect ifthe process is already running. Ifthe stop switch is pressed
at any time, the station operation should pause, except when the shear blade is
moving. If the stop switch is pressed when the shear blade is moving, the blade
movement must complete. When the start switch is pressed while the operation is
paused, the station should resume the suspended step. When the station is paused,
....-
Shear
                       Cylinder...__.(
                                                                           PROX
                                          o )
                                                                      o
                                                                      ..
                 Conveyor 1                          Conveyor 2                    Conveyor 3
(a)
Shear
Blade
      !               Convoyml
                                                       Conveyor 2                    Conveyor 3
(b)
Shear
Blade
_......._ UP LS
_......._ DN LS
Shear Cylinder
(c)
Figure 6.5. Metal shear: (a) top view; (b) front view; (e) side view.
Variable Description
SHEAR CYL RET Shear cylinder control, on to retract cylinder and move blade
down
Solution. There are two main steps to develop the function chart:
To identify the steps and transitions, the first paragraph of the process description is
repeated, with the steps identified by the underlined phrases and the transition conditions
identified by the italicized phrases. Often, it is easier to identify the first transition condition
(signaled by an input sensor change) and then recognize the step befo re and the step after the
transition condition. Also, many times the steps and transition conditions altemate during
the narrative.
The shear cuts a continuous length of steel strip. Two conveyors (driven by
sheared. When the strip is in position, both conveyors should stop. A hydraulic
down to cut the material. Limit switchDOWN_LS clases (turns on) when the shear
is fully down. The cylinder is then extended to move the shear blade up. Limit
switch UP_LS clases when the shear blade is fully up. Conveyor 2 ( controlled by
CONV2_MTR) is now tumed on to move the cut sheet out of the station. The
proximity sensor PROX turns ojfwhen the sheet has been moved out ofthe station.
Both conveyors are now be operated to move the strip into position, and the
operation repeats.
Notice that the phrase " . . . both conveyors should stop." is not marked as a transition
condition. This phrase describes a physical output being tumed on/off and that will be
So, the steps and the transition conditions that indicate the end of each step are:
Move shear up UP LS on
These steps and the transition conditions between them are shown in Figure 6. 6. The
"off' state of PROX that signals the end ofthe fourth step is shown with the "/" in front of
the variable name. The variable name ofthe step-in-progress bit for each step is also shown
beside the step box. This particular operation repeats, indicated by the line from the fourth
The next part of the function chart development is to add the actions to each step.
Reading back through the metal shear narrative, the process actions for each step are:
Step Action
Move shear up
These actions are added to the steps and the transition conditions to form the function
The part ofthe narrative that describes the operation pause is handled in the ladder logic
Initial
Run (First_Start)
Step_l
PROX
                                            Move Shear
                               Step_2
                                                  Down
DOWN LS
                                            Move Shear
                               Step_3
                                                   Up
UP LS
                                              Move cut
                               Step_4
                                              sheet out
/PROX
Initial
PROX
DOWN LS
                                   Move Shear
                      Step_3
                                         Up
UP LS
/PROX
Once a function chart has been developed, it needs to be implemented in ladder logic.
There are multiple ways to accomplish this task. The design technique described in this
chapter utilizes only the basic ladder logic instructions to implement the step and transition
The author calls this method the "cookie cutter" or "template-based" approach because
the form of the ladder logic code is the same, regardless of the application. Also, this
approach aids in debugging because the logic that handles the transitions and the logic that
handles the step actions are distinct. The latter advantage is apparent when comparing this
First start
Step actions
Each ofthese code templates is covered in detail and then applied to the metal shear of
Example 6 . 1 . •
The start/stop/pause ofthe overall operation is handled as the rung in Figure 6.8, which
is the same general format as the start/stop rung shown in section 2 . 7 . An interna! coil
(variable) named Run controls the overall operation ofthe function chart. lt will be used to
turn off physical outputs that need to be off when pausing the operation. Occasionally, the
Run may be used as part of a transition condition. The optional permissive conditions must
be satisfied to allow the operation to be started or restarted after an abnormal condition. The
optional lockout conditions cause the operation to pause or stop in addition to preventing a
restart.
The "first start" transition condition causes the operation to be initiated when no steps
are currently active. The ladder logic to generate First_Start is shown in Figure 6.9a. When
the Run interna! coi! is tumed on (start push button pressed) and no steps are active (Step_N
is the last step), the First_Start interna! coi! is tumed on and will be used as a transition
condition into the first step. Altematively, the first step (Step _ 1 ) can be set (latched) to start
the operation (Figure 6.9b). START_pB could be used in place ofRun in Figure 6.9, but if
the run rung has permissive and/or lockout conditions, these conditions should also be
repeated on the rung that starts the operation for the first time. As explained in section 2. 7, a
Transitions between steps are handled as shown in Figure 6 . 1 O. The logic implements
the transition condition below the step in the function chart, which is the transition condition
                                -   - - - - - - - - -
                  START    PB   .                   .
                                                        STOP   PB                   Run
: Permis- : : Lock- :
                                                           l                        (
                                       si ves                       :   outs    :
Run
(a)
Figure 6.9. General first start rung: (a) First_Start interna! coi!; (b) set first step.
out of a step. When the current step is active (Current_Step is on) and the transition
condition is true, then the step-in-progress bit of the next step is set and the
step-in-progress-bit ofthe current step is reset. Thus, the next step becomes active and the
Ifthe PLC does not have set/reset or latch/unlatch instructions (e.g., Modicon 984 and
Siemens TI-5x5) then an alternative approach must be used, as detailed in section 6.8 .
The step-in-progress interna! coils are used to control the step actions. The appropriate
step-in-progress bits turn on the outputs and timers that are the step actions. The Run
interna! coi! is also used as part ofthe condition for those actions that must be offwhen the
operation is paused. For example, ifthe MOTOR_ON output should be on in steps 4 and 1 5
of the function chart (represented by Step_4 and Step_15), then the logic driving
MOTOR_ ON appears as shown in Figure 6.11. The Run interna! coi! tums off
MOTOR_ON if step 4 or step 1 5 is active and the stop push button is pressed to pause the
operation. When the operation is resumed (by pressing the start push button), then
MOTOR_ ON is reactivated. If the Run interna! coi! is omitted from the rung in Figure 6 . 1 1 ,
then MOTOR_ ON will remain on when the operation is paused when in step 4 or step 1 5 .
                                                       1        -1----,--
                                                                        � �                                  s
             1                1
                                                                                                  ��_Step
                                                                                                               81
                                  Figure 6.10. General transition between steps.
Note that in Figure 6 . 1 1 , the Step _4 and Step _ 1 5 step-in-progress bits are in parallel,
meaning that MOTOR_ ON is an action in steps 4 and 1 5 . The MOTOR_ ON output is offfor
If the action associated with a step is a set/reset of an output, then the output coi! of
Design Tip
a particular output is the action for more than one step. Consider the output first and
Example 6.2. Metal Shear Control. Use ladder logic to implement the metal shear operation
described in Example 6 . 1 .
Variable Description
SHEAR CYL RET Shear cylinder control, on to retract cylinder and move blade
down
Solution. The function chart for the shear operation is shown in Figure 6.7. Before
developing the ladder logic code, the interna! variables should be identified:
Variable Description
Step_ 4
First start
Step actions
The IEC 6 1 1 3 1 - 3 code for the metal shear, shown in Figure 6 . 1 2 , is developed using the
code templates shown in Figures 6.8 - 6 . 1 1 . A rung comment is shown within a rectangle
2. First start (starting the operation for the very first time)
The initial start ofthe operation is handled like Figure 6.9b. Note the use ofthe Run in
rungs 7 and 8 to tum off the conveyors when the station is paused. Since the shear cylinder
operation should not stop if the stop push button is pressed while it is moving, Run is not
Note that if a particular output is an action for multiple steps, then the step-in-progress bits
of each step are placed in parallel. When a particular output is the action for more than one
step, novice programmers often repeat the outputs. If one did not consider the output first
I Start/stop/pause I
                       tr
               I   Generate transition out of initial step   I
      2
                         1-----ld---U�--U�--U-I�--es
                            Figure 6.12. IEC ladder logic for metal shear. (continued)
                    6.3 IMPLEMENTING FUNCTION CHART IN LADDER LOGIC                                        307
3
                1            1       -
                                     1 -------.--
                                                r.-                                          s
                                                                                 w;-1
     �IS
       - t
         - e
           p-2
             - -_M_o
                   _ v
                     _ e
                       _ s
                         - h
                           e_a
                             _ r
                               _ d
                                 - o
                                   w -n
                                      -
                                      .T-r
                                         - a
                                           n_s
                                             _ t
                                               _ o
                                                 _ S
                                                   _ t
                                                     e_p
                                                       _ 3
                                                         _ w-h
                                                             e_n
                                                               _ s
                                                                 _ h
                                                                   - e
                                                                     a_r
                                                                       _ d
                                                                         _ o
                                                                           _ w_n
                                                                               � .    ¡
4
                1           1        r-    ----�r.-                                          s
                                                                                 w;-2
     I   Step 3 - Move shear up. Trans. to Step 4 when shear up.             ¡
Step_3 UP LS Step_ 4
5               1           1    -   -I-----.--
                                              r.-                                            s
                                                                                 w;-3
     I   Step 4 - Move cut sheet out. Trans. to Step 1 when out.         1
6
                1           1 / 1 -----�r.-                                                  s
                                                                                 w;-4
     I   Conveyor 1 control      I
7 1----t
1 1
I Conveyor 2 control I
g ,-.... - -, �
Step�
9 1----t
and then steps for which it is on then the ladder logic driving the physical outputs for the
shear may appear as in Figure 6 . 1 3 . Rungs 8 and 1 0 both drive the CONV2_MTR output.
What is the result? Since rung 1 0 is scanned after rung 8, the logic ofrung 1 0 will override
the logic of rung 8. Consequently, CONV2 _MTR is-never on in step 1 , causing the material
Depending on the particular PLC used to implement this example, the ladder logic will
appear different from the ladder logic shown in Figure 6 . 1 2 . Ifusing Modicon Concept, the
right power rail is absent and a circle encloses the set and reset instructions. The
set/reset.
Example 6.2 does not have ali of the features of a real application, but serves to
illustrate the basic approach to implementing a function chart in ladder logic. The next
Example 6.3. Tub Loader Control. Design the function chart of the program to control the
tub loader described below. Also, implement the control with ladder logic.
Figure 6 . 1 4 shows the layout of a parts tub loader machine. Parts are placed on
the belt conveyor by a milling machine. The parts move down the conveyor and
drop into the parts tub. Parts on the belt conveyor are detected by a photoelectric
sensor, PE272, which is off as a part interrupts the beam. Assume PE272 detects
the p a rt a s it falls into the tub. After 100 parts are deposited in the tub, the tub is
moved out and a new, empty tub moves into position. To change the tub, the
7 _,---t
8 _,---t
10 1 1
.- -------- .
                                 ....-"'...:..::·====::::I_¡_:___;Conveyor
                                               1
Empty
    --               --
          Gate 2 Cylinder
                            1
:,---;-c====:r 1,
1 :
Gate2 PE272
TUB_PROX LJ : : : : : : : , .                       Tub
                                                                                                              Milling
GATEI_OPLS      GATEI_CLLS
                                                   Being
                                                                           o�o                                Machine
    --               --
                                                   Filled
                                                                                Belt Conveyor
          Gate I Cylinder
                                                                                (BELT_RUN)
Gate 1
Roller Conveyor
:1 (TROLL_RUN)
Hold Gate 1 open and wait for TUB _pROX to be off for 3 seconds to
allow the full tub to be moved out of the loading station. Run the tub
Hold Gate 2 open to allow an empty tub to move down a slight incline
into the loading station. When the tub contacts the tub roller
conveyor, the tub roller conveyor moves the tub into position. When
on Gate 1).
The TUB _PROX proxirnity sensor is on when the tub is present, though not
necessarily in position. Hence, the delays ensure the empty tub has moved in and
While the tub is being changed, the belt conveyor motor must be stopped
(BELT_RUN off) andan interna! coil, Tub_Permissive, must be tumed off. After
a new tub is in position, BEL T_RUN is tumed on, the Tub _Permissive coil is
tumed on, and the counting ofparts is resumed. The Tub_Permissive is used bythe
milling machine ladder logic. When Tub_Permissive is on, the machine produces
parts.
The roller conveyor for the tubs has two sections. The section between the two
 gates    and   extending       out       of        the     station        is   powered    and    controlled      by    the
310      Sequential Applications
TROLL_RUN output. The roller conveyor section before Gate 1 is unpowered and
inclined to allow new tubs to move into the station. In order to completely move
the empty tub into the station, the powered section must be running.
GA TE 1 _RET is energized, gate 1 opens and remains in the open position as long
as power is applied (turned on). The gate closes when power is removed (turned
off). Limit switches GATEI _OPLS and GATE l _CLLS sense the open and closed
Single-speed motors drive the two conveyors. When BELT _RUN is on, the
conveyor moves parts from the milling machine to the tub. When BEL T_RUN is
off, the conveyor is stopped. When TROLL_RUN is on, the powered section of
the roller conveyor moves. When TROLL_RUN is off, the powered section ofthe
There is an interna! coi!, Run, that is on when the operation is enabled. The
Run interna! coi! is set by another part ofthe ladder logic. When the Run coi! is off,
the tub loading operation should be paused at the current step. When paused, do
not advance to the next step. When the Run coi! turns on while the operation is
paused, the tub loader should resume the suspended step. When paused, both
conveyors must be stopped, ali counter and timer accumulator values must be
retained, and the ladder logic program must remain in the step in which the Run
coi! changed from on to off. If the Run coi! turns off when changing tubs, the
pneumatic cylinder controls must continue to be activated, holding the gate open
There is another interna! coi!, Reset, that when on, restarts the operation. The
Reset interna! coi! is set by another part of the ladder logic. When Reset is on,
internal counters and timers are reset and the interna! state is set so that the ladder
logic program assurnes an empty tub is in position. The Reset interna! coi! must be
Assume the following physical input, physical output, and interna! coi! assignments:
Variable Description
TUB PROX Proximity sensor, on (closed) when tub is present, though not
BELT RUN Belt conveyor control, on to run conveyor to move parts from
parts tub.
GATEl RET Gate 1 cylinder control, on to retract cylinder and open gate; off
closes gate.
GATE2 RET Gate 2 cylinder control, on to retract cylinder and open gate; off
                                    closes gate.
                     6.3 IMPLEMENTING FUNCTION CHART IN LADDER LOGIC                                     311
The addresses associated with the physical inputs and outputs are:
Using timers
Using counters
As illustrated in Example 6 . 1 , there are two main steps to develop the function chart:
To identify the steps and transitions, the first paragraph of the process description is
repeated, with the steps identified by the underlined phrases and the transition conditions
identified by the italicized phrases. As in example 6 . 1 , many times it is easier to identify the
first transition condition (signaled by an input sensor change) and then recognize the step
before and the step after the transition condition. Often, the steps and transition conditions
Figure 6 . 1 4 shows the layout of a parts tub loader machi ne. Parts are placed on
the belt conveyor by a milling machine. The parts move down the conveyor and
drop into the parts tub. Parts on the belt conveyor are detected by a photoelectric
sensor, PE272, which is off as a part interrupts the beam. Assume PE272 detects
      the part as it falls into the tub. After 100 parts are deposited in the tub, the tub is
312      Sequential Applications
moved out and a new, empty tub moves into position. To change the tub, the
allow the full tub to be moved out ofthe loading station. Run the tub
Hold Gate 2 open to allow an empty tub to move down a slight incline
into the loading station. When the tub contacts the tub roller
conveyor, the tub roller conveyor moves the tub into position. When
on Gate 1 ) .
Since the timer accumulator values must be retained when paused, retentive timers
must be used for the time delays. Also, the Run coil must be one of the conditions that
The sentence, "When paused, do not advance to the next step." normally means that the
interna! Run coil is part ofthe transition condition. However, since retentive timers are used
for the transition out ofthe steps holding the gates open, the Run coil is not needed for these
steps. One could argue that the Run coil is not needed for the transitions out of the other
steps since the conveyors are stopped when paused, but for the purposes ofthe example, the
So, the steps and the transition conditions that indicate the end of each step are:
Parts into tub Part_Ctr done ( 100 parts detected) and Run
The next part of the function chart development is to add the actions to each step.
Reading back through the tub loader narrative, the process actions for each step are:
Step Actions
Parts into tub BELT_RUN and Tub_Permissive and Part_Ctr (counts 100
Close Gate 1
      Close Gate 2
                 6 . 3 IMPLEMENTING FUNCTION CHART IN LADDER LOGIC                          313
The function chart for the tub loader is shown in Figure 6 . 1 5 . This particular operation
repeats, indicated by a line from the last step back to the first step. Before developing the
Initial
Run
                                                             BELT   RUN
                                   Parts Into
                      Step_l
                                                             Tub   Permissive
                                      Tub
                                                             Part_Ctr (preset= 100)
                                                             GATEI    RET
                      Step_2      Open Gate 1
                                                             GATEI    RET
                                  Hold Gate 1
                      Step_3
                                                             TROLL    RUN
                                      Open
                                                             Gl_Hold_Tmr (3 sec)
                                                             GATE2    RET
                      Step_5      Open Gate 2
                                                             GATE2    RET
                                  Hold Gate 2
                      Step_6
                                                             TROLL    RUN
                                      Open
                                                             G2_Hold_Tmr (5 sec)
First start
Step actions
Since the timers and counters are shown as actions, they may be placed with the rungs
that drive the physical outputs. However, since they are also part ofthe transitions, they may
also be placed with the rungs handling the transitions. The author favors the latter approach
The Modicon Concept IEC 6 1 1 3 1 - 3 code for the tub loader, shown in Figure 6 . 1 6 , is
developed using the code templates shown earlier in this chapter. A rung comment is shown
within a rectangle above the rung. The function of each rung is as follows:
1. First start (starting the operation for the very first time)
Since Modicon Concept does not define a retentive on-delay timer, one must be
a "tick" every 0 . 1 seconds which is counted. The counter provides the retentive function.
The Run interna! coil is part ofthe input condition for each retentive timer, thus pausing the
The reset condition for each counter must also be defined. Two situations must be
considered: normal operation and operator-initiated reset. For this solution, the next step is
used to normally reset each counter. The operator-initiated reset tums on the Int_Reset
interna! coi! to reset the counters. For example, the counter used to count parts in step 1 is
reset when the operation is in step 2 or when Int_ Reset is on (Figure 6 . 1 6 , rung 2).
                   6 . 3 IMPLEMENTING FUNCTION CHART IN LADDER LOGIC                                                315
                   H/H/H/H/HIH¿
                                                                         Step_6           Step_7           Step_l
                                                                 ¿H/H/�
    !   Step 1 - Count parts. Trans. to Step 2 when 100 parts has passed.                    1
Part_Ctr
2                                               cu          Q
                   1          1 /
Step_l
                                                R
               /                                                                  �
100 PV cv
3
                   1              1   -1              1      -1--..........-
                                                                       �     -                              s
                                                                                                 L+
                                                                                          GIH      Tic
GJTic_Tmr G l _Hold_Tmr
                                                                    IN         Q ,_____, CU                  Q
4
               H;H                           H/
        Step_3                                  t#IOOms             PT     ET                      R
!------� PV CV
(¡ Step_ 4
                                                                                      tl
    I   Step 4 - Close gate 1 . Trans. to Step 5 when c l o s e d . 1
5
                   1              1   -1              1      -1-------,--
                                                                       �  -                                 s
        Figure 6.16. Modicon Concept ladder logic for tub loader. (continued)
316         Sequential Applications
       6
                              1             1   -1               1   1---
                                                                      1 - ---r--
                                                                               � �                                 s
                                                                                                     �
                                                                                                G2H       Tic
G2Tic_Tmr G2_Hold_Tmr
       7                                                                    IN         Q                  CU        Q
                         H            H                H/                                  1---..__---1
Step_6 t# I O O m s PT ET R
/ 1-----------------� 50 PV CV
                                                                                             (¡
                                                                                             tt :
                                                                                                t_
                                                                                                S7
Step_6
                                                                                                                   R
                  Step 7 - Close gate 2. Trans to Step I when closed.
       8
                              1
                                            1   --1-1                     -1--.....---
                                                                                   �   -                           s
              �IB_e
                  _ _
                    l tc
                       _ o
                         _ n
                           _ v
                             - e
                               y_o
                                 _ r
                                   _ c
                                     - o
                                       n_tr
                                          _ o
                                            _ �
                                              I !                                                    �
       9                      1            1        -1    ����----o-
             I    Roll conveyor control         I
      10                      t-T-1                 -1    �����o-
                     S te p_  µ
      1 1                     -�-.--������o-
                     Ste p_   µ
             I    Gate 2 cylinder control
      12
                              -�-.--�����--o-
                     Ste p_�
      13
                           1             1     -1    ------o-
                Reset steps, provide reset for counters
14
Step_l
Step_2
Step_3
Step_4
Step_5
Step_6
Step_7
When the reset push button is pressed while the station is paused, the Int_Reset coi! is
turned on (to reset the counters) and ali step-in-progress coils are reset. This action
The Allen-Bradley PLC-5 code for the tub loader appears in Figure 6 . 1 7 . Besides the
use of latch/unlatch in place of set/reset, the only real difference is in the timers and
counters. Timers and counters are output instructions, and so no logic can appear in series to
the right ofthese instructions. Therefore, a parallel branch is used to handle the transition to
the next step (Figure 6 . 1 7 , rungs 2, 4, and 7). These parallel branches can be programmed as
two rungs. However, in keeping with the convention that timers and counters remain with
the transition condition, they are combined on a single rung. As with the IEC 6 1 1 3 1 - 3 code,
the Run interna! coi! is part ofthe input condition for each retentive timer, thus pausing the
The counters and retentive timers are normally reset during the transition to the next
step. For example, the Part_Ctr counter used in step 1 to count parts is reset during the
transition from step 1 to step 2 (Figure 6 . 1 7 , rung 3). The reset of retentive timers and
counters as a result of an operator-initiated reset is handled on the same rung as the reset of
The Allen-Bradley ControlLogix ladder logic code is nearly identical to the PLC-5
!! H H H H �
s�-7<���-<���-<���-<���<�---1���'
Step 1 - Count parts. Trans. to Step 2 when 100 parts has passed.
                                                              Part   Ctr
              Step_l          PE272
                                                                     CTU-----
Counter C5:l
Preset 100
Accum o
                              -   1---
                                     [-]
                                                                                           L
Step_l
                                                                                           u
                                                                                        Part   Ctr
  3   1------<
                   i---
                      [-]---[-]                        --
                                                        [--��-                                     L
                                                                                   w�-2
           Step 3 - Hold gate 1 open for 3 secs after tub passes. Trans. to Step 4 when done.
                                                               GI    Hold   Tmr
            Step_3        TUB     PROX       Run
                                                                      RTO-----,
Timer T4:l
Preset 300
Accum O
Step_3
Gl Hold Tmr
           Figure 6.17. Allen-Bradley PLC-5 ladder logic for tub loader. (continued)
                   6.3 IMPLEMENTING FUNCTION CHART IN LADDER LOGIC                                              3 19
 5
                   [            31                  3   t--
                                                          [   ----,--M-                            L
                                                                                      w�-4
       I   Step 5 - Open gate 2. Trans. to Step 6 when open.¡
 6
                  [             31                  3   t--
                                                          [   ----,--M-                            L
                                                                                     w�-5
           Step 6 - Hold gate 2 open for 5 secs after tub in. Trans. to Step 7 when delay done.
                                                               G2       Hold   Tmr
                         TUB    PROX          Run
                                                                         RTO------.
Preset 500
Accum O
G2 Hold Tmr
 8 ,________.
                  [             31                  3     ----.--M-
                                                        t--
                                                          [                                        L
                                                                                     w�-'
       I   Belt conveyor control
 9   1-------1
                  [             3
10   1-..-----1   h-3
              Step�
      1 1   i-.-----1    -�----.--�������c-
                     Step�
      12    i-.-----1    ��������------ic-
                     Step�
      1 3 ,_____,
                         E             3
Step_2
Step_3
Step_4
Step_5
Step_6
Step_7
Part Ctr
                                                                        G1    Hold_Tmr
                                                                             -
G2_Hold_Tmr
RES
l . The "Part_Ctr" tag appears in the Counter field ofthe CTU instruction in rung 3,
2. For the timers (rungs 5 and 8), the "Time Base" field is absent and the Preset value
is multiplied by 1 O (ControlLogix time base is 1 ms). Also, the timer tag appears in
the Timer field ofthe RTO instruction, replacing the address in the PLC-5 RTO
instruction.
The Siemens S7 ladder logic code (Figure 6 . 1 8 ) looks most similar to the Modicon
PLC. The only differences are in the retentive timers and the counter. The S_ODTS
retentive on-delay timer block is used in place of an IEC-compatible TON and CTU as in
the Modicon PLC. Also note the use of the "Part_Ctr" .Q contact on the ENO output of the
counter. Since the CTU block Q ouput can only connect to a variable, this method allows
one to place the "Run" contact in series with the Q output and to control the set and reset
The GE Fanuc ladder logic is shown in Figure 6 . 1 9 and is similar to the Modicon and
S7 ladder logic. Since the output of the counter in rung 3 cannot connect to a contact, an
extra interna! coi! and rung must be added to accommodate the specification that the
¡HR""�(
tH/H/1 ( s H
Step 1 - Count parts. Trans. to Step 2 when 100 parts has passed.
"Part Ctr"
  2                                                EN      ENO
                                                                                 H
                                                                                               W�-�
               "Step_l"       "PE272"
cu Q
"Step_l"
R cv
100 PV
  3
                     --·----11
                     1                  --1----1             �                      s   H
      �'Step                                                             Y�H
               Figure 6.18. Siemens S7 ladder logic code for tub loader. (continued)
322       Sequential Applications
Step 3 - Hold gate I open for 3 secs after tub passes. Trans. to Step 4 when done.
      4                                                                          s              Q              sH
                        1            1/1
                                                                   S5T#3S        TV             BI
                 "Step_3"
                                                                                 R            BCD
                    /
      s   f         "Pr          "GATnLLS"                     rT
                                                                                                        "Step_5"
                                                                                                       d�-�
           I   Step 5 - Open gate 2. Trans. to Step 6 when open.¡
                                                                                                       LH-�
               Step 6 - Hold gate 2 open for 5 secs after tub in. Trans. to Step 7 when delay done.
      7                                                                          s              Q              sH
                        l            1-       1
                                                           1
                                                                                                           "Step_6"
                                                                   S5T#5S        TV             81
                                                                                                               RH
                                                                                 R            BCD
                                                                          --u-
                                 "GATE2           CLLS"        "Run"                                    "Step_l"
1 -li---------ll -1 s H
"St;_H
      9
          �tepi1"                        "Runt-"------------"---1BELT                                          H"
                                                   Figure 6.18. (continued)
                     6.3 IMPLEMENTING FUNCTION CHART IN LADDER LOGIC                           323
"TROLL RUN"
u    w:�wl-
         . ---.---------------1(
              3                                                                        -H
1 Gato:��::�do,co"m>I "GATE2_RET"
"                "
                 '
                 -
                 SJ -,-----------1(
                   t--
                     6
                     "                                                                  H
13   �               1---
                                                                                        H
             Reset steps, provide reset for counters
11 11
14                   �!/------�--                                                     H
                                                                              "Step_l"
                                                                                    RH
                                                                              "Step_2"
                                                                                    RH
                                                                              "Step_3"
                                                                                    RH
                                                                              "Step_ 4"
                                                                                    RH
                                                                              "Step_S"
                                                                                    RH
                                                                              "Step_6"
                                                                                    RH
                                                                              "Step_7"
                                                                                    RH
                                                 Figure 6.18. (continued)
324       Sequential Applications
                      H/H/H/H/H/Ht
                                                                                    Step   6   Step   7         Step_ 1
«---1/H/1--I-e s H
Step 1 - Count parts. Trans. to Step 2 when 100 parts has passed.
      2
                           1
                                                          Part   Ctr
                                                                                                                    H
                  Step_l
/i--------1R
100 PV
                                          1    -1    ----e-                                                     s
                                                                                                           Step_l
                                                                                                                    H
                                                                                                                RH
          I   Step 2 - Open gate 1 . Trans. to Step 3 when open.
                                                                              --e-
                 Step_2              GATEI    OPLS               Run                                       Step_3
      3
                           1              1 -1                   1     1--I                                     s   H
                                                                                                           Step_2
                                                                                                                RH
              Step 3 - Hold gate I open for 3 secs after tub passes. Trans. to Step 4 when done.
                                                                                                           Step_4
               Step    3       TUB   PROX           Run                  ONDTR
      4
                      HIH                                                     SEC                               sH
               Step_3                                                   GJ    Hold ..
/--------1R
30 PV
                                                                              --u-
                 Step_4              GATEI    CLLS               Run                                       Step_5
      5
                           1
                                          1 --1-1                      -1                                       s   H
                                                                                                           Step_4
                                                                                                                RH
               Figure 6.19. GE Fanuc ladder logic code for tub loader. (continued)
                  6.3 IMPLEMENTING FUNCTION CHART IN LADDER LOGIC                                   325
                                                                  --u-
             Step_5             GATE2      OPLS         Run                          Step_6
 6
                      1            1   -   1            1   -1                          sH
                                                                                     Step_5
                                                                                       RH
          Step 6 - Hold gate 2 open for 5 secs after tub in. Trans. to Step 7 when delay done.
                                                                                     Step_7
           Step   6       TUB   PROX            Run            ONDTR
 7                H-H                                               SEC
                                                                                        sH
           Step _6                                            GI    Hold ..          Step_6
/1----------1 R RH
50 PV
 8
                      1            1   -   1            1   1---I --usH
                                                                                     Step_7
                                                                                       RH
      I   Belt conveyor control        I
9 t----i
                      1            1                                                       H
      I   Roll conveyor control        I
10
                                                                                           H
             St�tr
11 ��Step_wt-----r-------------( H
12
                     -h-.-������-c                                                            H
             Step_�
13 -,-- H
      14                 1-------11/----.--,--f                                                             H
                                                                                                     Step_l
                                                                                                          RH
                                                                                                     Step_2
                                                                                                          RH
                                                                                                     Step_3
                                                                                                          RH
                                                                                                     Step_ 4
                                                                                                          RH
                                                                                                     Step_5
                                                                                                          RH
                                                                                                     Step_6
                                                                                                          RH
                                                                                                     Step_7
                                                                                                          RH
                                            Figure 6.19. (continued)
Example 6.3 has most ofthe features of a real application. The next example illustrates
a problem in which the reset operation is more complicated than in the previous example.
Example 6.4. Engine Inverter Station Control. Design the function chart ofthe program to
control the following station that inverts (tums over) gasoline engine assemblies and
Figure 6.20 shows the layout of a station that inverts gasoline engine
assemblies riding on a pallet as they come down the conveyor. This station is only
one in a series of stations along this conveyor. Implement ladder logic for this
moving. This particular line is asynchronous, that is, each station processes
assemblies at its own speed and <loes not coordinate its operation with any other
station. Because this is an asynchronous line, the station contains two capturing
mechanisms ( engaging hooks) that control access to the station and allow pallets to
Engaging Engaging
Hook 1 Hook2
PROXl
        Proximity
                                                                                            t
                                                                                   Front View from
         Sensor
                                                                                        this direction
(a)
Conveyor 1 1 1 1 1 1 1
                                           n
                                               í
          PROXl
         Proximity�                        U
            Sensor                             Engage 1
                                                                Pallet Up
                                               Cylinder
                                                                Cylinder
(b)
Rotator/Gripper
                                                                           ¡
        ROTR          UPLS             _/-
Raising/
                                           Lowering
                                                                                            Conveyor
                                           Cylinder
                                                                                Pallet Up
Cylinder
(e)
Figure 6.20. Engine inverter station: (a) top view; (b) front view; (e) side view.
328      Sequential Applications
U pon initial startup, assume that there are no pallets waiting at engaging hook
Engage 1 . When a pallet is detected at Engage 1 (by PROXl ), the following major
Lower the Engage 1 hook (by activating ENG l _RET) for 2 seconds to
allow only one assembly to move into the station and be caught by
the Engage 2 hook. When the Engage 1 hook is raised, it catches the
next pallet.
closed).
closed).
ROTR_CCWLS closes).
The operation then repeats. Assume the conveyor is on at ali times. The
conveyor consists of two parallel tracks and slides beneath the pallets as they are
The proximity sensor, PROX I , is inductive and senses the metal assembly
pallet. PROXl senses the pallet before tbe pallet reaches the engage position. You
must assume that when Engage 1 , the first engaging hook, captures the pallet,
PROXl remains o n .
ENG l _RET and ENG2 _RET are controls for single action pneumatic
cylinders that move the engaging hooks. Once ENG l _RET is energized, the
Engage 1 hook moves down and remains in the "down" position as long as power
is applied (turned on). The hook moves up when power is removed (turned off).
The engaging mechanism works in this manner to be fail-safe, that is, if electrical
similar manner.
clamp moves the pallet (and engine) offthe conveyor and into a fixture to properly
align the engine to the gripper clamp. PALL_UPCTL must remain on to hold the
assembly in the fixture. If PALL_UPCTL is turned off, the pallet falls back onto
the conveyor. The PALL_UPLS is on when the pallet is in the proper position.
The mechanism used to lower and raise the rotating mechanism consists of a
energized (turned on), the rotator moves down and continues to move down as
      long as it is energized and a mechanical stop is not reached. When the ROTR_UP
                                                6.4 COMPLICA TED RESET OPERA TION                             329
energized and a mechanical stop is not reached. The mechanism stops if neither
"down" position.
GRIP _CLOS output is energized, the gripper jaws close to clamp the engine and
hold it in place as long as power is applied (tumed on). GRIP _CLOS must remain
on to hold the engine in the gripper. If GRIP _CLOS is turned off, the engine is
released. There are no limit switches indicating the gripper is open or closed.
Allow 1 . 5 seconds for the gripper to clamp (el ose) and 1 . 0 seconds for the gripper
to unclamp (open).
gripper. When the ROTA T_CW output is energized, the gripper ro tates clockwise
as long as power is applied (tumed on) and the CW mechanical stop has not been
reached. When the ROTA T_CCW output is energized, the gripper rotates
mechanical stop has not been reached. The rotation stops at its current position
when power is removed (tumed off). The rotation will not move ifboth opposing
fully counterclockwise.
The start/stop switches are only for the station. They do not control any other
stations or the conveyor. Upon initial startup, assume there are no pallets present in
either of the engaging hooks. If the stop switch is pres sed at any time, the station
operation should pause, except when either engaging hook is activated. If the
operation is paused when ENGl_RET is activated the station may contain two
pallets with no space in between. When the start switch is pressed while the
operation is paused, the station should resume the suspended step. When paused,
do not advance to the next step. When the station is paused, the raise/lower and
rotating cylinder controls should be tumed off. The engine clamping gripper and
the pallet raising cylinders must remain on when paused (or the engine may be
dropped).
A separate reset switch is provided that when pressed, the clamp gripper is
released, the rotating mechanism is raised, then rotated counterclockwise, and the
process step is set as if the process is waiting for the next pallet. When the start
switch is next pressed, no items are assumed present at the first engage position.
The reset switch should have no effect unless the operation is already paused.
Variable Description
                                     state.
330     Sequential Applications
PALL UPLS Limit switch, on when the pallet is lifted off conveyor and in the
proper position.
counterclockwise.
ENGl RET Engage hook l cylinder retract control, on to lower hook, off
raises hook.
ENG2 RET Engage hook 2 cylinder retract control, on to lower hook, off
raises hook.
counterclockwise.
GRIP CLOS Gripper cylinder control, on closes jaws, off opens jaws.
PALL UPCTL Pallet retainer cylinder control, on to move pallet up and offthe
conveyor.
The addresses associated with the physical inputs and outputs are:
Solution. The function chart forthe station is shown in Figure 6 . 2 1 . Run is not really needed
as a transition condition out of steps 3 , 4, 6, 7, 8, 1 0 , and 1 1 since the motion ceases when
paused. One could argue that Run is not needed as part of the transition condition out of
steps 5 and 9 since advancing to the next step does not actually tum on any physical outputs
(since they will remain off as long as the station is paused). Non-retentive timers are
acceptable for steps 5 and 9 since the clamping/unclamping will still occur since the gripper
continues to function when the operation is paused. Likewise, non-retentive timers are
acceptable for steps 2 and 1 3 since the operation cannot be paused in these steps.
For this problem, the operator-initiated reset is not merely resetting all counters,
retentive timers and step-in-progress bits. A sequential operation must restore the
mechanical parts of the system to the initial state (clamp open, rotating mechanism in up and
counterclockwise positions). The fünction chart of the reset operation is shown in Figure
6.22. Note that the last step exists only to reset the Int_Reset interna! coil, that indicates the
Initial
Run
B 1-------lM
                                         Wait for
                         Step_l
                                          pallet
Engl_Tmr done
                                                                  PALL        UPCTL
                         Step _3       Raise Pallet
                                                                  PALL        UPCTL
                         Step_5       Clamp Engine
                                                                  GRIP        CLOS
Clmp_Tmr = 1.5 s
                                                     PALL   UPCTL
                                  Raise
                  Step_6
                                                    GRIP    CLOS
                                 Rotator
                                                    ROTR    UP
                                                    PALL    UPCTL
                                 Rota te
                  Step_7
                                                    GRIP    CLOS
                                Clockwise
                                                    ROTAT    CW
                                                    PALL    UPCTL
                                 Lower
                  Step_8
                                                    GRIP    CLOS
                                 Rotator
                                                    ROTR    DOWN
                                                    PALL    UPCTL
                Step_l l    Rotate Counter
                                clockwise           ROTAT    CCW
Initial
Int Reset
                                                              RUnClmp_Tnu=ls
                    RStep_l     Open Gripper
RUnClmp_Tmr done
                                      Raise                   ROTR    UP
                    RStep_2
                                    Rotator
ROTR UPLS
ROTR CCWLS
/Int Reset
                                       •
                            Figure 6.22. Function chart for reset.
Before developing the ladder logic code, the interna! variable addresses or data types
should be identified:
The Modicon Concept code is shown in Figure 6 . 2 3 . The Allen-Bradley PLC-5 code is
shown in Figure 6.24. The ladder logic code is broken into the following sections:
334       Sequential Applications
      2
                         H/H/H/H/H/H/H/H¿
                                  Step_8           Step_9         Step_JO         Step_l l    Step_l2       Step_l3      Step_l
                     ¿H/H/H/H/H/H/�
          I   Step   1   -   Wait for pallet. Trans. to Step 2 when pallet present.                     l
      3
                             1             1       1                1       -1    -------r-
                                                                                         �  -s
                                                                                                                 L©-
              Step 2 - Move to hook 2. Trans. to Step 3 when engaging 1 hook open 2 sec.
Engl_Tmr
                 Step_2
                                                             TON
4 t--------t IN Q t-----------.----1
t#2s PT ET
      5
                             1                 1   -   1                    1    --1   --��-s
      6
                             1
                                               1   -   -1-----1
                                                              1                  -1--��-                                  s
                                                                                                                 �
              Step 5 - Clamp engine. Trans. to Step 6 when timer done.
Clmp_Tmr
                 Step_5                                                                      Run
                                                             TON
7 ----- IN Q i-------i
t#l.5s PT ET
          Figure 6.23. Modicon ladder logic for engine inverter station. (continued)
                                                        6.4 COMPLICATED RESET OPERATION             335
 8
                      1
                                       1   -11--------1
                                                      1           i--
                                                                  l - ---.-
                                                                          � -             s
                                                                                       �
         Step 7 - Rotate clockwise.                 Trans. to Step 8 when clockwise.
 9
                      1
                                       1   -   1---I-----1
                                                         1        1--
                                                                  1 - ---.-
                                                                          � -             s
10
                      1
                                       1   -   ---1---11          i-----
                                                                   l   - --r--
                                                                             � -          s
                                                                                       �
         Step 9 - Unclamp timer. Trans. to Step 1 0 after I sec.
Unclmp_Tmr
Step_9 Run
11
                      1
                                Wj�TONE�l                               1
12
                      1                1   - 1                1   -1--------r--
                                                                             �  ----1    s
                                                                                       �
     I   Step   1 1   -   Rotate CCW.          Trans. to Step 1 2 when CCW.     1
13
                      1                1-      1              1   1--I--��--             s
                                                                                       �
         Step 1 2 - Drop engine. Trans. to Step 1 3 when not up.
14
                      1
                                       1 7     1---I-----1
                                                         1        1--I--------r--
                                                                               �  ----1  s
                                                                                       �
         Step 1 3 - Move out pallet. Trans. to Step I when time done.
Eng2_Tmr
            Step_l3
                                                     TON
15 1-------1 IN Q 1------------.---i
t#3s PT ET
      16                  -1    ������--o-
                   Step_l3                                                   ENG2    RET
      17                  -1    ������--o-
            I   Rotating mechanism up/down control          I
1 8
Step_tt
RStep_2
      19
                                           11------�o-
                   Step�
Rotation control I
      20
                          1            1   11-------0-
      21
                          1            1   --1     -----o-
                  RStep_3
I Gripper control
22
Step_6
Step_7
Step_8
I Pallet up control
23 1-----l
Step_4
Step_5
Step_6
Step_7
Step_8
Step_9
Step_lO
Step_I l
Start/stop for reset operation. Reset pb starts, reset step 4 stops it.
24
_1.,_""�/1--I--------ID-
25
                   H/H/H/H/�
          Reset Step       1   -   Delay to unclamp. Transition to Reset Step 2 when done.
RUnClmp_Tmr
             RStep_l
                                                      TON
26 ,__ _, IN Q 1----------��-�
t# l s PT ET
27
                     1                        ,   -
                                                  -
                                                  , ----.....--
                                                              � s-
      28
                           1         1-   -
                                          1 ---------r
                                                     � -                           s
                                                                                �
                 Transition out ofReset Step 4 when internal reset unlatched.
      29
                           -1-----117-1      ------®--
             I   Reset steps of main operation.   ¡
Int Reset
30
R{ M J -[---------1(
3   1------1
                 E            ] E          ] -[     --------.--M-                         L
                                                                                 w�-1
     I   Step 2 - Move to hook 2. Trans. to Step 3 when engaging 1 hook open 2 sec.
Engl_Tmr
Step_2 TON----�
Timer T4:1
Preset 200
                                                                Accum               o
                          Engl_Tmr/DN                                            Step_3
                                                                            []�'
     I   Step 3 - Raise pallet. Trans. to Step 4 when up.   1
5
                 [                 TE           ]   -
                                                    [ --�M----1 L
                                                                                 w�-3
         Step 4 - Lower rotator. Trans. to Step 5 when down.
6 -              -E-r-E-J -
                          E --�M----1 L
                                                                                 w�-4
          Figure 6.24. PLC-5 ladder logic for engine inverter station. (continued)
340        Sequential Applications
mp_Tmr
Step_5 TON----�
T4:3
Preset 150
Accum O
E 3 -[ ---.--M- L
                                                                                L-c�-5
            Step 6 - Raise rotator.     Trans. to Step 7 when up.
      8   t-----i
                     E             rE                J 1---
                                                          E     ---..-M---1                    L
                                                                                     L-c�-6
            Step 7 - Rotate clockwise.      Trans. to Step 8 when clockwise.
9 t-----i
                                                                                     L-c�-7
            Step 8 - Lower rotator.     Trans. to Step 9 when down.
                                                                 Unclmp_Trnr
             Step_9
                                                                          TON
11 Timer On Delay
Timer T4:4
Pres et 100
                                                                    Accum                o
                            Unclmp_Tmr/DN            Run                             Step_lO
                                  E                  3 �
                                                       E -------r-
                                                                M  ---1 L
                                                                                L-c�-9
            Step I O - Raise rotator.    Trans to Step 1 1 when up.
  12      t----1      E-rl---E-
                    1--        J 1---E----...-
                                            �  ---! L
                                                                                     Lc�IO
                                            Figure 6.24. (continued)
                                              6.4 COMPLICATED RESET OPERATION                341
13
                 E             J    E           3         ---i°S--1
                                                        1--
                                                          [                       L
                                                                          Le�¡¡
          Step 1 2 - Drop engine. Trans. to Step 1 3 when not up.
14
     -           -E-H--3 E--------.-
                                                              Eng2_Tmr
          Step_13                                                   TON-----,
Timer T4:2
Accum o
Eng2 _Tmr/DN
Step_2 ENGI_RET
18 .........- --1 �
Step�
RStep_2
ROTR DOWN
            Rotation control
                                    1
  20
                    E                   ]
               Step_ll                  Run                              ROTAT   CCW
  21
                    E                   J E                                e
I Gripper control
22 1-T----i
Step_8
I Pallet up control I
23 1-T----i
Step_5
Step_7
Step_9
Step_ll
Start/stop for reset operation. Reset pb starts, reset step 4 stops it.
24
                               H                H-----(
            Int�+'
      I   First press of reset pb starts reset.   l
25
                             H            H             H          H-----1(L
                                                                 RUnClmp_Tmr
          RStep_l
                                                                      TON-----,
Timer T4:5
                                                                 Accum                     o
                            RUnClmp_Tmr/DN                                          RStep_2
                       ...______,   i--
                                      [ ----�loS--1                                       L
�-----------------��-¡
27   t---t         t-E---lrt--E----�1oS-- L
                                                                                    ��-2
zs                 E                J     E-----------.------1
                                        ,__
29                  -1    �H������-cu
      I   Reset steps of main operation
30
                                                                                11��'
                                                                                i""'v
Step_3
                                                                               u
                                                                             Step_4
                                                                               u
                                                                             Step_S
                                                                               u
                                                                             Step_6
Step actions
The start and transitions for the reset operation (rungs 24 - 29) are handled similarly as
for the normal station operation. The last step (step 4) of the reset operation is used to
unlatch the Int_Reset coi! which is on as long as the reset operation is in progress. The reset
steps are used as conditions to tum on the rotation mechanism up and rotate controls (rungs
1 8 and 2 1 ) .
The Allen-Bradley ControlLogix ladder logic code is nearly identical to the PLC-5
code in Figure 6.24. The only difference occurs in the timers. The "Time Base" field is
absent and the Preset value is multiplied by 1 0 (Contro!Logix time base is 1 ms). Also, the
timer tag appears in the Timer field of the TON instruction, replacing the address in the
The Siemens S7 ladder logic code looks most similar to the Modicon ladder logic code.
Rather than show the entire S7 ladder logic, only rungs 3-8 are shown in Figure 6.2 5 . The
GE Fanuc ladder logic is also similar to the Modicon Concept ladder logic. Rather than
show the entire ladder logic for the GE Fanuc PLC, only rungs 3-9 are shown in Figure 6.26.
                                               6.4 COMPLICATED RESET OPERA TION                345
3
                1
                                  l   l
                                      t------tl      �p��
                                                                    YRH
          Step 2 - Move to hook 2. Trans. to Step 3 when engaging 1 hook open 2 sec.
"Engl_Tmr"
4                            EN       ENO
          "Step_2"
                             IN         Q
                                                          ��-�
T#2S PT ET
5
                1
                                  1--1-1             �                      s   H
                                                                    y�3H
          Step 4 - Lower rotator. Trans. to Step 5 when down.
6
                1                 1--1-1             �                      s   H
"Step_4"
                                                                            RH
          Step 5 - Clamp engine. Trans. to Step 6 when timer done.
"Clmp_Tmr"
71------�EN                           ENOt------l
                                                          1
          "Step_S"
                --� IN                  Q                               �-CH-�
          T#ISSOOMS          PT        ET
8
                1
                                  1--1-1             �                      s   H
                                                                    Y�H
    Figure 6.25. S7-300/400 ladder logic for engine inverter station (partial).
346       Sequential Applications
                        1          1        1         1     -
                                                            1 --u--tS
                                                                    e
                                                                    t:_
                                                                      �
                                                                                            RH
               Step 2 - Move to hook 2. Trans. to Step 3 when engaging l hook open 2 sec.
                   Step_2                                                             Step_3
                                                  TMR
                        1--���---1TENTHS1--���������.--��
      4
                                                                                            sH
                                                Engl_Trnr
20 PV
                                                              ----.-e--
                  Step_3      PALL         UPLS       Run                             Step_4
      s                 1          1   -    1        1      -1                              sH
                                                                                      Step_3
                                                                                        RH
               Step 4 - Lower rotator. Trans. to Step 5 when down.
                                                              ----.-e--
                  Step_4     ROTR          DNLS       Run                             Step_5
      6
                        1
                                   1   -    -1-1            -1                              s   H
Step_ 4
                                                                                        RH
           I   Step 5 - Clamp engine. Trans. to Step 6 when timer done.
                  Step_5                                                             Clmp_Dn
                                                  TMR
      7
                        1
                                                TENTHS      -�����-----t(                       H
                        1
                                                Clmp_Trnr
15 - PV
Clmp_Dn Run
      8
                        1          1        1
                                                              ----.-e-
                  Step_6      ROTR         UPLS       Run                             Step_7
      9
                        1          1-1--1                   -1                              s   H
Step_6
                                                                                        RH
           Figure 6.26. GE Fanuc ladder logic for engine inverter station (partial).
                                                                         6.5 P ARALLEL OPERA TIONS                        347
Suppose the gasoline engine manufacturer wants to increase the throughput of the
assembly line. Therefore, the cycle time of each station must be decreased. One way to meet
this requirement for the engine inverter station is to allow certain steps to happen
simultaneously. For example, the raising ofthe pallet (step 2) and the lowering ofthe rotator
(step 3) steps can occur simultaneously. The first part ofthis revised function chart (without
the actions) is shown in Figure 6.27. The double horizontal line indicates that both paths are
executed simultaneously.
On a function chart, two kinds of branching are allowed. If the transition out of a step
causes more than one step to be activated simultaneously, called simultaneous divergence
double horizontal lines distinguish this type of branching. Also, only one common
transition condition is permitted above the top double horizontal line, and no transitions are
permitted below the upper double horizontal line. When step 1 1 is active and the condition
" X V l l O Closed" is true, then step 11 becomes inactive and steps 1 2 , 1 4 , and 1 6 become
active simultaneously. The sequences converge with a double horizontal line having a
common transition symbol under the double horizontal line. Step 1 8 w i l l become the active
step only when ali the steps above the double horizontal line are active and the transition
condition "XV20 l A Closed .and. XV202A Closed .and. XV203A Closed" is true. For sorne
systems, especially those that involve mechanical motion, the simultaneous steps do not
finish at the same time. In this situation, an extra step must be added before the branch
convergence (lower double horizontal line). This step serves to stop the motion and to wait
for the other parallel steps to finish. This issue is considered in Example 6 . 5 .
A selection of one sequence out of more than one sequence is called exclusive
horizontal line, as shown in the upper part of Figure 6.29. Each possible sequence path
                                                       AllowNext
                                      Step_2
                                                            One In
Engl_Tmr done
                                                                                       Lower
           Step_3        Raise Pallet                                   4
                                                                   Step_       Rotator Mechanism
.and. Run
                                               Close
                                Step_l 1
                                              XVllO
X V I I O Closed
�� �� o�
                                               Open
                                Step_18
                                              XV326
divergence by the single horizontal line. If step 5 is active and the tank is full, then there are
three possible transition conditions. Ifthe "Path 1 " condition is true, then the logic advances
to step 6. Otherwise, if"Path 2" is true, then the logic advances to step 8, or if"Path 3" is
true, the logic advances to step l O. In order to select only one succeeding step, the transition
                                            Fill Tank
                                Step_S
                                              Open
                               Step_12
                                             XV103
conditions must be mutually exclusive. The several sequences must also converge to a
common sequence, as in the lower part ofFigure 6.29. There must be as many transitions
permitted below the lower horizontal line. If step 7 is active and "XV l 02A Closed" is true,
or if step 9 is active and "XV102B Closed" is true, or if step 11 is active and "XV102C
Both types of branching can be combined on the same function chart as shown in
Figure 6.30. Note that the beginning and ending of each branch must correspond. A
Initial
Run
                                                        Heat
                                      Step_l
                                                       TlOOO
T l OOOTemp >= 1 0 0
ProductA ProductB
TlOOOLev TlOOOLev
>= 80 >=90
                                      Heat
                         Step_5
                                     TlOOO
Step_6
T l OOOTemp <= 40
                                                       Dump
                                       Step_8
                                                      TlOOO
T l OOOLev <= 1
The code to handle the transitions for the simultaneous divergence in Figure 6.28 is
shown in Figure 6 . 3 1 . The exclusive divergence of Figure 6.29 is handled in ladder logic
Step 1 1 - Close XVI 1 0 . When closed, transition to Steps 12, 14, 16.
15 1 1 - -------.......--- s --,--l
Step_14
                                                                                                    s
                                                                                                 Step_l6
                                                                                                    s
                                                                                                 Step_ll
    16                  1            1       -1----------.
                                                         � --                                       s
ye�12
    17                  1            1       1-----------.
                                                         � --                                       s
ye�l4
    18                  1            1       -1----------.
                                                         � --                                       s
ye�l6
   19
                        1            1       1         1   1            1   1            1       Ht
                                                                   XV203A_Cls                    Step_l 8
                                                               ¿¿--1        ---...---4              s
                                                                                                 Step_13
Step_l5
Step_17
   Figure 6.31. IEC ladder logic for example simultaneous divergence ofFigure 6.28.
                                                                 6.5 PARALLEL OPERA TIONS                       351
Path 1 Step _6
                                                                                     -1--1-( s
                                                                             Path    2          Step_8
                                                                                     l          (s
                                                                             Path    3          Step_lO
                                                                                     -1--
                                                                                      1 -( s
10
                     1             1      1--
                                            1------d---1                                            s
                                                                                                Ste;_6
1 1                  1             1      i--
                                            1    -----�d--------f                                   s
                                                                                                Ste;_8
12                   1             1      -1     -----�M- s
                                                                                             L-�t�lO
13
                                                                                                    s ....__ ____.
                     1             1
                                                                                                    R
                     1             1
                                                                                                    R
                      1            1
Step_l 1
      Figure 6.32. IEC ladder logic for example exclusive divergence ofFigure 6.29.
352       Sequential Applications
Example 6.5. In order to decrease the cycle time of the engine inverter of Example 6.4,
l. The "raise pallet" (step 2) and the "lower rotator" (step 3) steps occur
simultaneously.
2. After the engine is unclamped, the rotator is raised and rotated CCW ( steps 1 O and
Solution. For both simultaneous divergence parts ofthis example, one must consider if an
extra step must be added for each branch just before the convergence. For the first AND
branch, no extra step is needed. If the "raise pallet" step finishes first, the PALL_UPCTL
output continues to be activated while the rotator lowers, which is acceptable since the
PALL_UPCTL needs to be on until the engine is dropped back onto the conveyor. Ifthe
"lower rotator" step finishes first, the ROTR_DOWN output continues to be activated,
holding it against the mechanical stop, which is also nota problem since it should be a short
time. The "raise pallet" should finish first, since this motion travels a shorter distance. The
second AND branch requires an extra step before the convergence. The "move out pallet"
step must complete, even when the operation is paused. The "wait" step allows the
ENG2_RET output to be tumed off when the operation is paused while the rotator is
moving. The extra step after the "rotate counterclockwise" step is not necessary, but it does
make sure the ROTR_CCW output is offwhile the engine is moving out.
The revised function chart for the station is shown in Figure 6 . 3 3 . Note the extra wait
steps added to the second simultaneous divergence. Also, with the wait steps (Step_l2 and
Initial
Run
                                 PALL      UPCTL
Step_5     Clamp Engine
                                 GRIP   CLOS
Clmp_Tmr = 1 . 5 s
                                 PALL      UPCTL
              Raise
Step_6
                                 GRIP   CLOS
             Rotator
                                 ROTR      UP
                                 PALL   UPCTL
              Ro tate
Step_7
                                 GRIP   CLOS
            Clockwise
                                 ROTAT      CW
              Raise           ROTR    UP
Step_lO                                          Step _ 1 3   Drop Engine
             Rotator
Step _ 1 5 ) , the transition condition out of the convergence of steps 1 2 and 1 5 uses the
step-in-progress bits of the wait steps instead of the ROTR_CCWLS input and Eng2 _Tmr
The Modicon ladder logic code for the transitions is shown in Figure 6 . 3 4 . The code for
the reset operation and the physical outputs is the same as rungs 1 6 - 30 ofFigure 6.23 with
the exception that the contact labeled "Step _ 1 3 " in rung 1 7 is replaced by "Step _ 14".
                                1             1 / - 1-.--.1               -1   ���--o-
                        Run
       2
                            H/H/H/H/H/H/H/Ht
                                     Step_8        Step_9       Step_lO     Step_l l   Step_12   Step_13         Step_14
                        tHIH/H/H/H/H/H/Ht
                                                                                                 Step_15             Step_l
                                                                                           tHI�
                 Step   1   -   Wait for pallet. Trans. to Step 2 when pallet present.
       3
                                1
                                              1     1--1               -1-----.--
                                                                                � -                                  s
                                                                                                           Y§}-
                 Step 2 - Move to hook 2. Trans. to Steps 3&4 when engaging                         1   hook open 2 sec.
Engl_Tmr
                    Step_2
                                                            TON
4 i--------1 IN Q i------------,.-----1
t#2s PT ET
Figure 6.34. Modicon ladder logic for transitions of revised engine inverter station.
(continued)
                                                                  6.5 PARALLEL OPERA TIONS   355
 s - -.....
               -1-1               -1-1            --1----ti         --1    -----t
Clmp_Tmr
         Step_5                                               Run
                                       TON
6 i-------i IN Q i-------1
t# I . S s PT ET
 7
               --1-1-1-1                              -1---�s-
                                                                                    �
      Step 7 - Rotate clockwise.      Trans. to Step 8 when clockwise.
 8
               1
                              1 - -- 1-1              -1---�-s
                                                                                    �
     Step 8 - Lower rotator.      Trans. to Step 9 when down.
 9
               --1-1- --1-1                           -1----r--
                                                             �  s-
Step_9 Run
10
               1
                       Wlj�TONE�l                             1
      11                  1               1   -   1             1   -
                                                                    1 --......-
                                                                            �   -s
      12
                          1
                                          1-       -1-1             -1--..........-
                                                                              �     -      s
      13
                          1
                                          1 7 1 --1                 -1------.--
                                                                             �  --         s
Step 1 4 - Move out pallet. Trans. to Step 1 5 (wait) when time done.
Eng2_Tmr
                    Step_l4
                                                       TON
14 i--------1 IN Q t------------,....---1
t#3s PT ET
      15
                          -1-11-1
operations. The major part ofthe method is to develop a function chart ofthe operation:
After the first draft of the function chart is developed, other key questions to ask:
If it does not repeat, then the last step may need to reset (unlatch) the
Is there another sequential operation that must occur when the system is
Up to this point, the control of a sequential machine has assumed mostly continuous
operation. The operator can start and stop/pause the operation and reset it to the first step.
This mode of operation typically called the auto mode. However, when devices
malfunction, there are two other modes of operation that are also useful. The first is the
ability to single-step the operation. When in the single-step mode and the conditions to the
next step are met, the program waits for the operator to press a "Continue" button in order
for the operation to advance to the next step. The single-step mode allows personnel to
monitor the operation of each step individually. The second mode that is useful is
completely manual operation. In this mode, the operator may individually manipulate the
physical outputs. Of course, a push button must be provided for each manipulated physical
output.
The operator panel for this three-mode control of the machine operation is shown in
Figure 6 . 3 5 . The mode switch is a three-position selector switch. The other switches are ali
push button switches. The switches required for manual manipulation of the physical
In the single-step mode, the start/stop push buttons function the same as in the auto
mode. When in the single-step mode, pressing the stop button pauses the operation. When
paused, the start button must be pressed before pressing the continue button.
Auto to Single-step: Operation completes the current step and then pauses, waiting
           for the "Continué" button to be pressed. The state of the Run coi! does not change.
358      Sequential Applications
                                 AUTO
                                                                        START             STOP
                                              SINGLE
                 MANUAL
                                               STEP
                               CONTINUE
                                                                    º º
                                                                    RES ET
                                o                                   o
                       Figure 6.35. Operator panel far three-mode control.
Single-step to Auto: Operation will resume from the current step. The state ofthe Run
Auto to Manual: Operation pauses at the current step (like the stop switch was
Manual to Auto: Operator must also press the Start button to resume automatic
operation at the step from which it was switched to Manual. Ifthe operation must
resume from the first step, the Reset button must be pressed befare the Start button
is pressed.
The single-step and manual modes are easily added to the sequential operation. The
1 . The start/stop rung is modified to disable the Run coi! when in manual mode.
2. Auto and single-step mode logic is added in series with the step transition logic.
3. Manual mode logic is added in parallel to the conditions driving the physical
outputs.
When adding the single-step and manual logic to the ladder logic, particular attention
must be paid to those physical outputs that must be tumed offwhen sorne physical limit is
reached. For example, the command to extend a double-acting pneumatic cylinder may
need to be tumed off when the cylinder is fully extended, even while the operator is still
pressing the "Extend" button in manual mode or befare the "Continué" button is pressed
Example 6.6. Add three-mode control to the engine inverter of Example 6.4. Four
Variable Description
(a)
                Step_HROHRun�ÁÚTO
                             ,..                                                                  '
    4
                                                                                                        '
                                                                                                                I
: SSTEP CONTINU
                                                           ',               1-IP
                                                                '                                ....
(b)
                                                            ;,          - -
                Step_4                    Run       /'" ÁUTO                           ,                            ROTR   DOWN
19
                        �-/ _ _ ; Y
                                 I
                                                                    ---1----117
                             1
                                 MANUAL              M      RTDN            ROTR       DNLS                 I
                             1
I l 1 1 7 _ ,..
                                         - - - - - - - - - - - -
                                                                (c)
Figure 6.36. IEC (Modicon) ladder logic changes for three-mode control (partial):
Solution. Rather than giving a complete solution to this problem, the following changes to
The dashed lines indicate the changes to the original ladder logic.
In rung 1 9 , M_RTDN is an operator manual push button to move the mechanism. Also
note that for both the single-step and manual modes, the control to move the mechanism
down is tumed off as soon as the ROTR                       DNLS limit switch tums on.
360      Sequential Applications
Ifthe PLC does not have set/reset or latch/unlatch instructions (e.g., Modicon x84 and
Siemens TI-5x5) then the step-in-progress bit for each step is handled like a normal
start/stop rung, shown in Figure 6 . 3 7 . The start condition is the previous step and the
transition condition. The stop condition is the step-in-progress bit of the next step. The
Int_Reset contact also functions as a stop and is used to restore the steps to the initial state in
the same manner as unlatching ali step-in-progress coils in previous examples in this
chapter. The disadvantage of this approach is that the step-in-progress bits of successive
steps overlap by one sean, thus the physical outputs may overlap by one sean. For example,
the ladder logic rungs in Figure 6 . 3 8 a will have a timing diagram like Figure 6.38b when
LS2 el oses to cause a transition from Step _8 to Step _9. Each application must be examined
to determine ifthis overlap is acceptable. A simple way to remove the overlap is to insertan
extra step between each step. This extra step overlaps the prior step and the succeeding step,
and it eliminates the overlap between the prior and succeeding steps. For example, the
the timing diagram for a transition between steps 8 and 9. Other approaches that avoid
The Modicon Concept Jadder logic without set/reset instructions for the tub loader of
Example 6.2 is shown in Figure 6.40. Note that the first start of the operation must be
This chapter presents a technique for designing Jadder logic programs to control
sequential processes. The technique is based on describing the operation as a function chart
and then translating the function chart to ladder logic code. The ladder logic uses the basic
contact and coi! instructions. Timers and counters are used only when explicitly needed by
the operation. The ability to pause and reset an operation is also considered. The design of
programs for operations with parallel steps and for operations that need single-step and
manual control is examined. Since the design technique uses the set/reset instructions, the
last section presents an altemate implementation using only the ordinary output coi! that
may be used for PLCs that do not have the set/reset coil instructions.
                       1
                                              1    �-/1---I                       -e
               Current1-
                       _ st_eP
                         _                 N--1el/ S
                                                   �
1 1 � / l t-----(
            Step_
                .....
                l     8----isli      µ
                  1
                                 1   � / t-- 1---(
Step_9 Step_lO
-----1---11/
(a)
            Sean
        Number          30           32       34
                         .
. .
                 l _j ¡
                         •   1
LS2 1
o . �
. . .
                 1 ---------·
     Step_8              .   .       ::
o ··----------
                 1
                             :
                                 �---- - - - - -
                                 1   1    1   1
                                                   - --- 1
Step_9 1
O --7--7'
Time
In PLC Memory • • • • • • • •
(b)
Figure 6.38. Two overlapping steps: (a) ladder logic; (b) transition from Step_8 to Step_9 . .
362    Sequential Applications
                1
                           I     ÉJ / 1 ----(
Step_8 Step_8A
-1-1/
                1
                                                                                                         (
                           l    �                      /     1
Step_l1-A--sl¡-� ·
                1
                                                                                                         (
                           I / ÉJ / 1
Step_9 Step_9A
                -1-1/
                                                       (a)
                                    Sean
                                 Number             30                 32                 34
LS2
                                        1       - - -:i - - -:i · - � ·
                               Step_8
                                                                        • 1
                                                                        , ,
                                                                          1
                                                                                                 .. _
                                        o
, 1 - - :- - - :¡
                                                                 ' 1    '         •   I
                          Step_8A
                                                                  1                   1
o ------· ·-------·
• 1 • • •
                                                                        •
                                                                              ----------
                                                                              1
                               Step_9
                                        o - - - - - - - - - .!
                                                                                              Time
In PLC Memory • • • • • • • •
(b)
Figure 6.39. Extra step to eliminate overlap in steps: (a) ladder logic; (b) transition from
Step_8 to Step_9.
                                                                             6.9 CHAPTER SUMMARY                           363
                     H/H/H/H/HIHt
                                                                            Step   6    Step     7        First   Start
tHI-H/l-ó--
    2                 t---------r-------/r--0---
               Step_7         GATE2            CLLS           Run
1 1 1 1
Step_l Step_2
1 1 /
Part_Ctr
    3                                                    cu               Q t------------1
                      -
                      1 -1/
Step_2
100 PV cv
    4
                      1               r        r              1
                                                                    i-------r---1
                                                                    1
                                                                                             /   r--0----
               Step_2             Step_3
1 1 / 1
    5
                      1               1        1              1
                                                                    i---.------11
                                                                    1
                                                                                             /   r--0----
               Step_3             Step_4
1 1 / 1
Figure 6.40. Modicon ladder logic for transitions for tub loader with no set/reset output
instructions. (continued)
364       Sequential Applications
GlH Tic
                                                                    IN        Q 1- ......_ ----l C U                  Q
  6
                 H1HH/
                                                     t#IOOms        PT       ET                    R
          Step_4
PV CV
Gl Hold Dn
                                                                                     «----�
      I   Step 4 - Close Gate 1        1
  7
                     l            -1       �--�-----1/�
             Stepl4               s{¡-1-s___.
  8 1- - -1
                     1             1   ---1         ----ti     lt-----r---11                I�
             Step_5               Step_6
-1---11 I --1____.
  9
                     1             1       --1      ----ti     -1  ---.------ti/�
             Step_6               Step_7
                     -1---11/1-----'
                                                                                        G2H        Tic
                                                                    IN        Q                    CU                 Q
 10
                 H1H                            H/                                1--....._----1
                                                     t#IOOms        PT      ET                     R
          Step_7
PV CV
<�
        11
                             l             -1       �-----r------1/�
                      Stepl7                s¡1¡-1-1____.
       17
             µ        Reset
                             1
                                            Run
                                            1/-1------0-
                                                                                                  Int   Reset
REFERENCES
VA.
IEC, 1988. IEC 848: Preparation of Function Charts for Control Systems,
Schneider Automation, 1 9 8 8 . Concept Block Library IEC, vol. 1 , ver. 2 . 1 , pub. 840
Siemens, 2002a. Ladder Logic (LAD)for S7-300 and S7-400 Programming: Reference
Siemens, 2002b. System Software for S7-300/400 System and Standard Functions:
Gennany.