PLC Detailed Case Studies and Examples



Home | Forum | DAQ Fundamentals | DAQ Hardware | DAQ Software

Input Devices
| Data Loggers + Recorders | Books | Links + Resources



AMAZON multi-meters discounts AMAZON oscilloscope discounts


This section is intended to be a capstone project encompassing most of the concepts covered in this guide. This project is part of a large networked multiple-sites irrigation-canal water-control process. The coverage is abbreviated to one site and is implemented using the Siemens S7-1200 PLC system.

[Note: Figures and Tables to be added soon!]

. Goals:

- Understand and document complete process description.

- Design the control system I/O and PLC memory map.

- Develop complete system logic diagrams from specifications.

- Implement ladder and HMI configuration, communication, programming, and checkout.

The two case studies selected for this section are intended to be capstone projects encompassing most of the concepts covered in this guide. The first project is part of a large networked multiple-sites irrigation-canal water-control process that was implemented by the authors several years ago in the delta region of the River Nile in Egypt. The second project deals with a common process-control task in the wastewater treatment industry that has to do with pumping-station control.

The coverage in both projects is simplified to one site and is transformed to a newer implementation using the Siemens S7-1200 PLC system.

1 Irrigation-Canal Water-Level Control

Irrigation water is channeled through two motorized vertical gates from an upstream to a downstream agriculture area. Motorized gates are used to regulate the water flow and thus the downstream level. Fully closed vertical gates will produce continuous reduction in the downstream water level. Low downstream water level won’t allow irrigation in the downstream area.


AMAZON multi-meters discounts AMAZON oscilloscope discounts


Fully raised vertical gates will result in excessive irrigation in the downstream area and thus much wasted water. Adequate regulation of the position of the vertical gates can maintain the desired downstream water levels at different times and thus support required irrigation cycles and preserve water resources at the same time.

Two identical constant-speed motors drive the two vertical gates. The motors can move the gates up or down, but only one motor can run at any time. This is done in order to reduce the overall power requirements of the regulator site. The lowest gate should be selected for a raise operation, and the highest gate must be selected for a lowering command. Both gates are equipped with position sensors, fully closed limit switches, and fully open limit switches.

Two downstream level sensors provide redundant measurements at three points downstream. These sensors must be validated because they should provide similar readings consistent with previous measurements. We will assume input values from two validated sensors for this project. An upstream flooding limit switch is used to provide the regulator with an indication of possible flooding upstream and thus command the system to raise both gates until the flooding condition is removed and the downstream level is close to the upstream level.

Each motor is equipped with an overload alarm switch that is used to trigger any unusual conditions, such as over temperature or overload. The motor provides a discrete input signal within 5 seconds from the start action indicating whether the motor is running or not. If a motor fails to start, then the other motor is selected, and an alarm is issued. Motors also can start by activating the push button located on the local panel if the AUTO/MAN switch is in manual position, and the LOCAL/REMOTE switch is on LOCAL.

A selected motor is scheduled to run for 15 seconds. This is followed by an idle period of 10 minutes. No motor is allowed to run during the idle time. This is done to prevent repetitive activation of the motors during downstream water-level transient. It’s important to keep the gates close to the same height in order to minimize the loading on both gate structures. An emergency shutdown switch (ESD) is available to the operator to shut down the system in addition to the START and STOP push-button switches.

======

Tag Name Address Number Comments VG1_ROL I0.0 Vertical Gate1 running on line VG2_ROL I0.1 Vertical Gate2 running on line VG1_RAISED I0.2 VG1 fully raised VG1_LOWERED I0.3 VG1 fully lowered VG2_RAISED I0.4 VG2 fully raised VG2_LOWERED I0.5 VG2 fully lowered ESD I0.6 Emergency Shutdown selector switch AUTO I0.7 AUTO switch UP_Flod_LS I1.0 Upstream flooding limit switch

Fig. 1 Irrigation-system inputs.

======

Fig. 2 Irrigation-system PLC input tags.

======

Tag Name Address Number Comments VG1_ raise Q0.0 Vertical Gate1 raise one step VG1_ lower Q0.1 Vertical Gate1 lower one step VG2_raise Q0.2 Vertical Gate2 raise one step VG2_lower Q0.3 Vertical Gate2 lower one step VG1_FTS Q0.4 Vertical Gate1 failed to start VG2_FTS Q0.5 Vertical Gate 2 failed to start DS1_FAIL Q0.6 Down stream1 Fail DS2_FAIL Q0.7 Down stream 2 Fail

Fig. 3 Irrigation-system outputs.

=====

Fig. 4 Irrigation-system PLC output tags.

=====

1.1 System Input-Output (I/O) Map

The first step in the design of a PLC control application is translation of the process specification to actual I/O resources. This is known as the PLC I/O map. This important step lists all I/O tags, assigned PLC addresses, and description, which are produced from the piping and instrument diagram (P&ID). P&IDs are the "schematics" used in the field of instrumentation and process control to provide the documentation needed for field implementation. The P&ID is used to better understand the process and how the instrumentation is interconnected. Fig. 1 lists the irrigation-control-system discrete inputs, whereas Fig. 2 shows the corresponding PLC input tags. Fig. 3 and 9.4 repeat the same process for the discrete outputs. Notice that none of the analog I/Os for this control process is listed. We only limited our case study to ON/OFF control based on water-level analog real-time measurements relative to a user-defined set point for the down stream water level.

