Scan time can be important to applications where timing is critical. The time it takes the CPU to execute one pass and loop back to the beginning is known as scan time. This process will continue as long as the CPU is powered and in the RUN mode.
#Develop a documented ladder logic program to implement the motor control update#
Once the CPU reaches the last rung it will update the real world outputs, then loop back and run it all again. CR3’s normally-closed state is used in rung 4, so the CPU will then turn OFF L1.Įven though we still refer to coils and contacts in ladder logic, remember that they are memory representations, not actual devices. Since CR1 has changed states, in rung 3 the CPU will activate CR3. So if PB1 is pressed, the CPU will turn ON CR1. Then, starting at the top left of the program, the CPU works its way down the rail executing each rung or sub rung from left to right. Typically before starting to execute the logic, the CPU reads the physical inputs tied to the I/O modules to update their status in the CPU’s memory table. Math, Shift Registers, Drum Sequencers, etc., are available to aid in programming. One side note, today’s PLC CPUs offer many types of functions, not just simple contacts and coils. All of the other locations are assigned to internal bits that we can use as needed. On the other hand, each Y bit will have an output device wired to it as seen with the light controlled by Y001. This normally open contact’s state is read from the input on the I/O module where the physical pushbutton is connected. To monitor and control real world devices, they will need to be wired to I/O modules.įor this particular PLC, these inputs and outputs are assigned to X and Y memory addresses like the X001 seen with PB1. Some of these memory locations are used internally and others are used with external inputs and outputs. Let’s take a look.įor this program, the relay logic’s ladder diagram is duplicated with ladder logic no more hard-wired logic, but memory locations instead. Ladder logic was designed to have the same look and feel as electrical ladder diagrams, but with ladder logic, the physical contacts and coils are replaced with memory bits. The example below shows a ladder diagram with pushbuttons (PB), control relays (CR), a motor (M) and a light (L). The positive power rail (on the left) flows to the negative power rail (on the right) through the physical devices connected on the rung. These diagrams documented how connections between devices were made on relay panels they are called “ladder” diagrams because they are constructed in a way that resembles a ladder with two vertical rails and rungs between them. The structure behind ladder logic is based on the electrical ladder diagrams that were used with relay logic. The Structure of Ladder Logic/How to Read Ladder Logic
But the cost associated with it in terms of time-consuming logic changes, mechanical failures over time and extensive wiring and space requirements has forced many industries to reconsider their control needs. Relay logic is a dependable controls method still in limited use today. Using this combination of switches, relays, coils and contacts is referred to as Relay Logic. The pump fills the mold with melted plastic and the cube begins to take shape. This switch energizes a relay coil, which in turn closes the normally open contact for the injection pump. For instance, when the cube’s mold is in position a switch will close. The simple opening and closing of relay contacts on the panel gives the system the ON/OFF control it needs in the manufacturing process. These relay panels consist of numerous electromechanical relays that are wired together to perform a certain function in the plant. The relay panels you work on need to be rewired to accommodate the change in production size, from the original 3x3x3 size to the new 4x4x4 model.
You have a busy day ahead since the plant is being redesigned for the new Rubik’s Revenge model due out next year. You’re cruising in your brand new Ford Pinto on the way to your job at the local Rubik’s Cube plant. The Origins of Ladder Logic – Relay Logic Different types of programming languages have also been developed for PLCs but the most frequently used is still Ladder Logic.
Over time they have advanced to become more user friendly, efficient, smaller and less expensive. PLCs have exploded in the controls market and are used throughout the world.