IEC 61131-3
   HOME

TheInfoList



OR:

IEC 61131-3 is the third part (of 10) of the open
international standard international standard is a technical standard developed by one or more international standards organization, standards organizations. International standards are available for consideration and use worldwide. The most prominent such organization ...
IEC 61131 IEC 61131 is an IEC standard for programmable controllers. It was first published in 1993; the current (third) edition dates from 2013. It was known as IEC 1131 before the change in numbering system by IEC. The parts of the IEC 61131 standard a ...
for
programmable logic controller A programmable logic controller (PLC) or programmable controller is an industrial computer that has been ruggedized and adapted for the control of manufacturing processes, such as assembly lines, machines, robotic devices, or any activity t ...
s. It was first published in December 1993 by the
IEC The International Electrotechnical Commission (IEC; in French: ''Commission électrotechnique internationale'') is an international standards organization that prepares and publishes international standards for all electrical, electronic and r ...
; the current (third) edition was published in February 2013. Part 3 of ''IEC 61131'' deals with basic software architecture and
programming languages A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
of the control program within PLC. It defines three graphical and two textual programming language standards: * Ladder diagram (LD), graphical * Function block diagram (FBD), graphical *
Structured text Structured text, abbreviated as ST or STX, is one of the five languages supported by the IEC 61131-3 standard, designed for programmable logic controllers (PLCs). It is a high level language that is block structured and syntactically resembles ...
(ST), textual * Instruction list (IL), textual (deprecated in 3rd edition of the standard) * Sequential function chart (SFC), has elements to organize programs for sequential and parallel control processing, graphical.


Data types

* Elementary Data Type ** Bit Strings – groups of on/off values *** BOOL - 1 bit (0,1) ***
BYTE The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable uni ...
– 8 bit (1 byte) ***
WORD A word is a basic element of language that carries an objective or practical meaning, can be used on its own, and is uninterruptible. Despite the fact that language speakers often have an intuitive grasp of what a word is, there is no conse ...
– 16 bit (2 byte) ***
DWORD In computing, a word is the natural unit of data used by a particular processor design. A word is a fixed-sized datum handled as a unit by the instruction set or the hardware of the processor. The number of bits or digits in a word (the ''word s ...
– 32 bit (4 byte) *** LWORD – 64 bit (8 byte) **
INTEGER An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign ( −1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the languag ...
– whole numbers (Considering byte size 8 bits) *** SINT – signed short integer (1 byte) *** INT – signed integer (2 byte) *** DINT – signed double integer (4 byte) *** LINT – signed long integer (8 byte) *** USINT – Unsigned short integer (1 byte) *** UINT – Unsigned integer (2 byte) *** UDINT – Unsigned double integer (4 byte) *** ULINT – Unsigned long integer (8 byte) **
REAL Real may refer to: Currencies * Brazilian real (R$) * Central American Republic real * Mexican real * Portuguese real * Spanish real * Spanish colonial real Music Albums * ''Real'' (L'Arc-en-Ciel album) (2000) * ''Real'' (Bright album) (2010) ...
– floating point IEC 60559 (same as
IEEE 754-2008 The Institute of Electrical and Electronics Engineers (IEEE) is a 501(c)(3) professional association for electronic engineering and electrical engineering (and associated disciplines) with its corporate office in New York City and its operation ...
) *** REAL – (4 byte) *** LREAL – (8 byte) **Duration *** TIME – (4 byte). Literals in the form of T#5m90s15ms *** LTIME – (8 byte). Literals extend to nanoseconds in the form of T#5m90s15ms542us15ns ** Date *** DATE – calendar date (Size is not specified) *** LDATE – calendar date (Size is not specified) ** Time of day *** TIME_OF_DAY / TOD – clock time(Size is not specified) *** LTIME_OF_DAY / LTOD – clock time (8 byte) ** Date and time of Day *** DATE_AND_TIME / DT – time and date(Size is not specified) *** LDATE_AND_TIME / LDT – time and date(8 byte) ** Character / Character string *** CHAR – Single-byte character (1 byte) *** WCHAR – Double-byte character (2 byte) *** STRING – Variable-length single-byte character string. Literals specified with single quote, 'This is a STRING Literal' *** WSTRING – Variable-length double-byte character string. Literals specified with a double quote, "This is a WSTRING Literal" *Generic Data Types – Only available for the input / output/ in-out variables of system-defined Program Organization Units (POUs, see below) ** ANY *** ANY_DERIVED *** ANY_ELEMENTARY **** ANY_MAGNITUDE ***** ANY_NUM ****** ANY_REAL: LREAL, REAL ****** ANY_INT ******* ANY_UNSIGNED: ULINT, UDINT, UINT, USINT ******* ANY_SIGNED: LINT, DINT, INT, SINT ***** ANY_DURATION: TIME, LTIME **** ANY_BIT: LWORD, DWORD, WORD, BYTE, BOOL **** ANY_CHARS ***** ANY_STRING: STRING, WSTRING ***** ANY_CHAR: CHAR, WCHAR **** ANY_DATE: DATE_AND_TIME (DT), DATE_AND_TIME(LDT), DATE, TIME_OF_DAY (TOD), LTIME_OF_DAY(LTOD) * User-defined Data Types ** Enumerated data type ** Enumerated data type with named value ** Subrange data type – puts limits on value i.e., INT(4 .. 20) for current ** Array data type – multiple values stored in the same variable. ** Structured data type – composite of several variables and types. ** Directly derived data type – type derived from one of the above types to give new name and initial value as a type. ** References – a kind of strongly typed pointer. Arithmetic operation of the value of this type is prohibited.


Variables

Variable attributes: RETAIN, CONSTANT, AT * Global * Direct (local) * I/O Mapping – Input, Output, I/O * External * Temporary


Configuration

* Resource – Like a
CPU A central processing unit (CPU), also called a central processor, main processor or just processor, is the electronic circuitry that executes instructions comprising a computer program. The CPU performs basic arithmetic, logic, controlling, a ...
* Tasks – Can be multiple per
CPU A central processing unit (CPU), also called a central processor, main processor or just processor, is the electronic circuitry that executes instructions comprising a computer program. The CPU performs basic arithmetic, logic, controlling, a ...
. *
Programs Program, programme, programmer, or programming may refer to: Business and management * Program management, the process of managing several related projects * Time management * Program, a part of planning Arts and entertainment Audio * Progra ...
– Can be executed once, on a timer, on an event.


Program organization unit (POU)

* 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.


Object oriented programming (OOP)

* The 3rd revision of the standard describes how to implement OOP within the application programming


References


External links


PLCopen

IEC 61131-3:2013 Programmable controllers - Part 3: Programming languages
* CODESYS important implementation independent of device manufacturers, includes object oriented programming (OOP) as an option * :de:STEP 7 implementation for Siemens devices, only {{List of IEC standards Electronic design automation IEC 61131