Intro: PLC Programming
Programming a PLC is an incredibly important aspect of any position in industrial automation. By knowing how to accurately and quickly set up and program a PLC one can effectively streamline any industrial process. PLCs require multiple different skills from wiring to networking all the way down to a fundamental understanding of ladder logic systems. This guide will explain how to program a basic Micrologix series Allen Bradley PLC using the micrologix 500 architecture.
Additional notes: This guide is done under the assumption that the reader not only has the tools and components necessary to install a PLC controlled system but has a background understanding of safety standards and current flow in electronics. PLC controlled systems are used almost exclusively in highly controlled industrial manufacturing. Hobbyist level users looking for a guide to small to medium grade control systems should consider a micro-controller based system such as an Arduino or Raspery Pi. PLCs are much more expensive and designed to handle large industrial processes where thousands of volts and amps of current must be managed over an entire facility and potentially hundreds of inputs and outputs. Do not attempt to utilize a PLC based system without the proper training as they are much more dangerous than a run of the mill micro-controller based system. Micro-controllers are a much simpler and much safer solution to enthusiast level automation and control needs.
Step 1: Finding a Wiring Diagram
The first step of programming any PLC is to wire it correctly. After identifying the Micrologix PLC being used, it is essential to find a wiring diagram and understand the polarity and position of each input and output. Each individual Micrologix model may contain different inputs and outputs. Wiring any of these incorrectly can cause a catastrophic failure and may damage the PLC. Upon identifying inputs and outputs attach the PLC to an industry standard DIN rail system. Given above is a diagram for a basic and generic Allen Bradley Micrologix 11XX series system.
Step 2: Wiring
Next, begin laying out the industry standard terminal blocks around the PLC on the DIN rail. Build the terminal blocks in a way that meets safety standards as well as provides access to all terminals. Use only as many terminal blocks as is necessary for each input or output being utilized by the PLC. Next, begin wiring a circuit breaker using local safety standards. Always ensure the breaker is open to avoid prematurely energizing the system. After wiring the breaker attach the outputs of the breaker to their respective terminal block clusters and any DC power supplies that may be necessary for the job. Take extra care to label grounds and “hot” wires to prevent short circuits and arcs. After wiring the first set of terminal blocks, with the PLC still disconnected, close the breaker and check for shorts that could damage the PLC. Lastly, wire the PLC using its respective diagram and make sure all AC and or DC inputs and outputs are energized properly. Most PLCs label their primary inputs and grounds as L1, L2, and L3. When hooking up a PLC with inputs labeled “L”, it is safe to assume the PLC is using an AC power source and “L”s 1-3 can be hooked to any phase in any order on an AC line assuming no one line is a ground or used on more than one “L” as this will cause a short. After wiring a PLC energize it to ensure it powers on correctly. If the PLC behaves strangely or doesn’t boot at all, immediately check the wiring to ensure accuracy.
Step 3: Install Programs
Once the wiring has been double checked and the PLC is booting correctly begin installing the correct software on the device being used to program the PLC. For Micrologix Allen Bradley systems use RsLogix500 and RsLinx to program and network the PLC. Ask a local administrator, IT specialist, or manager for the install files and all necessary serial numbers and product keys. Install the files using the prompts shown on screen. Upon completing setup of all necessary programs make sure to restart the device to ensure a completed install.
Step 4: Networking
After installing all necessary programs for the PLC begin
networking with the PLC. First assign the PLC an IP under the networking tab on the Micrologix device itself. An example IP is “126.96.36.199”. Configure the PLCs address and connect it to the programming device using ethernet. Open the networking and sharing center tab on the device being used to program. Click on “change adapter settings.” Next, right click on “ethernet” and select properties. Left click on “IPV4” and select properties. Check the box that says “use the following IP address.” Use the same IP address as registered on the PLC, however, change the final number. An example IP is “188.8.131.52”. After inputting the IP into the programming device “OK” and close all windows. Open RsLinx next, click the communication drop down tab and open “RsWho.” Once RsLinx has detected the networked PLC click on the ethernet connection. Lastly double click on the PLC labeled by its IP to ensure a connection.
Step 5: Programming
Open RsLogix 500 and click on the “comms” tab. Scroll down and click on “system communications.” Next, double click on the networked PLC. The first thing that should always be done upon first activating a PLC is to upload the program already on the PLC to the programming device. This ensures no valuable programs are lost from the PLC and are forced to be rewritten. To do this click on the dropdown menu next to the word “comms” once again and select “upload.” The PLC will begin automatically uploading and display the currently installed program. After uploading the installed program be sure to save and back it up just in case it is of any importance. Finally, program the PLC using a background understanding of ladder logic, schematic diagrams of the project to be programmed, and the debug feature that enables the program to be tested preemptively for errors. Once all errors have been rectified download the program to the PLC identically to how the program was uploaded from it.
Step 6: Wiring Outputs
Upon completion of the programming portion, shut down the PLC breaker and begin wiring the outputs of the PLC. It is crucial to double check the programming of the PLC before wiring outputs. An incorrect program goes from being an error to a potentially hazardous situation once the PLC has control of external real world outputs that can prove very dangerous. The outputs should be wired using the very same DIN rail and terminal block set up as the inputs used. Always ensure all wiring is to code and safe before proceeding. Before powering the system for the final run ensure all wiring is exactly to code and no shorts or errors are present that could cause unexpected consequences. Finally power on the PLC and activate the process.
Step 7: Conclusion
This guide has provided step by step instructions on programming, wiring, and networking PLCs of the Micrologix series of processors. Equipped with this, one has a rudimentary understanding of what is necessary to perform the tasks associated with industrial automation using electronic controllers. Any and all component based questions should be directed at the individual components data sheet. It would be impossible to write a short guide that encompasses all of the thousands of potential components used in the field to wire, program, and provide input and output to a PLC.