Plc program logic




















Contact us to learn more about what we provide and how we can deliver robust solutions to power your next project. Programmable Logic Controllers PLCs form their backbone, allowing internal components to function together as a seamless unit. Versatile and modifiable, these digital computers are essential to many of the systems and devices we rely on today.

It controls devices and equipment by connecting different units and enabling them to work in a coordinated manner. At the core of every PLC is a basic computer processor that gathers various inputs and evaluates them to achieve the desired output. The inputs can be digital or analog. As users can program the system in multiple ways to fit a certain scenario, PLCs within many applications across various industries, including conveyor systems, oil refineries , manufacturing lines and more. While these might be more sophisticated scenarios, consider the interaction between a simple light switch and a light bulb.

By flipping the switch, a user can only turn the light on or off. There is little versatility or flexibility in this application. Now, say a PLC joins the mix. Suddenly, the user can create more complex controls. For instance, he can make the light blink on or off or make the light turn off one minute after it turns on. Now think of thousands or even tens of thousands of circuits all being controlled in coordination with each other.

While that is a simple explanation, that is essentially what a PLC does. Yet, how does this occur? As the PLC scans inputs from multiple sources, it scans them and internalizes them. Then, it executes the user programming to enact the desired outputs. Next, it communicates any necessary information to a control network such as Modbus or Ethernet IP. A PAC uses multiple CPUs in a single system or chassis to provide parallel processing, or specialized processing of different facets of the application.

Therein lies the importance of user programming, as the program is what causes the PLC to produce the desired results. Without it, the PLC is just an expensive doorstop. In this way, a PLC is often described as a small, specialized computer. Yet, a PLC is made to function in an industrial environment, controlling concrete inputs and outputs from devices, machines and workers, while a personal computer is built to exist in your home or office.

PLCs come in many sizes and feature different levels of capabilities. Also known as integrated PLCs, or smart programmable relays, these systems feature a complete system all packed into one small case. Due to this design, the manufacturer, rather than the user, will decide the number and types of inputs and outputs.

These PLCs comprise multiple pieces all plugged into a single rack. Modular PLCs can come in many sizes, with varying levels of power and capability.

Though these PLCs are all far from one-size-fits-all, regardless of category, each will include some form of these four components:. Most power supplies contain a battery back-up that prevents data loss during a power outage. The CPU is where you will find the microprocessor, responsible for coding, decoding and computing data. ROM can be read by not written to. It is used to store programs and parameters that should not be altered.

It is where the PLC operating program is stored. RAM can be written and read. Information in RAM can be altered. RAM is where the user program is stored. Information in RAM can be lost during a power outage. A battery back is used to save the RAM information should a power outage occur. Think of your Roku device or something similar. You can unplug it, store it away, come back months later, plug it back in and hook it up.

Circuit diagrams had to be designed, electrical components specified and installed, and wiring lists created. Electricians would then wire the necessary components to perform a specific task. If an error was made, the wires had to be reconnected correctly. A change in function or system expansion required extensive component changes and rewiring. SIMATIC software with STEP 7 and numerous engineering tools supports all phases of product deployment, from hardware configuration of the system and parameterization of modules to service of the installed system.

PLC programming can be done also with the help of Simatic Manager, which provides the possibility to write programs in three programming languages:. Ladder logic incorporates programming functions that are graphically displayed to resemble the symbols used in hard-wired control diagrams. Statement List STL — list of instructions. This editor allows you to create a program by entering the mnemonic commands. This editor displays the program in the form of conventional logic circuits.

There are no contacts, but there are equivalent functional units. This example will show the practical aspect of programming in Step 7 with a real, existing part of a system. A motor starter coil M is wired in series with a normally open, momentary Start push-button, a normally closed, momentary Stop push-button, and normally closed overload relay OL contacts.

The motor control application can also be accomplished with a PLC. In the following example, a normally open Start push-button is wired to the first input I0.

Said in another way: when the state of the input is off, the logic state is on. And when the state of the input is on, the logic state is off. Here is a video that explains the negative logic, which by the way is the same as the examine if open instruction I mentioned before:. The outputs have to be represented too. They have to be represented in a way so that we can illustrate two states. Because as with the inputs, the digital outputs of a PLC can only have two states. On or off. Since we are already using electrical circuits to illustrate the inputs, why not keep on that track.

To represent the outputs we will be using relays. There is two reasons to use relays to represent PLC outputs:. Now the output Q0. Or to be more precise the state of the output is now represented with a relay. When the relay in our PLC logic is on the state of the output will also be on. Another great feature of relays is functional contacts. For each relay, you can have several normally open or normally closed contacts representing the state of the relay.

The functional contacts will change state with the relay. One of the most common uses of functional contacts on relays is latching. Latching is the act of keeping the relay energized or on by using a functional normally open contact on the same relay.

Take a look at this illustration. This time the PLC input I0. Latching a relay or a PLC output with a normally open contact. When the state of the input I0. The relay will be energized and the PLC output Q0.

What happens next is latching. Now that the state of the output has changed to 1, the state of the normally open contact representing the output will change to on. This means that even though the state of the PLC input should change to 0, the relay will still be energized. The relay or the output Q0. Be aware that this is just an example.

In this example, it would be impossible to de-energize the relay and turn the output off. To do so, you would have to insert another contact between the output contact and the output relay to break the connection.

For example, you could use another input represented by a normally closed contact:. Latching a PLC output and breaking the latch with a normally closed contact. I would recommend reading a good PLC programming book to explore this in further detail. It looks pretty much like an electrical circuit diagram, and it certainly almost is. You only have to think about the input side as the positive side of a power source and the output side as the negative or ground side.

There is a special reason for doing this. Actually, there are two reasons, but let me start with the obvious reason:. The ladder logic diagram looks just like an electrical circuit diagram. Source: Wikipedia. It looks a lot like an electrical circuit, and the functionality of ladder logic is just as described in this article. Ladder logic is the most visual representation of PLC logic.

For most beginners ladder logic is the way to do PLC programming. Other PLC programming languages are available, but I think ladder logic and ladder diagrams are the most well known.



0コメント

  • 1000 / 1000