Variables - Mitsubishi MELSEC System Q Manual

Hide thumbs Also See for MELSEC System Q:
Table of Contents

Advertisement

An Introduction to Programming
4.6.2

Variables

Variables contain the values of inputs, outputs, or the internal devices of the PLC.A distinction
is made between two different types of variables:
b Global variables and
b Local variables
Global Variables can be regarded as "shared" variables and are the interface to physical PLC
devices. They are made available to all POU's and reference an actual physical PLC I/O or
named internal devices within the PLC. Global Variables make it possible to exchange data
between the individual POUs.
For a particular POU to access a Global Variable, it must be declared in the Header of this
POU. The Header can be made up of both Global Variables and Local Variables.
A Local Variable can be thought of as an intermediate result. A POUs can not access Local
Variables of other POUs.
Declaring Variables
At the start of each POE the variables are declared, i.e. they are assigned to a certain data type
like INT or BOOL.
Each variable has the following elements:
b Class
b Identifier, the name of the variable
b Absolute address (optional for global variables)
b Data type
b Inital value (is specified automatically)
b Comment (optional)
MELSEC System Q Beginners Manual
Global
Variables
The IEC 61131-3 Standard
Header
Body
Local
variables
PLC program
of
of POE 1
POU 1
Header
Body
Local
variables
PLC program
of
of POE 2
POU 2
4 – 11

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents