Professional Documents
Culture Documents
AND DATA
TYPES
Presentor: Joshua Postrero
ARE VARIABLES ENOUGH TO RUN
A CONTROL PROGRAM?
VARIABLES AND DATA TYPES
◦ The use of exclusively directly represented variables is not enough to
create control programs.
Resources
Inputs
Outputs
Memory
◦ Data is frequently required which contains specific information and a more
complex nature.
◦ It can be a specified direct or accessible only via variables.
SYMBOLIC ADDRESSING
◦ A data element of the type Colour may only assume one of the values
RED, BLUE, YELLOW or BLACK.
◦ A data element of the data type Reference_range may only assume values
between 80 and 110 including the lower and upper limit.
◦ A Position type data element represents a list with 10 entries. Each entry
has the value of REAL number.
◦ A Coordinates type data element contains two REAL numbers which can
be accessed through their names X and Y.
VARIABLE DECLARATION
◦ With the use of data, the right of access to this data must be clearly
defined.
◦ Constructed into individual organization units:
Configuration
Resource
Programs
Function Blocks
Functions
◦ In the case of programming languages in text form (IL and ST), variable
declarations are roughly the same as those used in the programming
language Pascal.
◦ For graphic forms of representation, a tabular form with equivalent
contents would be feasible.
◦ All variable declarations always start with a keyword which designates the
position of the variable in the organization unit of the controller and end
with the keyword END_VAR
◦ The data type named after a colon and the declaration closed with a
semicolon.
◦ Each declaration is written in a separate line.
◦ EN 61131-3 (IEC 61131-3) differentiates between six different types of
access to variables. Each type has a keyword which introduces the
variable declaration.
DECLARATION OF INPUT AND OUTPUT
VARIABLE
◦ Input variables are declared with the keywords VAR_INPUT and
END_VAR.
◦ Variables specified in this way represent input variables fed externally to
an organization unit. These can be read only within the organization unit.