
L-INX User Manual
259
LOYTEC
Version 4.0
LOYTEC electronics GmbH
4.
For designing programs that support the force update functionality (see Section 12.6.1),
or designing user-defined
Technology Mapper
(see Section 12.6.2) additional function
blocks are required. These blocks are located within the
Loytec_Support
directory.
All LINX-specific add-ons are provided using function blocks. Hence, in the following, all
samples are based on designs using function blocks.
12.4.1 Managing Variables
On a function plan, three basic types of variables may be created using the tabs shown
below the function plan sheet:
VAR:
Variables created on this tab will be visible only to the logic designed on this
group of sheets. It will not be accessible to any other programs or to any function
blocks which are used in this program. It is similar to a ‗static‘ variable declaration in a
C code function.
VAR GLOBAL:
Variables declared here will be accessible to the entire program,
including any function blocks which are called by the program. Function blocks which
need to reference this variable need to have a suitable declaration of an external
variable (see next point). This declaration is similar to a ‗static‘ declaration of a C
variable outside a function, which will be visible to all functions inside the C code
module, but not visible to other modules.
VAR EXTERNAL:
Variables declared in this list will be treated as open references to
a global variable which exists somewhere in the scope of the device on which the
program will be executed. This means that a global variable needs to be declared on the
device resource, which will be available to all programs running on the device. If the
physical address parameter of the variable is set to %I, %O, or %M, the variable will be
handed down to the I/O driver of the LINX-110 for processing. If a suitable IEC61131
variable exists in the data point configuration of the device, its value will be forwarded
by the I/O driver between the PLC variable and the data point. If no physical address is
set, the variable will only be visible to the PLC programs but not to the I/O driver,
which may be used to exchange data between PLC tasks.
The basic data flow between the CEA709 network and the PLC program is as follows:
IEC61131
variables
IEC61131 program
IEC61131
variables
Input NVs
DP
DP
Output NVs
Figure 205: Connecting IEC61131 variables
The place where global variables are created on the device is shown below.
Figure 206: Global Variables Object