Fig. 5 Vertical gate 1 control up raise operation.

Fig. 6 Logic for starting the vertical gate 1 motor for 15 seconds.

Fig. 7 Motor fail-to-start logic and logic for selecting vertical gate 1 as the lowest in position. Irrigation Project Vertical Gate1 Up Logic Diagram (Part 3); Irrigation Project Vertical Gate1 Up Logic Diagram (Part 4)

1.2 Logic Diagrams

Logic diagrams are recommended for sound documentation and as means of transitioning to the actual ladder programming implementation. This step, as will be demonstrated, makes ladder programming much easier. The logic diagram in Fig. 5 shows the implementation for the vertical gate 1 raise operation. Other operations logic diagrams can be constructed in a similar way for the vertical gate 1 lowering operation ( Fig. 6) and both the raise and lowering for vertical gate 2 ( Fig. 7).

The logic diagram is segmented into four parts. Part 1 ( Fig. 5) derives VG1 selection for gate 1 control up raise operation. The control up raise command requires that the desired set point is greater than or equal to the downstream aver age water level, downstream average level is outside the dead band, and VG1 is the next gate to go up. VG1 is next to go up if it’s available, is not fully raised, VG2 is not the next to go up, and VG1 has the lowest absolute-level position. VG1 is available to go up only if the system is on AUTO, VG1's motor is not running, VG1's motor did not fail to start, and the system is placed on REMOTE operation.

The system is placed on LOCAL in order to allow motor to start only from the field using the local panel START/STOP push button.

Part 2 ( Fig. 6) shows the logic for starting the VG1 motor for 15 seconds.

This raise duration should cause an increase in the downstream water level, which is expected to stabilize after a 10-minutes idle time. The system enters the idle state after every gate raise or lower operation. No gate movement is permitted during the idle. Part 3 ( Fig. 7) details the motor fail-to-start logic, whereas Part 4 ( Fig. 7) covers the logic for selecting VG1 as the lowest in position among the two gates.

Fig. 8 (a) Irrigation-system PLC function blocks (portal view). (b) Irrigation-system PLC function blocks (project view).

1.3 Automated-System Building Blocks

The CPU supports the following types of code blocks that allow an efficient structure for the program:

• Organization blocks (OBs) define the structure of the program.

• Functions (FCs) and function blocks (FBs) contain the program code that corresponds to specific tasks or combinations of parameters. Each FC or FB pro vides a set of input and output parameters for sharing data with the calling block.

• Data blocks (DBs) store data that can be used by the program blocks.

Fig. 8 shows the PLC function blocks (Set point Validation, Initialization, Alarms, Downstream Average, Vertical Gate 1 Lower, Vertical Gate Position, Vertical Gate 1 Raise, Vertical Gate 1 Lower, Vertical Gate 2 Raise, and Vertical Gate 2 Lower). The exact ordering of the implemented functional blocks is irrelevant because the scanning of the ladder code is continuous and repeats at a high rate (at least three complete scans per second). A few time-critical tasks might require a definite ordering of some functional blocks. Most initialization tasks are executed only once on power-up or system-reset.

2 Irrigation-Canal Ladder Implementation

The set-point validation function ( Fig. 9) consists of one network. It compares the set point received from the user to high and low limits. If the set point is out side the limits, a "Wrong set point, enter again" message will be displayed on the human-machine interface (HMI).

Fig. 9 Set-point validation network.

Fig. 10 Initialization network.

Fig. 11 Vertical gate 1 failed-to-start network.

Fig. 12 Vertical gate 2 failed-to-start network.

Fig. 13 Downstream 1 transmitter fail network.

Fig. 14 Downstream 2 transmitter fail network.

The initialization function ( Fig. 10) consists of one network that clears the accumulated values for VG1 Fail to Start, VG2 Fail to Start, Idle, and Common Alarm timers because the system is placed in AUTO mode.

Alarm functions include Vertical Gate 1 Failed to Start, Vertical Gate 2 Failed to Start, Downstream 1 Failed, Downstream 2 Failed, and low level float switch.

Fig. 11 shows a ladder-logic diagram for the vertical gate 1 failed-to-start alarm. This diagram assumes a normally open Q0.0 tag name VG1_RAISE, a normally open Q0.1 tag name VG1_LOWER, a normally closed contact I0.0 tag name VG1_ROL, an ON-DELAY timer (TON) with a 5-second preset time, and Q0.4 output coil tag name VG1_FTS. The ladder diagram works as follows:

• During the first scan, because the VG1 raise or VG1 lower output is set while I0.0 tag name VG1_ROL is OFF, the power flows to the timer, and the timer starts timing.

• It takes up to 5 seconds to receive the associated motor running online contact from the initiation of the motor START command.

• If motor running online signal is not received within 5 seconds, the fail-to-start coil VG1_FTS is energized, indicating a motor failure.

