Tag Archives: Learn PLC Programming

How you can learn PLC Programming without spending a dime!

I have been writing PLC programs for over 20 years. I often get asked what is the best way to lean PLC programming. Programming in the way I was taught in college was with the Motorola 6809. (Yes, I know that I am dating myself) This was microprocessor programming, but it was the best way to sometimes explain the methods behind PLC programming. Manufacturers of PLCs had allot of proprietary software that were not even related in their appearance and methods of programming. Today we have a few standards that have changed the look and feel of the programming software packages so each manufacturer is similar. The following is the best recommendation that I have for beginners to start to learn PLC programming today.

start stop 003

The first place to start in order to learn PLC programming is the free publication by Kevin Collins. This PDF will teach you PLC programming without just telling you what a PLC is and how it functions. He also includes some test questions along the way in order for you to retain and understand the important points that he is making.

PLC Programming for Industrial Automation
by Kevin Collins
(Note: This book is now for sale on Amazon.)
https://www.amazon.com/Programming-Industrial-Automation-Kevin-Collins/dp/1846855985
Topics covered include:

  • PLC Basics
  • Ladder Programming
  • Conditional Logic
  • Ladder Diagrams
  • Normally closed contacts
  • Outputs and latches
  • Internal relays
  • Timers
  • The Pulse Generator
  • Counters
  • Sequential Programming Introduction
  • Evolution of the Sequential Function Chart
  • Programming using the Sequential Function Chart
  • Entering the SFC program into the PLC
  • Modifying an SFC Program
  • Selective Branching
  • Parallel Branching

GreyToBinaryCode

Simulator

After learning the basics from the above manual, practice. Create programs yourself and test what you have learned. You can accomplish this by using simulators. Allot of the programming software will have simulators. The simulator will mimic the PLC hardware so you can test your programs before installing in the field. Traditionally I have not been a fan of simulators, but recently Automation Direct has introduced a simulator with their Do-More PLC. It is the Do-More Designer Software. This software simulator includes the entire instruction set (Not Just Bit Logic) as well as communication protocols. It can be downloaded and installed for free from the above link.

Indirect Addressing 2 Pointer

The next step I recommend is then to advance into some of the advanced instructions. An understanding of the numbering systems in the PLC will be a benefit. Math, PID, register manipulation and conversion instructions are just a few of the advanced programming you can learn. All of these and more instruction information can be obtained from reviewing the documentation from the PLC manual that you are programming. Once again all of these instructions are included in the Do-More Designer Software.

Indirect Addressing Animation

Program structure is the next topic. Allot of programmers would stop here and can do well with developing software, however there is much more that you can lean.  Sequencers give programmers the methods to change logic on the fly and allow troubleshooting the system easier. This method of programming can benefit you greatly and reduce the development time of your logic.

Omron HostLink Frame_Responseadu_pdu

The last step that I recommend learning is the sharing of information. I am meaning the information that you program through an HMI and/or SCADA package. This refers to understanding of the ways in which information can be gathered from the PLC and displayed in different ways. Here are a couple of previous articles that have been written on this subject:

How to Implement the Omron PLC Host Link Protocol 

Robust PLC Data Logger

iis107 display

As you can see, there is allot of information available to you to begin and lean PLC programming without spending a dime!  Remember that PLCs are similar to computers, (Moore’s Law) they increase in size and ability. Systems are expanding and changing everyday. Happy programming.

Do you know of additional tips or methods to share?

Watch on YouTube : How you can learn PLC Programming without spending a dime!

If you have any questions or need further information please contact me.
Thank you,
Garry



If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLC’s are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII and Floating Point.

To get this free article, subscribe to my free email newsletter.


Use the information to inform other people how numbering systems work. Sign up now.

The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.

The Secret of Using Timers

Timers are used in the majority of PLC programs. There are also a wide variety of off the shelf industrial timers that you can use. The implementation of timers can be vast, however it all starts with a TIMING CHART.

A timing chart is the secret behind understanding of the timer that you need in your application. Making a timing chart before writing the program will ensure that all of the information will be accounted.

The timing chart is mapped out on a x and y plain. The ‘y’ plain has the state of the input on/off (1 or 0). The ‘x’ plain will show time.

Lets take a look at a timing chart for an On-Delay Timer. This is the basic operation for an Omron H3BR industrial timer.

Timing Chart On-Delay Basic

Power –  When dealing with PLC’s we must consider when power to the unit is removed what happens to the current time and output conditions.
Start – In this case the start signal is momentary to start the time cycle. (t) We could modify this signal to be maintained until the output switches.
Output – The output will show when it turns on. This can also indicate the opposite, and show when it turns off.
Time – Time is shown by the relationship between the start signal and the output. Our example shows timing starts on the leading edge of the Start. This could have also been on the trailing edge.

Here is the same on-delay timing chart with some more detail. Several conditions are added to the chart.

Timing Chart On-Delay Details

