Home      Discussion      Topics      Dictionary      Almanac
Signup       Login
IEC 61131-3

IEC 61131-3

Overview
IEC 61131-3 is the third part of the open international standard
International standard
International standards are standards developed by international standards organizations. International standards are available for consideration and use, worldwide....

 IEC 61131
IEC 61131
IEC 61131 is an IEC standard for Programmable logic controllers . It was known as IEC 1131 before the change in numbering system by IEC.-Sections of IEC 61131:Standard IEC 61131 is divided into several parts :* Part 1: General information...

, and was first published in December 1993 by the IEC
International Electrotechnical Commission
The International Electrotechnical Commission is a not-for-profit, non-governmental international standards organization that prepares and publishes International Standards for all electrical, electronic and related technologies – collectively known as "electrotechnology"...

. The current (second) edition was published in 2003.
Discussion
Ask a question about 'IEC 61131-3'
Start a new discussion about 'IEC 61131-3'
Answer questions from other users
Full Discussion Forum
 
Encyclopedia
IEC 61131-3 is the third part of the open international standard
International standard
International standards are standards developed by international standards organizations. International standards are available for consideration and use, worldwide....

 IEC 61131
IEC 61131
IEC 61131 is an IEC standard for Programmable logic controllers . It was known as IEC 1131 before the change in numbering system by IEC.-Sections of IEC 61131:Standard IEC 61131 is divided into several parts :* Part 1: General information...

, and was first published in December 1993 by the IEC
International Electrotechnical Commission
The International Electrotechnical Commission is a not-for-profit, non-governmental international standards organization that prepares and publishes International Standards for all electrical, electronic and related technologies – collectively known as "electrotechnology"...

. The current (second) edition was published in 2003.

Part 3 of IEC 61131 deals with programming languages and defines two graphical and two textual PLC
Programmable logic controller
A programmable logic controller or programmable controller is a digital computer used for automation of electromechanical processes, such as control of machinery on factory assembly lines, amusement rides, or lighting fixtures. PLCs are used in many industries and machines...

 programming language standards:
  • Ladder diagram
    Ladder logic
    Ladder logic is a programming language that represents a program by a graphical diagram based on the circuit diagrams of relay-based logic hardware. It is primarily used to develop software for Programmable Logic Controllers used in industrial control applications...

     (LD), graphical
  • Function block diagram
    Function block diagram
    A function block diagram is a diagram, that describes a function between input variables and output variables. A function is described as a set of elementary blocks. Input and output variables are connected to blocks by connection lines...

     (FBD), graphical
  • Structured text
    Structured text
    Structured text is one of the 5 languages supported by the IEC 61131-3 standard. It is designed for programmable logic controllers . It is a high level language that is block structured and syntactically resembles Pascal. All of the languages share IEC61131 Common Elements...

     (ST), textual
  • Instruction list
    Instruction list
    Instruction List is one of the 5 languages supported by the IEC 61131-3 standard. It is designed for programmable logic controllers . It is a low level language and resembles assembly. All of the languages share IEC61131 Common Elements...

     (IL), textual
  • Sequential function chart
    Sequential function chart
    Sequential function chart is a graphical programming language used for PLCs. It is one of the five languages defined by IEC 61131-3 standard...

     (SFC), has elements to organize programs for sequential and parallel control processing
    Parallel computing
    Parallel computing is a form of computation in which many calculations are carried out simultaneously, operating on the principle that large problems can often be divided into smaller ones, which are then solved concurrently . There are several different forms of parallel computing: bit-level,...

    .