Fig. 12 shows a ladder-logic diagram for the vertical gate 2 failed-to-start alarm. This diagram assumes a normally open Q0.2 tag name VG2_RAISE, a normally open contact Q0.3 tag name VG2_LOWER, a normally closed contact I0.1 tag name VG2_ROL, an ON-DELAY timer (TON) with a 5-second preset time, and Q0.5 output coil tag name VG2_FTS. The ladder diagram works as follows:

• During the first scan, the VG2 raise or VG2 lower output is set while I0.1 tag name VG2_ROL is OFF (because it takes at least 5 seconds to receive the VG2 contact when the VG2 motor is running successfully).

• The power flows to the timer, and the timer starts timing.

• If the timer accumulated time is equal to the timer preset time (5 seconds), Q0.5 will turn ON, indicating that VG2 failed to start.

Fig. 13 shows a ladder-logic diagram for the downstream 1 fail alarm.

This diagram assumes an Out range instruction and output coil Q0.6 tag name DS1_Fail. The ladder diagram work as follows: If downstream 1 is greater than downstream average high threshold or less than downstream average low thresh old, then power flows to the output coil, and Q0.6 is set. This is an indication of level sensor 1 failure/alarm.

Fig. 14 shows a ladder-logic diagram for the downstream 2 fail alarm.

This diagram assumes an Out range instruction and output coil Q0.7 tag name DS2_Fail. The ladder diagram works as follows: If downstream 2 is greater than downstream average high threshold or less than downstream average low threshold, then power flows to the output coil, and Q0.7 is set.

Fig. 15 shows a ladder-logic diagram for the low-low-level alarm. This diagram assumes normally open contact I1.2 tag name LL_FLOAT_SW and out put coil M29.1 tag name LL_LVL_ALARM. The ladder diagram works as follows: During the first scan, because the downstream low-low float switch triggers, power flows to output coil M29.1 and sets the low-low-level alarm.

Fig. 16 shows a ladder-logic diagram for the common alarm. This diagram assumes a normally open Q0.4 tag name VG1_FTS, a normally open contact Q0.5 tag name VG2_FTS, Q0.6 tag name DS1_FAIL, Q0.7 tag name DS2_ FAIL, I1.2 tag name LL_FLOAT_SW, and output coil Q1.0 tag name COMMON_ ALARM. During the first scan, because vertical gate 1 failed to start, or vertical gate 2 failed to start, or downstream1 failed, or downstream 2 fail, or low-float level alarm is set, the power flows to the output coil common alarm, and Q1.0 tag name COMMON_ALARM is set.

Fig. 15 Low-low-level alarm network.

Fig. 16 Common alarm network.

Downstream average function consists of three networks, which include DS average, downstream 1 level sensor validation, and downstream 2 level sensor validation. Fig. 17 shows a ladder-logic diagram for the downstream average.

This diagram assumes a normally closed contact Q0.4 tag name VG1_FTS, a normally closed contact Q0.5 tag name VG2_FTS, a normally closed contact tag name DS1_DS2_FAIL, an ADD instruction, and a DIV instruction. The ladder diagram works as follows: If vertical gate 1 failed to start is OFF, vertical gate 2 failed to start is OFF, and downstream 1/downstream 2 fail is OFF, power flows to the ADD instruction, and the instruction is executed. The Add instruction adds the value at the IN1 input tag name DS1_LEVEL to the value of the IN2 input tag name DS2_LEVEL and outputs the sum at the OUT output tag name DS_SUM. Power also flows to the DIV instruction, and the instruction is executed. The value at the IN1 input tag name DS_SUM divides the constant value (2) at IN2 input and outputs, and the quotient is stored at OUT output tag name DS_AVE_LEVEL.

Fig. 18 shows a ladder-logic diagram for downstream 1 level sensor validation. This diagram assumes a normally open contact Q0.7 tag name DS2_FAIL and a MOV instruction. The ladder diagram works as follows: During the first scan, because downstream 2 fail is ON, the MOV instruction is executed, and it copies the content at IN1 input tag name DS1_ LEVEL to the OUT output tag name DS_AVE_LEVEL.

Fig. 17 Downstream average calculations.

Fig. 18 Downstream average level update using sensor 1.

Fig. 19 shows a ladder-logic diagram for downstream 2 level sensor validation. This diagram assumes a normally open contact Q0.6 tag name DS1_FAIL and a MOVE instruction. The ladder diagram works as follows: During the first scan, because downstream 1 fail is ON, the MOVE instruction is executed and copies the content at IN1 input tag name DS2_LEVEL to the OUT output tag name DS_AVE_LEVEL.

Vertical gate 1 lower function consists of three networks, including Vertical Gate 1 Next Down, Control Down, and Vertical Gate1 Lower. As shown in Fig. 20, if vertical gate 1 is available, highest in position, not fully lowered, and vertical gate 2 is not next to go down, then vertical gate 1 is next to go down.

Fig. 20 Vertical gate 1 next-down logic.

As shown in Fig. 21, if vertical gate 1 is next to go down, the set point is outside the dead band, and the set point is less than the downstream average level, control down is set.