These conditions prompt us to ask the following questions.
What happens when:

  • Power is removed / restored
  • Multiple start signals are received
  • Do we need a Reset signal. If so what happens during its operation
  • Do we need a display of the time. Present Value (PV) / Set Value (SV)

As you can see the timing chart is vital in determining how the sequence will be performed. This is the exact same method that I use when determining timing sequences in a PLC program.

Lets look at an example.

Motor_Sequence

When we hit the start button, the warning light then comes on. After a fixed time the warning light goes off and the motor starts. The motor will run until the stop button is hit.

We will start by using the Start / Stop Circuit we did earlier.

Timer Program

You will notice that we have added an internal memory bit (C0) as our Start Sequence. This is a memory retentive bit, so we can use the (ST0) $FirstScan to make this circuit non-memory retentive. If power goes off, or the PLC is put into program mode the circuit does not remember the last state. It will default to be off.
The sequence is as follows:

  • Start pressed
  • TMR starts to time (10seconds)
  • Warning output comes on
  • After TMR (10seconds)
    • Warning output goes off
    • Motor output comes on
  • Stop pressed
    • TMR is reset to 0
    • Warning light off
    • Motor is off

Every PLC has timers. They all have different types depending on what you are trying to achieve. It will all start with your Timing Chart.

Watch on YouTube : Learn PLC Programming – Free 8 – The Secret of Timers

If you have any questions or need further information please contact me.
Thank you,
Garry



If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLC’s are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII and Floating Point.

To get this free article, subscribe to my free email newsletter.


Use the information to inform other people how numbering systems work. Sign up now.

The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.

How to make a Start / Stop / Jog circuit in a PLC

Looking at a stop start jog circuit in the PLC will help us in understanding the differences in hard wiring the circuit and programming.

Lets start with the basic stop stop circuit.
Here is what it looks like hard wired. (Physical switches wired to outputs devices, such as motor contactor and relays.)
Latching Relay Circuit
When the start pushbutton (NO) is pressed the power is passed through the stop pushbutton (NC) to the control relay (CR). The CR contact closes and ‘seals in’  the start pushbutton. The start pushbutton can now be released because the CR contacts allow the power to pass through to the CR.

NO – Normally Open – This refers to the state of the input  device if nothing acts upon it. 
NC – Normally Closed – This refers to the state of the input device if nothing acts upon it.

Lets take a look at the PLC program for the above wiring diagram.
start stop 001
The first thing that you will notice is that the input for Stop is NO contact and not NC. This is because the actual signal wired in the input is NC and we do not want to inverse this signal. You can see that the stop input is currently on in the program.
If we hit the start pushbutton then the circuit is complete and the output CR turns on.

start stop 002Letting go of the start pushbutton, the output remains on because the CR input seals in the start pushbutton.
start stop 003
Pressing the stop pushbutton will break the circuit and turn off CR.
start stop 004
Letting go of the stop pushbutton will return us back to the original state shown above.

Adding a jog input to the hard wiring diagram will look something like this:
start stop Jog
You can see that the diagram will work the exact same as the circuit above with the start and stop pushbuttons. The jog when pushed will break the sealing contact, and then make a bypass of the start pushbutton. This will keep the M coil on as long as the jog button is pressed. Letting go of the jog will stop the bypass of the start pushbutton which will stop M coil. When the jog returns to the original state M input will already be off so it will not keep M coil on.
The action on the jog is referred to as a Break before Make device. The jog pushbutton will break the circuit before making another connection.

Sometimes in programming a PLC it can be beneficial to think of the inputs as Make before Break. Inputs are made before the previous ones are broken. The programmable controller will scan the program from left to right, top to bottom. The outputs from the rung above are available to the rungs below. Here is a previous article on PLC scanning.
Lets take a look at PLC program with a jog that will not work.
start stop 010
Even though this looks like it would work… Remember that the contacts in the PLC are make before break. You can jog the unit and it will turn on but as soon as you release your finger off of the pushbutton the not jog input will seal the CR in. The output will not be able to turn off.
start stop 011

We must consider the delay from on to off when looking at the PLC program for this circuit.
Here is a circuit that will work:
start stop 020

Notice that we create a delay from on to off by turning on an intermediate bit in the program.

Another way to do start stop circuits in the PLC is to use the instructions Set (SET)  and Reset (RST).
The set will have all of the conditions to turn on a bit in memory and the reset will have all of the conditions to turn off a bit in memory. These instructions are used to make the program easier to view and troubleshoot.
Here is the same logic above using the set and reset instructions.
start stop 021

Notice that X10 Jog2 is in parallel with the Start. We use a trailing edge one shot in parallel with the Stop. This sets our delay so the output will turn off.

Watch on YouTube :  Learn PLC Programming – Free 4

If you have any questions or need further information please contact me.
Thank you,
Garry



If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLC’s are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII and Floating Point.

To get this free article, subscribe to my free email newsletter.


Use the information to inform other people how numbering systems work. Sign up now.

The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.