PLC Programming Language Tutorial

by Vicki Elander

A PLC is a programmable logic controller that uses a visual programming language. Because of this visual aspect to the programming, it can be fairly easy for a non-programmer to learn. The programming language is also referred to as "ladder logic," since the pictorial program looks very similar to a ladder, with the power rails on the left and right, and the functionality of the program on the rungs. The end result provides a very powerful industrial control method.

Talk to everyone involved with the project so you understand what the expectations are. As an example, let's use a simple project that will turn on a motor when a product is sensed on the belt. This defines the expectations for the project.

Find out what the input and output devices for your project are going to be. For the example project, the input is the proximity sensor that detects product and the output is the motor.

Write the program in the order in which you'd like the events to occur. PLC programs run quickly, but one rung at a time from left to right and top to bottom. NC or NO contacts represent digital input devices and coils represent the digital outputs. NC contacts look like this: --|/|--; NO contacts like this: --| |--. Coils look like this: --( )--. The inputs, or contacts, will be on the left side of a rung, with the outputs, or coils, on the right. In the example, the rung will look like this: --| |----( )--. The proximity sensor will send a signal when product is detected. The motor is symbolized by the coil: --( )-- and will activate when the NO contact for the proximity sensor has power flowing through it. So, when there is product being detected, power will flow through the NO contact to the coil that turns the motor on.

Assign an address to each physical input and output. This will vary based on the PLC manufacturer, as they all do it differently. Reference the manual for your PLC to ensure that you assign them properly for the PLC you are using. The physical address is the location at which the wiring for each device is connected so the program knows where to find the information.

Load your program into your PLC using the appropriate communications cable and test it for any errors. It can be helpful to set up a panel with lights and switches for testing when the actual machine isn't available yet, provided your project isn't too extensive. Correct the errors as they are found until you have a fully functional project that meets the expectations determined in Step 1.


  • check Get an electrician to do the wiring of the devices.
  • check There are advanced commands available for most PLC manufacturers. Some will even do higher-math functions. Refer to the manual for your PLC to see what commands are available.
  • check Each rung of a PLC program needs to have an output. It doesn't necessarily need an input.

Items you will need

About the Author

Vicki Elander has been writing software documentation and technical manuals since 1993. In 2008, she wrote product reviews for Elander has a bachelor's degree in electrical engineering from the University of North Dakota.

More Articles

Photo Credits

  • photo_camera a ladder image by timur1970 from