As shown in Fig. 22, if vertical gate 1 next down is set, control down is set, no emergency shutdown, DS1/DS2 did not fail, and idle timer is not timing, then a TP instruction is executed, and vertical gate 1 lower output is ON for 15 seconds.

The vertical gate position function consists of the four networks shown in the following figures. Fig. 23 compares VG1 position with VG2 position. When MANUAL/AUTO switch is placed in AUTO and VG1 position is greater than or equal to VG2 position, then the output coil M29.5 tag name VG1_HIGHEST_ POS is set. Notice that if the comparison used is only greater than and the two vertical gates have equal positions, then no gate will be selected or moved.

Fig. 19 Downstream average level update using sensor 2.

Fig. 21 Vertical gate 1/vertical gate 2 control-down logic.

Fig. 22 Vertical gate 1 lower-output logic.

Fig. 24 compares VG2 position with VG1 position. When the MANUAL/ AUTO switch is placed in AUTO and the VG2 position is greater than or equal to the VG1 position, then the output coil M29.7 tag name VG2_HIGHEST_POS is set. Notice that if the comparison used is only greater than and the two vertical gates have equal positions, then no gate will be selected or moved.

Fig. 23 Vertical gate 1 highest-position logic.

Fig. 24 Vertical gate 2 highest-position logic.

Fig. 25 compares VG1 position with VG2 position. When the MANUAL/ AUTO switch is placed in AUTO and the VG1 position is less than or equal to the VG2 position, then the output coil M29.2 tag name VG1_LOWEST_POS is set.

Notice that if the comparison used is only less than and the two vertical gates have equal positions, then no gate will be selected or moved.

Fig. 26 compares VG2 position with VG1 position. When the MANUAL/ AUTO switch is placed in AUTO, the VG2 position is less than or equal to the VG1 position, then output coil M29.6 tag name VG2_LOWEST_POS is set. Notice that if the comparison used is only less than and the two vertical gates have equal positions, no gate will be selected or moved.

Vertical gate 1 raise function consists of five networks: Vertical Gate 1 Avail able, Next Up, Control Up, Vertical Gate 1 Raise, and Idle Time. As shown in Fig. 27, if the AUTO/MANUAL switch is in AUTO, VG1 not running and not failed to start, and the LOCAL/REMOTE switch is in REMOTE, then VG1 is available (VG1_AV).

Fig. 26 Vertical gate 2 lowest-position logic.

Fig. 25 Vertical gate 1 lowest-position logic.

Fig. 27 Vertical gate 1 available network.

As shown in Fig. 28, if VG1 is available, lowest in position, not fully raised, and VG2 is not next to go up, then VG1 is next to go up.

As shown in Fig. 29, if the set point is outside the dead band and the set point is greater than the downstream average level, then CONTROL_UP is set.

As shown in Fig. 30, if VG1 is next to go up, Control up is set, ESD is OFF, downstream DS1_DS2_FAIL is OFF, and idle timer is not running, then the pulse timer is ON, which raises VG1 for 15 seconds.

As shown in Fig. 31, if VG1 raise or lower or VG2 raise or lower, then idle start pulse timer times for 10 minutes. This delay allows the control action to be realized in the downstream water level.

Fig. 28 Vertical gate 2 next-up.

Fig. 29 Vertical gate 1/vertical gate 2 up control logic.

Fig. 30 Vertical gate 1 raise network.

VG2 raise function consists of three networks: Vertical Gate 2 Available, Next Up, and Vertical Gate 2 Raise. As shown in Fig. 32, if the AUTO/MANUAL switch is in AUTO, VG2 not running and not failed to start, and the LOCAL/ REMOTE switch is in REMOTE, then VG2 is available.

Fig. 31 Idle timer network.

Fig. 32 Vertical gate 2 available logic.

Fig. 33 Vertical gate 2 next-up logic.

Fig. 34 Vertical gate 2 raise network.

Fig. 35 Vertical gate 2 next-down logic.

Fig. 36 Vertical gate 2 lower network.

As shown in Fig. 33, if VG2 is available, lowest in position, and not fully raised and VG1 is not next to go up, then VG2 is next to go up.

As shown in Fig. 34, if VG2 is next to go up, the control up is set, emergency shutdown is off, DS1/DS2 did not fail, and the idle timer is not timing, then the start pulse timer TP instruction is executed and the vertical gate 1 raise output is ON for 15 seconds.

Vertical gate 2 lower function consists of two networks, Vertical Gate 2 Next Down and Vertical Gate 2 Lower. As shown in Fig. 35, if VG2 is available, highest in position, and not fully lowered and VG1 is not next to go down, then VG2 is next to go down. The selection process tries to keep all gates at the same level to reduce the effect of unbalanced water loading on the gate structure, which can produce structural damage. Thus the lowest-position gate is selected when a raise operation is needed, and the highest-position gate is selected for a close operation.

If VG2 next down is set, control is down, emergency shutdown is off, DS1/DS2 did not fail, and the idle timer is not timing, then a TP instruction is executed, and VG2 lower output is ON for 15 seconds, as shown in Fig. 36.

3 Irrigation-Canal HMI Implementation

The HMI implementation of the irrigation control project is discussed in this section.

A simplified user interface with only five pages is assumed in our design. The HMI Function Keys page allows the user to access STATUS, POSITION, ALARM, and CONTROL screens, as shown in Fig. 37. The Vertical Gate Position page in Fig. 38 shows the position of vertical gate 1 and vertical gate 2 in percent. Pressing function key F1 takes the user back to the Function Keys page.

The Alarm page in Fig. 39 displays Vertical Gate1 Failed to Start (VG1 FTS), Vertical Gate 2 Failed to Start (VG2 FTS), and common alarms.

The Vertical Gate Status page in Fig. 40 shows the status of Vertical Gate 1, Vertical Gate 2 Running/Not Running, Raise/Lower. It also displays Vertical Gate1, Vertical Gate 2 Position, Downstream 1, Downstream 2 Levels, and Set Point.

Fig. 37 HMI Function Keys page.

Fig. 38 Vertical Gates Position page.

Fig. 39 Alarm page.

Fig. 40 Vertical Gate Status page.

All values are displayed in engineering units. Pressing function key F1 takes the user back to Function Keys page.

The Control page allows the user to enter Set Point, Set Point High/Low Limits, and Downstream Dead Band. If the set point entered is outside the limits, "Wrong Set Point, Enter Again" is displayed. Pressing Function Key F1 takes the user back to the Function Keys Page. The Control page for the irrigation downstream water level control is shown in Fig. 41.

The setup of HMI configuration, communication with the PLC, status/control pages, and tags is covered in Section 5. One or more HMI units can be used in a centralized control room or in remote locations. All HMIs and PLCs are integrated into one communication network where real-time information is updated and reflected on actual field devices and user interfaces. Network/communication bandwidth requirements are very minimal because a small amount of information is actually passed to connected nodes. New technology, such as with the Siemens S7-1200 system, brought huge advances in processing speeds, communication throughput, devices size, and overall cost. It allows users to implement real-time control at reasonable cost with adequate performance.

4 Wet-Well Pump-Station Control

High-flow-rate storm water is channeled to two large wet wells, the East wet well and the West wet well. The water is pumped to the river from the two connected wells at a constant rate using a predefined process sequence control.

Two motor-driven constant-speed immersed pumps are used, one in the East wet well and one in the west wet well. Each pump is equipped with an overload alarm switch that is used to trigger any unusual conditions, such as over temperature or overload. The motors provide a discrete input signal indicating whether the motor is running or not. The motors also can be started by activating the push button located on the local panel if the AUTO/MAN switch is on MANUAL.

Three float switches are used to provide an accurate indication of the water level at a pre-specified critical location in the East/West wet wells. The low-level float switch triggers the stopping of a running pump. The high-level float switch triggers the starting of a scheduled pump. If the scheduled pump fails to start within 5 seconds, the second pump is selected and started. An alarm must be issued to alert the operator of any motor failure. The very-high-level float switch triggers the starting of both pumps. If either of the two pumps fails to start, the corresponding alarm is activated by the control.

Pumps are scheduled to run according to an operator predefined calendar. This input is expected in hours of accumulated total pump run time. The two pumps must alternate while the water level is below the very high level and above the low level. The two pumps run at levels above the very high level, and cascaded timers are not altered during this condition.

Fig. 41 Control and Command page.

======

Tag Name Address Number Comments OFF_FLOAT I0.0 Off Float Switch ON_FLOAT I0.1 On Float Switch OVERIDE_FLOAT I0.2 Override Float Switch E_ROL I0.3 East Running On Line W_ROL I0.4 West Running On Line AUTO I0.5 Auto/Manual Switch ESD I0.6 Emergency Shut Down selector switch E_OVERLOAD I0.7 East Overload Contact W_OVERLOAD I1.0 West Overload Contact

Fig. 42 Pump-station-system PLC input tags.

======

Tag Name Address Number Comments E_PUMP Q0.0 East Pump Output W_PUMP Q0.1 West Pump Output E_FTS Q0.2 East Pump Fail To Start W_FTS Q0.3 West Pump Fail To Start COM_ALARM Q0.4 Common Alarm

Fig. 43 Pump-station-system PLC output tags.

=====

Fig. 44 Pump-station PLC function blocks.

4.1 System I/O Map

The first step in the design of a PLC control application is translation of the process specification to actual I/O resources. This is known as the PLC I/O map. This important step lists all I/O tags, assigned PLC addresses, and descriptions. Fig. 42 lists the irrigation-control-system discrete inputs and the corresponding PLC input tags. Fig. 43 repeats the same process for the discrete outputs. Notice that none of the analog I/Os for this control process are listed. We limited the case study only to ON/OFF control based on water-level analog real-time measurements relative to a user-defined set point for the downstream water level.

4.2 Automated System Building Blocks

The CPU supports the following types of code blocks that allow an efficient structure for the program:

• Organization blocks (OBs) define the structure of the program.

• Functions (FCs) and function blocks (FBs) contain the program code that corresponds to specific tasks or combinations of parameters. Each FC or FB provides a set of input and output parameters for sharing data with the calling block.

• Data blocks (DBs) store data that can be used by the program blocks.