Data
Data
The term data means groups of information that represent the qualitative or quantitative attributes of a variable or set of variables. Data are typically the results of measurements and can be the basis of graphs, images, or observations of a set of variables...

 Types

  • Bit Strings - groups of on/off values
    • BOOL
      Boolean datatype
      In computer science, the Boolean or logical data type is a primitive data type having one of two values: true or false, intended to represent the truth values of logic and Boolean algebra....

        - 1 bit
    • BYTE
      Byte
      A byte is a unit of information storage representing the smallest addressable element for a given computer architecture. It often designates a sequence of bits whose length is determined by the architecture...

        - 8 bit
    • WORD  - 16 bit
    • DWORD - 32 bit
    • LWORD - 64 bit

  • INTEGER
    Integer (computer science)
    In computer science, the term integer is used to refer to a data type which represents some finite subset of the mathematical integers. These are also known as integral data types.- Value and representation :...

     - whole numbers
    • SINT - signed short (1 byte)
    • INT - signed integer (2 byte)
    • DINT - double integer (4 byte)
    • LINT - long integer (8 byte)
    • U - Unsigned - add a U to the type to make it unsigned integer.

  • REAL
    Real number
    In mathematics, the real numbers include both rational numbers, such as 42 and −23/129, and irrational numbers, such as pi and the square root of two; or, a real number can be given by an infinite decimal representation, such as 2.4871773339..., where the digits continue in some way; or, the real...

     - floating point IEC 559 (IEEE)
    • REAL - (4 byte)
    • LREAL - (8 byte)

  • Time - duration for timers, processes.

  • Date and Time of day:
    • DATE - calendar date
    • TIME_OF_DAY - clock time
    • DATE_AND_TIME: time and date

  • STRING
    String (computer science)
    In mathematics, a string is an sequence of symbols that are chosen from a set or alphabet.In computer programming, a string is, essentially, a sequence of characters...

     - character strings surrounded by single quotes.
    Escaped characters are preceded by a dollar sign.
    ($$ $' $L $N $P $R $T $xx) => ($ quote linefeed newline page(FF) return tab hex_value)
    • WSTRING - holds multi-byte strings
      String (computer science)
      In mathematics, a string is an sequence of symbols that are chosen from a set or alphabet.In computer programming, a string is, essentially, a sequence of characters...

      .

  • Arrays - multiple values stored in the same variable
    Variable (programming)
    In computer programming, a variable is a facility for storing data. The current value of the variable is the data actually stored in the variable. Depending on the programming language in question, the data stored in the variable can be intentionally altered during the program run. This is why it...

    .

  • Sub Ranges - puts limits on value i.e., (4-20) for current

  • Derived - type derived from one of the above types.
    • TYPE - single type
    • STRUCT - composite of several variables and types.

  • Generic - groups of the above types:
    • ANY
      • ANY_DERIVED
      • ANY_ELEMENTARY
      • ANY_MAGNITUDE
        • ANY_NUM - LREAL, REAL
        • ANY_INT - LINT, DINT, INT, SINT, ULINT, UDINT, UINT, USINT
      • ANY_BIT - LWORD, DWORD, WORD, BYTE, BOOL
      • ANY_STRING - STRING, WSTRING
      • ANY_DATE - DATE, TOD, DT

Variables


Variable attributes: RETAIN, CONSTANT, AT
  • Global
  • Direct (local)
  • I/O
    I/O
    I/O may refer to:* Input/output, a system of communication for information processing systems* The input-output model, an economic model of flow prediction between sectors...

     Mapping - Input, Output, I/O
  • External
  • Temporary

Configuration

  • Resource - Like a CPU
  • Tasks - Can be multiple per CPU.
  • Programs
    Computer program
    Computer programs are instructions for a computer. A computer requires programs to function, typically executing the program's instructions in a central processor. The program has an executable form that the computer can use directly to execute the instructions...

     - Can be executed once, on a timer, on an event.

Program Organization Units

  • Functions
    • Standard: ADD, SQRT, SIN, COS, GT, MIN, MAX, AND, OR, etc.
    • Custom
  • Function Blocks
    • Standard:
    • Custom - Libraries of functions can be supplied by a vendor or third party.
  • Programs

Configuration, Resources, Tasks

  • Configuration - processing resources, memory for IO, execution rates, number of tasks.

External links