# How to Teach Yourself PLC Programming

## Chapter 29 - Basics of Programmable Logic Controllers (PLCs)

Learning PLC programming is a very important skill.

If your job involves programming, then you will likely learn what you need through hand-on experience. But before that happens, it can be very important to understand how to learn on your own.

Many educational programs are available - mostly oriented around 2-year community colleges with technical trades programs in advanced manufacturing. These can be cost-effective for many people due to low tuition rates, but in many cases, the schedule is the tough part. Taking formal classes while balancing a work and family schedule is difficult, if not impossible. For many of those in that profile, learning at home is an absolute necessity.

### How to Learn PLC Programming at Home

First and foremost, you need to get your very own PLC to work with. Computer programming of any kind is not a spectator sport, and can only be learned by a significant investment of time and effort at the keyboard. In many ways, learning to program is like learning a new spoken or written language: there is new vocabulary and new grammatical rules to master, and many ways to make mistakes.

Fortunately, many low-cost PLCs exist on the market for individuals to purchase. Over the years, many models of PLC have come and gone. In past eras, two of the favorited PLCs were the “CLICK” PLC models manufactured by Koyo and marketed through Automation Direct, and also the Allen-Bradley MicroLogix series of PLC (especially the 1000 and 1100 models). However, the latter model has been discontinued and is more difficult to obtain.

To design an effective learning system, understand that the more budget you have available, the closer you will come to building a realistic control system. This should come as no surprise to any engineer.

#### Learn PLC Programming - Without a PLC!

The programming environment and I/O connections are the two main areas in which a PLC stands alone compared to all other microporocessor-based platforms. If these two obstacles could be solved, there would be no shortage of low-cost PLC trainers for homes and small classrooms around the world. It turns out, there are a few cases of some excellent PLC 'simulators' installed onto these low-cost microcontroller platforms.

OpenPLC is one such example of a tag-based ladder logic programming environment, which can be installed onto a personal computer. Programs are written just like they would appear in a PLC, but then are downloaded into a microcontroller. The compatible platforms are numerous, but they include the popular Arduino and Raspberry Pi, which can both be purchased for a very reasonable cost.

Many tutorials exist for getting a start with the Arduino platform using OpenPLC, making this an excellent starting point before investing in a more 'official' training setup with industri-standard PLC hardware and software. Two such tutorials include Control.com's own 'Getting Started with Ladder Logic using OpenPLC for the Arduino' and 'Building a Start/Stop Ladder Logic Program with an Arduino'.

#### High-Cost PLCs

The version of PLC for small applications considered an upgrade to the MicroLogix was the CompactLogix with built-in I/O points. The Rockwell L16 processors have 16 digital inputs and outputs, and the L24 contains an additional set of built-in analog I/O points. These PLCs are excellent for learning modern PLC programming, but both the hardware and software licenses can be quite expensive. Even used models can cost well over $2,000, and the licenses can cost up to$1,000 per year. If a company intends to establish an in-house test and training room, this model may be an excellent consideration, but it’s probably outside the budget for most users.

#### Medium-Cost PLCs

Mid-level PLCs that are appropriate for learning can come from a variety of sources. Rockwell’s replacement to the MicroLogix is the Micro800 series of PLC, which is programmed using the Connected Components Workbench (CCW). A major benefit of this series over the older MicroLogix 1000 is the Micro800’s ability to network with external equipment, as long as a model with Ethernet is selected. The software is free from Rockwell, and the hardware is lower cost than more advanced PLC lineups. It may still cost several hundreds of dollars. Siemens also offers a cost effective S7-1200 PLC in a range of starter kits which include not only the PLC, but an HMI and a software license. These can be obtained for fairly reasonable costs, but are still likely to cost several hundred dollars. The benefit of these two options comes from learning programming on an industry-standard platform, which may lead to more lucrative job opportunities.

Automation Direct Productivity series of modular PLCs falls into this price range, also with free software. Although not as common in mainstream industry, they are flexible, adaptable, and reliable–and the programming is quite easy to learn. An example of a home-built trainer using a Productivity 1000 PLC is shown in the image below, along wit ha varieyt of sensors, wire connection points, and troubleshooting tools on an aluminum A-frame design.

#### Low-Cost PLCs

• ##### Remember to document everything. If it works, explain what you did. If it doesn’t work, list the symptoms as a note to watch out for next time.
Published under the terms and conditions of the Creative Commons Attribution 4.0 International Public License