Fig. 44 shows the function blocks designed and implemented for the wet well pumping station control.

5 Pumping-Station Ladder Implementation

The initialization network INITIATE is shown in Fig. 45. A positive edge trigger instruction causes this network to execute once when the AUTO/MANUAL switch is on AUTO.

Fig. 49 Pump-station 1-hour timer networks.

5.1 Pump Alarms

The Pump Alarm function includes three networks (Figs. 46 through 48). One common alarm is dedicated for the East wet well and the other for the West wet well. A common alarm is triggered from pump-motor failure to start, overload, or emergency shutdown.

• The East pump fail to start is ON if motor-running input is not received within 5 seconds from initiation of the Run command.

• An alarm is issued once the selected pump fails to start. The operator is expected to attend to this failure and clear the cause in order to allow and enforce the pump-alternation calendar. Having a situation where both pumps failing to start can constitute an emergency condition and must be eliminated. A third standby pump and the manual control system can eliminate this problem.

• West pump fail to start is ON if the motor-running input is not received within 5 seconds from the West pump motor-running output command.

• The common alarm goes ON if either the East pump fail to start or the West pump fail to start is ON. The East and the West pump overload will trigger the same common alarm. Also, an emergency shutdown (ESD) will cause the same common alarm.

• The two-pump alternation follows a defined calendar based on scheduled run time in hours. A retentive timer (RTO) second network is configured for a 1-hour preset value (PV), as shown in Fig. 49. This timer is halted during intervals when the two pumps are running or both are not running (XNOR logic), as shown in the first network in the figure. The calendar is updated only for the selected and running pump. The done bit ONE_HOUR_TMR_DN of this timer is used to trigger an up counter, which is configured to implement the desired pump-schedule calendar.

• The pump calendar is initialized by the operator in hours and indicates the time intervals for the two-pump alternations. The up counter in Fig. 50 is used to keep track of the accumulated pump run time in hours. The counter is incremented every hour of operation.

• A memory word (%MW4), as shown in Fig. 51, is used to select one of the two pumps to run and is named the increment register (INCRM). This word consists of two memory bytes, %M4 and %M5. The least significant bit of %MW4 is %M5.0, which is the least significant bit of the least significant byte of the selected word %MW4. As this word increments, the least significant bit toggles, causing the pump-selection alternation.

• The increment (INCRM) register will increment every time the user calendar expires. The even values of this register (%M5.0 is FALSE) will be used to select and start the East pump. The odd values of this register (%M5.0 is TRUE) will be used to select and start the West pump. Fig. 52 and 53 implement this logic.

• If the system is placed in AUTO and the wet-well water level exceeds the high limit, the scheduled pump will be selected and run. The pump will stop running if the emergency shutdown is activated or the selected pump fails to start. In this case, an alarm is issued, and the other pump is selected and started. If the water level exceeds the high-high limit, both pumps are selected and started regard less of the defined calendar.

Fig. 45 Initialization network.

Fig. 46 East pump failed-to-start network.

Fig. 47 West pump failed-to-start network.

Fig. 48 Common alarm network.

Fig. 50 Pump-station counter network.

Fig. 51 Pump-station ADD network.

Fig. 52 East pump network.

Fig. 53 West pump network.

6 Pumping-Station HMI Implementation HMIs are used to implement the pumping-station graphical user interface and are located in the main control room. Screens and tags are configured and linked to the PLC ladder-logic program both to provide system status and to allow all authorized control commands to be issued remotely from the control center. Most of the HMI implementation was covered in Section 5. Also, similar information was detailed earlier in this section in the irrigation-canal-control case study.

Quiz and Lab Project

Quiz:

1 What is the purpose of using piping and instrument diagram (P&ID) in industrial automation?

2 Document the PLC networks shown in Figs. 54 and 55 using a logic diagram:

Fig. 54

Fig. 55

3 Develop the ladder network(s) for the logic diagrams shown in Figs. 56 to 58.

Fig. 56

Fig. 57

Fig. 58

4 A set point is received from the operator and compared to a high limit (SP_HL) and a low limit (SP_LL). If the set point is outside the limit's range, develop a ladder network(s) to force the set point between the two limits.

5 Referring to Fig. 5 (part1), develop the vertical gate 1 control down logic diagram.

6 Referring to Fig. 6 (part2), develop the vertical gate 1 lower logic diagram.

7 Write the ladder network(s) for vertical gate 1 lower logic in Problem 6.

8 Write the ladder network(s) for vertical gate 1 down logic in Problem 5.

9 Explain why the exact ordering of the implemented functional blocks is irrelevant.

10 Referring to Fig. 10, what happens if the positive edge trigger AUTO switch is changed to normally open contact?

11 Referring to Fig. 11, reprogram the vertical gate 1 fail to start network using the Set Reset instructions.

12 Reprogram the network in Fig. 29, using the Out Range instruction.

13 What happens in Fig. 30 network if the Pulse Generation timer (TP) is changed to On Delay timer (TON)? Why one of the conditions to raise Vertical Gate 1, Tag Name (VG1_ RAISE), is idle timer Tag Name (IDEL_RUNN) is not on?

