IEC 61131 Programming Using Ladder, Structured Text and Function Block

IEC 61131 Programming Using Ladder, Structured Text and Function Block

With many PLC programming software packages today, you’ll have options for the type of programming languages available.

Languages such as the traditional PLC ladder logic, text-based Structured Text and Function Block Diagram language methods, and a few more.

In this course, you will learn about three of the five most common programming languages defined by IEC 61131-3 and we will apply these languages to a simple application for you to examine the advantages of each.

IEC 61131 is an IEC standard for programmable controllers. It was known as IEC 1131 before the change in the numbering system by IEC. Part 3 is for standardizing programming languages. IEC 61131 is the first international standard for process control software.
An advantage to using IEC 61131, is that a programmer can develop a control program for a particular brand of the controller and import that same program to another PLC brand with minimum modifications.
If you work for an automation solutions provider serving multiple industries providing multiple PLC solutions this standard will be useful in supporting different customers using different PLCs as their in-house standard.
Using defined logic for solutions, ideally, you could cut-copy-paste code from one controller to another. Ask your PLC supplier if their programming software is IEC 61131-3 compliant. But for the most part to many automation software companies, just providing multiple IEC 61131 type languages signifies compliance.

In this course, we will be using Studio 5000 from Rockwell Automation to provide samples of language code performing the same functionality in controlling water level in a tank using an output valve, a pump, and a level transmitter.
The pump will have a turn on a setpoint of 14 feet and a shut-off setpoint of 2 feet. The valve will open when the pump turns ON and Close when the pump turns OFF.

IEC 61131 Programming Using Ladder, Structured Text and Function Block
  • 1. Studio 5000 IEC 61131-3 PLC Programming Languages

    With many PLC programming software packages today, you’ll have options for the type of programming languages available.

    Languages such as the traditional PLC ladder logic, text-based Structured Text and Function Block Diagram language methods, and a few more.

    In this course, you will learn ab...

  • 2. Creating User-Defined Data Type

    Let’s begin first with the traditional PLC ladder programming language, using Studio 5000 programming software.

    We will use the Emulate 5570 controller type.

    The Emulate 5570 controller is a software controller running on the same computer as Studio 5000 and allows simulation of the program log...

  • 3. Creating IEC Programming Languages Routines

    For the three language types, we will create the Ladder routine, which is one of the three IEC-61131 routines.
    - First, let’s create the ladder routine. Right-click over the MainProgram folder, select Add, and then New Routine. For the Name, we will type in RealPars_Ladder, and for the Type, we ...

  • 4. Process Logic Explanation

    Before we begin to program the Ladder routine, we went ahead and added a few rungs of ladder logic to simulate the tank level. If you would like to follow along, the Studio file, named RealPars_IEC61131 can be downloaded from this link: https://bit.ly/3sPXOO2
    - The first three rungs in the MainRo...

  • 5. Programming Ladder Logic Routine

    Let’s begin to program the ladder logic routine.
    We will add two new rungs to our ladder routine.
    We use a greater than or equal element that compares the tank level tag, with the pump start setpoint tag, and latches the SoftWaterTank.PumpStarter and SoftWaterTank.WaterValve coils.

    These coils w...

  • 6. Programming Structured Text Routine

    Let’s startup Studio 5000, and select the program RealPars_IEC61131, previously created in the first section.
    After the Studio 5000 program starts up, the “Logic Designer GUI” appears. In the “Controller Organizer Area” - “Tasks” folder - “MainProgram” folder, we can see the three different progr...

  • 7. Programming Function Block Diagram Routine

    We will begin by opening the RealPars_FunctionBlock routine.

    Sheet 1 of 1 will be displayed. Select the Edit icon.

    The routine will now be in edit mode and display the Accept Edits toolbar.

    With Function Block programming we will use similar compare GEQ (Greater than or equal) and LEQ (Less t...