Introduction

In this chapter we will see an introduction to programmable logic controllers, their major languages, and after that we will see the introduction of the PLC IPC Beckhoff.

What is a "PLC"

PLC is a programmable hardware specialized in the control of manufacturing process, like machinery control on an assembly line. Back when there weren't PLC all control logic had to be done with relays.

With the advent of microprocessors, PLC began to decrease the size of electrical industry panels. Today, the PLC is at the heart of automation systems, making decisions and exchanging information with supervisory systems.

PLC has those major features:

PLC scanning cycle

The PLC is continuously reading a program, his execution cycle can be divided in 4 parts:

  1. Read Inputs
  2. Execute the program
  3. Update outputs
  4. Back to step 1

Where the response time of the PLC is the sum of the time those 4 steps.

Programming Languages

As noted earlier, today, the PLC standard IEC 61131-3, dictates what languages will be used to program PLCs:

In this tutorial we will see some examples in each of the languages

Ladder

The diagrams in ladder are often used to document control logic in industry illustrating how electromechanical and relays will be connected. In the example below the following diagram will turn the lamp if the switch is closed.

Taking a close look at the PLC we have:

Complicating a little more, the lamp will be turned on if the key "A or B" are closed.

Now the lamp will be turned on if "A and B" are closed

Until now all the keys were used as the "normally open" we can also reverse the logic of the key.When the user press the key, it will be level logical "0", using "normally closed" key.

We can also pass the output of one step of the ladder to another using a variable, this way we can simplify the diagram

Structured Text

This programming language is very similar to PASCAL or BASIC, it's simpler for a guy who already program in some structured language