14 Referring to Fig. 22, write the network(s) for DS1_DS2_FAIL using the following logics:

a. Output Tag Name (DS1_DS2_FAIL) is on if downstream 1 (DS1) or downstream 2 (DS2) fails.

b. Reprogram part (a) using Demerger's theorem.

15 Referring to Fig. 49, perform the following:

a. Develop the logic diagram for the first network Tag Name (HLD_ALT_COUNTER). Name the type of the logic gate used.

b. Why the second network in Fig. 49 uses retentive timer (TONR)?

16 Referring to Fig. 50, why the input instruction to the counter Tag Name (ALTER_ COUNTER_DN) is not a positive edge trigger?

17 For the pump station project listed in Section.4, write a network(s) to sound an alarm if any of the three sensors (ON, OFF, and OVERIDE) switches fails.

18 Startup OBs execute one time when the operating mode of the CPU changes from STOP to RUN, including powering up in the RUN mode and in commanded STOP-to-RUN transitions. The default is the " OB 100" block. Reprogram the initialization network in Fig. 45 to use OB 100 instead of the positive edge trigger Tag Name (AUTO).

Project

Lab 1: Conveyor System Speed-Control Capstone Project

The conveyor system is a six-station cellular-module flexible manufacturing system (FMS). One belt provides closed circular motion of pallets between stations, whereas a second belt provides straight motion parallel to the long leg of the inner belt. Two transient belts allow for pallet transfer between the two conveyors. A detailed descriptions of the conveyor system I/O wiring, graphical user interface, and the operation of each station are given in the sections that follow. A schematic drawing of the conveyor system including the two belts and the six stations is provided in Fig. 59.

Fig. 59 Circular conveyor system. Circular Conveyor System

Lab Description:

The conveyor system was configured to provide the FMS platform for this project. It also will be used to simulate and test the control algorithms and implementation of the operation, which are described next. The following is a brief description of the conveyor-system workstations and their associated control implementations.

Station 1 loading cell. This station is equipped with two solenoids, A and C. With no power applied, a pallet can enter the station and lock into position. When the two solenoids receive power, they switch position and prevent additional pallets from entering the station.

Once a pallet is detected in position at Station 1, a start pulse is output to the loading robot. The robot sends a done pulse to the PLC on completion of part loading.

For this study, a 5-second timer is used to simulate the loading task. The timer timing bit is used as the Go command to the robot. The timer done bit is used as the done acknowledgment from the robot, which moves the pallet to Station 2.

Two alarms are associated with Station 1. The Station 1 loading-jam alarm is activated whenever the done pulse from robot is active and the pallet remains in position for 1 second. The Station 1 task time out alarm becomes active whenever the Go command is not acknowledged by the loading robot in 5 seconds.

Station 2 production-feed-rate regulation. This station is equipped with a pallet advance solenoid. When this solenoid receives power and energizes, it activates and advances the pallet to Station 3. The PLC receives input signals from two limit switches indicating the advance solenoid positions (forward or backward).

When the pallet is in position, the back-limit switch is on, the Station 2 output is clear, and the Station 3 pre-stop is inactive. The advance solenoid will energize and move the pallet to Station 3. Otherwise, when Station 1 output is clear, the advance solenoid is de-energized and retracted.

One alarm is associated with Station 2, a production-rate-jam alarm. This alarm is activated by a malfunction in the advance solenoid's two limit switches.

Station 3 production/assembly task. This station is equipped with a prestop solenoid that can be energized to prevent the pallet from entering the station. A stop solenoid can be energized to stop the pallet, and a locator-clamp solenoid is used to clamp the pallet in position. Station 3 has a raise solenoid that is used to get the part into the assembly cell and a lower solenoid that is used to lower the pallet onto the conveyor belt. Five digital inputs are interfaced with the PLC: (1) pallet approaching station, (2) pallet in station, (3) station output clear, (4) up reed, and (5) down reed light switches.

When the pallet is in position, the stop-pallet solenoid is activated, the clamp solenoid is energized, and the raise solenoid is powered to raise the pallet. After a 5-second timer simulating the assembly operation interface, as described in Station 1, the lower solenoid energizes. Once the pallet is completely lowered, the clamp locator is released, the stop solenoid is de-energized, the pallet moves to the next station, and the prestop solenoid is de-energized to allow the next pallet to enter the station.

Two alarms are associated with this station: cycle-up failure and cycle-lower failure. At Station 3, the cycle-up-failure alarm is activated whenever the raise solenoid is on the up position and the reed switch remains off for 1 second. The cycle-down failure alarm works the same way for the lower operation.

Station 4 testing and sorting. This station is equipped with four solenoids: raise, lower, prestop, and stop. The functions of the solenoids are similar to those explained for Station 3. The station also has six switch inputs: (1) pallet at station, (2) station up, (3) station at middle position, (4) station down, (5) pallet at output, and (6) output clear.

Station 4 can reject a pallet to a transfer-conveyor area (Continuation of Conveyor 1) or move the pallet to Conveyor 2. The reject command can be initiated from the user interface by the operator. The station has three positions: up, middle, and down. When both lower and raise solenoids are de-energized, the station is in the middle position.

