EasyManua.ls Logo

Mitsubishi Electric FX Series - Page 66

Mitsubishi Electric FX Series
284 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Definition of Variables GLOBAL and LOCAL
Variables
Before a program can be constructed, it must be decided what variables are going to be re
-
quired in each particular program module. Each POU has a list of Local Variables, which
are defined and declared for use only for use within a particular POU. Global Variables can
be used by all the POU’s in the program and are declared in a separate list.
Local Variables
When program elements are declared as Local Variables, GX IEC Developer, automati
-
cally, uses some of its System Variables, as appropriate storage devices within a specific
POU.These variables are exclusive to each POU and are not available to any other routine
withinaproject.
Global 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. External HMI and SCADA devices may inter
-
face with the user program using Global Variables.
IEC61131-3 Verses MELSEC Variables
GX IEC Developer supports program creation, using either symbolic declarations (tag names),
or absolute Mitsubishi addresses (X0, M0 etc), assigned to the program elements.
The use of symbolic declarations complies with IEC 61131.3.
If symbolic declarations are used, then the tag names must be cross referenced to real PLC
addresses.
Local Variable List
For a particular POU to access a Global Variable, it must be declared in its Local Variable List
(LVL), in the POU Header.
The LVL can be made up of both Global Variables and Local Variables.
A Local Variable can be thought of as an intermediate result, i.e. if the program performs a five
stage calculation, using three values and ending with one result, traditionally, the programmer
would construct software, which produced several intermediate results, held in data registers
before ending with the final register result.
It is likely that these intermediate results, serve no purpose other than for storage and only the
final result is used elsewhere.
With GX IEC Developer, the intermediate results can be declared, as Local Variables and in this
case, only the original three numbers and the result, declared as Global Variables.
The Global Variable List
The Global Variable List (GVL) provides the interface for all names, which relate to real PLC
addresses, i.e. I/O data registers etc.
The GVL is available and can be read by all POU’s created in the project.
Software Structure and Definition of Terms Programming
3-6 MITSUBISHI ELECTRIC

Table of Contents

Related product manuals