PLC Programming Examples on Industrial Automation

PLC Programming Examples on Industrial Automation

PLCs can range in size from small modular devices with a few tens of inputs and outputs (I/O) in a housing built into the processor to huge rack-mounted modular devices with thousands of I/O that are frequently networked with other PLC and SCADA systems. They can be configured for a variety of digital and analogue I/O configurations, as well as expanded temperature ranges, electrical noise immunity, and vibration and impact resistance.

Programs for controlling machine function are often stored in non-volatile or battery-backed memory. PLCs were first created in the automotive sector to replace hard-wired relay logic systems with flexible, durable, and easily programmable controllers. They’ve been frequently used as high-reliability automation controllers in severe situations since then. Because output results must be delivered in response to input conditions within a certain amount of time, a PLC is an example of a hard real-time system. Otherwise, unexpected operation will occur. PLCs were created to replace relay logic systems in the automotive industry in the United States in the late 1960s.

Previously, factory control logic consisted mostly of relays, cam timers, drum sequencers, and dedicated closed-loop controllers. Design engineers found it impossible to change the automation process since it was hard-wired. Changes would necessitate rewiring and meticulous documentation updates. The entire system would become dysfunctional if merely one wire was out of place or one relay failed. Often, technicians would spend hours analyzing schematics and comparing them to existing wiring to troubleshoot problems. When general-purpose computers were accessible, they were quickly used to industrial control logic. These early computers were unreliable, necessitating the use of specialized programmers as well as strict monitoring of working parameters including temperature, cleanliness, and power quality. Compared to older automation systems, the PLC offered significant advantages.

It was more dependable, smaller, and required less maintenance than relay systems, and it tolerated the industrial environment better than computers. It could be simply expanded with more I/O modules, whereas relay systems necessitated complex hardware changes in the event of reconfiguration. This made it easier to iterate on the design of the production process. It was more user-friendly than computers that utilized general-purpose programming languages because it employed a simple programming language centred on logic and switching operations. It also allowed for the monitoring of its operation.

Early PLCs used ladder logic, which looked a lot like a schematic picture of relay logic. This programme notation was designed to lessen the amount of training required of current technicians. Other PLCs employed a stack-based logic solver to implement instruction list programming.

Develop Industrial Automation PLC Programming Examples based on the rationale outlined below.

  1. A Saw, Fan and oil pump all go ON when a start button is pressed.
  2. If the saw has operated less than 20s, the oil pump should go off when the saw is turned off and the fan is to run for an additional 5s after the shutdown of the saw.
  3. If the saw has operated for more than 20s, the fan should remain on until reset by a separate fan reset button and the oil pump should remain on for an additional 10 s after the saw is turned off.
  4. Write a program that will implement this process.

    PLC Programming Examples

Program Description:

Rung 0000: With memory B3:0/0, the Start/Emergency Stop PB is latched

Rung 0001:

B3:0/0 enables the Saw (O: 0/0), Fan (O: 0/1 ), and Oil Pump (O: 0/2) to be turned on.

To turn off, the normally closed contact of the Stop switch is connected in series with the Saw output.

When the condition is met, the Fan reset switch and Timer T4:0 are connected to turn off the fan.

The timer T4:2 has completed a bit of work, and the memory bit is to turn off the oil pump.

Rung 0002:

When the stop button is hit, the fan output (O: 0/2) should switch off after 5 seconds, according to the reasoning described in point 2.

After the 20s of Saw operation, the comparator block prevents the timer T4:0 from running.

Rung 0003: When the start button is pressed, the timer T4:1 starts. Saw output will be turned off if the stop button is touched after the 20s.The oil pump will turn off after ten seconds. Timer T4:2 performs this procedure. When T4:0 is ON, the done bit of the Timer T4:0 is utilized to limit the operation of the Timer T4:1.

Rung 0004:  To accomplish the logic indicated in point 2, to turn off Fan when saw output operation was less than 20s, less than a comparator block is employed.

Program Output:

Now we see the simulation of above ladder logic for different conditions as mentioned below.

When Start PB is pressed

When Stop switch pressed before the 20s

When Stop switch pressed after the 20s

When Fan reset switch is pressed

Conclusion:

This example can help us grasp Allen Bradley PLC programming logic.

Leave a Reply

Your email address will not be published.