# PLC/Design and implementation

PLCs can come in a variety of configurations. There are two 'main' types of PLC's. Fixed I/O PLC's and modular I/O PLC's. Fixed I/O PLC's have a fair amount of use cases in educational and small workcell applications. Modular I/O PLC's will have a lot more options to connect field devices like sensors, buttons, lights, and other Inputs and Outputs that would be required for a field device.

## Outline of an Approach

Manufacturing process, systems, equipment
Acquire pre-existing specifications for system components and behavior
* Site Layout Plan
* Wiring Diagrams
* Component specifications and constraints
* System and component behavior and constraints
* Process and instrumentation diagrams
Design the system and draft P&IDs (Process and Instrumentation Diagrams)
* Define s cope: which parts of control system will be handled by the PLC and which by logic external to the PLC (e.g. hardwired, relay-controlled, or directly controlled by specialised instrument/controllers.)
Assign I/O and memory ports
* Document for system manuals
Program PLC (languages specified in IEC 61131-3 and corresponding national standards)
* Ladder Logic (LD) - readily understandable by electricians who are familiar with the use of relays
* Others: Function Block Diagram (FBD), Structured Text (ST), Instruction List (IL), Sequential Function Chart (SFC)
* Older PLCs pre-existing on site may use proprietary programming languages.
Create user and maintenance manual (sometimes known as Operation & Maintenance (O&M) manual)
Test PLC code
Install system in field
Field test entire system

## External References

* http://en.wikibooks.org/wiki/Introductory_PLC_Programming
* http://en.wikibooks.org/wiki/Relay_ladder_logic

## Design Challenges

A manufacturer who dyes a lot of cloth has a requirement to process waste water to oxidize the organics in the waste water before dumping the waste water into a nearby large river. It already has a waste water processing pond but the bugs keep dying off over the weekend when no feedstock is arriving as waste from the factory. Environmental engineers have decided to build a 300,000 gallon holding tank to smooth out the flow to improve the pond's performance. Average outflow during the middle of the week is 300 gallons/minute with occasional peaks (to avoid emergency overflow of holding tank) of 1200 gallons/minute.
A control valve will be used to smoothly control the outflow into the pond. In normal operations, stock should be built up on Thursday and Friday to start the weekend with a full tank without any emergency overflow.
Water flows through a rotary strainer into a 20,000 gallon wet well. From the wet well two of three 600 gallon/minute pumps on a rotating basis pump water to the holding tank. The pumps' specifications require a 5 minute cooling period after operating (or any attempt failed attempt to start pumping.) Failure to meet these specifications voids warranty and could permanently damage or destroy the pump.
Fluid flows as vats are dumped during mid and end shifts at up to 3,000 gallons/minute, for up to fifteen minutes at a time in a linear ramp pattern from 3000 down to 0 gallons/minute.
Level monitoring is required in the tank with alarm-alerting to bring abnormal operating conditions to the maintenance personnel's attention.
Design an instrumentation and control system using a PLC and any appropriate instrumentation to control the equipment listed throughout the week. Address holidays and 3 day weekends.

## Solution Discussion 1

it's very simple.