L-INX User Manual 276 LOYTEC
Version 4.0 LOYTEC electronics GmbH
Most of the IEC61131 data types may be used as global variables on the device and the L-
INX Configurator will be able to create a suitable register data point for the IEC61131 data
type. Supported data types include custom enumeration types (a multi-state register with the
required states will be created automatically), strings (a string data point with a maximum
length of 128 characters will be built), and simple arrays.
While the software will be able to automatically determine the required data point size for
simple arrays (like ARRAY [1..16] OF INT) and create a suitable register data point during
the IEC61131 variable import, the data size of custom structures cannot be determined
automatically at the moment, so the L-INX Configurator does not know how to create a
suitable user data point. As a workaround, the type name must contain the desired size of
the data point in bytes, for example: MyStructuredType(UT16) will tell the L-INX
Configurator to create an IEC61131 register of type ‗user‘ with a length of 16 bytes, to hold
the data for the IEC61131 structure defined in the logiCAD program.
12.6.4 Using Persistent Data Points and Markers
Persistent data points are data points on the LINX-110 device that hold their value even on
power loss. There is no difference in handling global variables connected to persistent data
points or to non-persistent data points. Global variables connected to persistent data points
are marked with retain attribute in logiCAD and with the persistent flag in the LINX-110
configuration tool.
Global input variables marked as persistent, supply the IEC61131 program every time with
the last received, valid data, even after a power failure. To set an input variable as persistent
in logiCAD, open the global variables object containing the appropriate variable, double
click the variable, set the retain check and press the update button. Now export the global
variables and import them to the LINX-110 configuration tool. After downloading the new
IEC61131 point configuration to the LINX-110 the data point is set to persistent. Setting the
data point persistent in the LINX-110 configuration tool, export the data points and import
them to logiCAD is also possible.
Global variables declared as marker can be used as input and output variable in IEC61131
programs. LogiCAD is not able to distinguish markers from global output variables used in
combination with the force update feature, see Figure 228. As a result it is not possible to
create a global variables object holding markers automatically. The procedure as described
in section 6.4.2 is not able to decide when to create an output variable or a marker. Markers
must be created manually by adding them to the global variables object and setting the
physical address to %M.
12.6.5 LINX-110 System Registers, System Time
LINX-110 System registers, such as the System time or the CPU load, can be used within
IEC61131 programs. Therefore, for each system input variable, a global input variable of
type UDINT may be created within the IEC61131 program. Then, connections to the
appropriate system registers are created manually with the LINX-110 Configurator (see
section 6.10).
To use the system time within the IEC61131 program, connect the AtoDT converter
(located in the StandardLibs->IEC61131-3_ (EXT) folder) to the global input variable that
receives the system time.
12.6.6 Code Protection
There are 4 data points used for code protection. These data points, in combination with an
adapted IEC61131 program, can be used to protect your 61131-Program Intellectual
Property. Please contact LOYTEC sales for further information.