Friday, 24 June 2016

Tuesday, 21 June 2016


Home Made wind Turbine Generator





Wednesday, 8 June 2016

PLC Basics

What is a Programmable Logic Controller (PLC)?

A Programmable Logic Controller, or PLC, is more or less a small computer with a built-in operating system (OS). This OS is highly specialised and optimised to handle incoming events in real time, i.e., at the time of their occurrence.

A programmable logic controller, PLC, or programmable controller is a digital computer used for automation of typically industrial electromechanical processes, such as control of machinery on factory assembly lines, amusement rides, or light fixtures. PLCs are used in many machines, in many industries. PLCs are designed for multiple arrangements of digital and analog inputs and outputs, extended temperature ranges, immunity to electrical noise, and resistance to vibration and impact. Programs to control machine operation are typically stored in battery-backed-up or non-volatile memory. A PLC is an example of a "hard" real-time system since output results must be produced in response to input conditions within a limited time, otherwise unintended operation will result.




How the PLC operates?


The PLC is a purpose-built machine control computer designed to read digital and analog inputs from various sensors, execute a user defined logic program, and write the resulting digital and analog output values to various output elements like hydraulic and pneumatic actuators, indication lamps, solenoid coils, etc.

Scan cycle

Exact details vary between manufacturers, but most PLCs follow a 'scan-cycle' format. PLC scans programme up to bottom & right to left.
Overhead - Overhead includes testing I/O module integrity, verifying the user program logic hasn't changed, that the computer itself hasn't locked up (via a watchdog timer), and any necessary communications. Communications may include traffic over the PLC programmer port, remote I/O racks, and other external devices such as HMIs (Human Machine Interfaces).
Input scan 
A 'snapshot' of the digital and analog values present at the input cards is saved to an input memory table.
Logic execution 
The user program is scanned element by element, then rung by rung until the end of the program, and resulting values written to an output memory table.
Diagnosis and communication 
It is used in many different disciplines with variations in the use of logic's, analytics, and experience to determine "cause and effect". In systems engineering and computer science, it is typically used to determine the causes of symptoms, mitigation's, and solutions. it is communicate to input module and send message to output module for any incorrect data files variations.
Output scan 
Values from the resulting output memory table are written to the output modules.
Once the output scan is complete the process repeats itself until the PLC is powered down.
The time it takes to complete a scan cycle is, appropriately enough, the "scan cycle time", and ranges from hundreds of milliseconds (on older PLCs, and/or PLCs with very complex programs) to only a few milliseconds on newer PLCs, and/or PLCs executing short, simple code.

Basics Instructions

Be aware that specific nomenclature and operational details vary widely between PLC manufacturers, and often implementation details evolve from generation to generation.
Often the hardest part, especially for an inexperienced PLC programmer, is practicing the mental ju-jitsu necessary to keep the nomenclature straight from manufacturer to manufacturer.
Positive Logic (Most PLCs follow this convention)
True = logic 1 = input energized.
False = logic 0 = input NOT energized.
Negative Logic
True = logic 0 = Input NOT energized
False = logic 1 = Input energized.
Normally Open
(XIC) - Examine If Closed.
This instruction is true (logic 1) when the hardware input (or internal relay equivalent) is energized.
Normally Closed
(XIO) - Examine If Open.
This instruction is true (logic 1) when the hardware input (or internal relay equivalent) is NOT energized.
Output Enable
(OTE) - Output Enable.
This instruction mimics the action of a conventional relay coil.
On Timer
(TON) - Timer ON.
Generally, ON timers begin timing when the input (enable) line goes true, and reset if the enable line goes false before set point has been reached. If enabled until set point is reached then the timer output goes true, and stays true until the input (enable) line goes false.
Off Timer
(TOF) - Timer OFF.
Generally, OFF timers begin timing on a true-to-false transition, and continue timing as long as the preceding logic remains false. When the accumulated time equals set point the TOF output goes on, and stays on until the rung goes true.
Retentive Timer
(RTO) - Retentive Timer On.
This type of timer does NOT reset the accumulated time when the input condition goes false.
Rather, it keeps the last accumulated time in memory, and (if/when the input goes true again) continues timing from that point. In the Allen-Bradley construction, this instruction goes true once set point (preset) time has been reached, and stays true until a RES (Reset) instruction is made true to clear it.
Latching Relays
(OTL) - Output Latch.
(OTU) - Output Unlatch.
Generally, the unlatch operator takes precedence. That is, if the unlatch instruction is true then the relay output is false even though the latch instruction may also be true. In Allen-Bradley ladder logic, latch and unlatch relays are separate operators.
However, other ladder dialects opt for a single operator modeled after RS (Reset-Set) flip-flop IC chip logic.
Jump to Subroutine
(JSR) - Jump to Subroutine
For jumping from one rung to another the JSR (Jump to Subroutine) command is used.