When the pallet is in position, the station is in the middle position. A reject signal is initiated from the user interface when the Station 6 Request-to-push command is not activated. The raise solenoid is energized to raise the pallet and move it to the transfer conveyor (pallet rejected).

Station 4 has two alarms: cycle-up failure and cycle-down failure. The operation of these alarms is exactly the same as for Station 3.

Station 5 production-output-rate regulation. This station is equipped with two solenoids: lane stop and wipe off. It also has two inputs: (1) lane clear and (2) feed lane full.

If the operator requests a Station 4 reject or a Station 6 push, the wipe-off solenoid will energize and allow the pallet to move to Conveyor 2. Otherwise, the pallet continues on Conveyor 1. No alarms are assigned to this station.

Station 6 unloading cell. This station is equipped with four solenoids: advance pusher, prestop, pusher stop, and lane stop. The PLC receives six switch inputs from this station: (1) pusher forward, (2) pusher backward, (3) pallet present left, (4) ON/OFF enable/disable selector switch, (5) lane clear to push, and (6) output clear.

The operator can request to push from the user interface/HMI. When a pallet is present left, a request to push is made from the HMI. If a request to reject from Station 4 is inactive and the Station 6 lane is clear to push, the lane-stop solenoid will stop the pallet, and the prestop solenoid will prevent incoming pallets from entering the station. The advanced pusher solenoid will energize and unload the pallet to the transfer conveyor area. When the pusher is back, all solenoids reverse their action, the next pallet enters the station, and the push cycle is repeated.

Two alarms are associated with this station: advance pusher forward and backward failure. The alarms operation is similar to those for Station 4.

Each of the above six stations has a separate ENABLE/DISABLE switch that can be used to bypass the station. This feature allows for FMS activities. Not only we can skip certain manufacturing operations, but the entire station also can be replaced, modified, or removed. The entire system is equipped with an emergency shutdown (ESD) master control relay (MCR). As with other systems, all hardware modules and the two conveyor motors are provided power through the ESD MCR contacts, as explained in Section 6.

Conveyor-System I/O Listings

The following two tables provide detailed listing of all inputs and outputs used in the conveyor-system control.

Conveyor System Inputs

Device Name Address Description

Graphical User Interface (HMI)

Eight graphic screens should be implemented for control of the conveyor system. In addition to the Directory page, seven pages should be provided in the HMI. These are as follows: System Overview, System Status, Control and Trending, Alarm Graphics, Conveyor 1 Control, Conveyor 2 Control, and Alarms Summary. The following subsections will briefly describe each of the eight HMI pages. Specific details of the user-interface implementation will depend on the HMI used, for example, color or monochrome, and its capabilities.

• Directory page. This screen lists the seven available options and provides for the selection of individual pages. The pressing of a function key will take the user to the selected screen.

• Overview page. This page shows the two conveyor belts, station ENABLE/DISABLE switch status, station task busy/not busy status, Motor 1 and Motor 2 running/not running status, and color-coded status for assign station. The color code provides red for station enabled, green for station disabled, red for conveyor running, and green for conveyor not running. No user entry is assigned for this page.

• Control and Trend page. This page provides the status of the six stations used in the control system: ENABLE/DISABLE, alarms for stations and conveyors, acknowledge/reset of alarms, and associated color-code definition. It also provides for user input commands: Station 4 reject/not reject, Station 6 push/not push, Conveyors 1 and 2 speed, and the trending of the two conveyor speeds up or down. Three modes of control are provided on this page. In manual mode, the operator can demand changes in conveyor speed by entering either percentage speed. The automatic mode is designed to allow users to regulate the conveyor speed using PID control. The user initiates such control by entering the desired conveyor-speed set point (SP).

• Status page. This page displays status information for the system in numeric or symbolic form. Motor speeds are displayed in percentage value (%).

• Alarm page. This page provides a detailed listing and description of all system alarms. The Control and Trend page provides for an annunciation of an alarm without any details.

• Conveyor 1 control page. This page displays the status of the controller for the conveyor system, only for Conveyor 1.

• Conveyor 2 control page. This page displays the status of controller for the conveyor system, only for Conveyor 2.

• Alarm Summary page. This page displays all alarm transactions, including current and past alarms, and indicates whether or not they have been acknowledged.

Project Requirements

Use the preceding specifications to perform the following:

• Document and implement layer 1 of the conveyor-system speed control. Present the implementation with your project group to the course/technical training instructor.

Implement recommended modifications, and secure a satisfactory layer 1 review.

• Proceed with the design of layer 2. Perform the design-review presentation, implement required changes, and secure final approval for the layer 2 document.

• Perform the final implementation and checkout, as detailed in layer 3 discussions and coverage. This includes the ladder-logic and HMI implementations, along with the communication/networks configuration and the overall system debugging/checkout.

Prepare for final presentation and system operation demonstration.

• Consider valid inputs and recommendations obtained during the final presentation, and finalize your implementation. Document all tasks, and write the final project technical report and manual.

NEXT

PREV.

All related articles   Top of Page   Home



Updated: Monday, March 9, 2015 18:50 PST