
L-INX/L-GATE User Manual
90
LOYTEC
LOYTEC electronics GmbH
To generate type definitionf for UNVTs in logiCAD
1.
Start the L-INX Configurator.
2.
Select the menu Tools
Export NV Resource File….
3.
Select the resource file to be exported. Select structured text as format and export the file
to a location of your choice by clicking
Export Selected
.
4.
To import the created type definition file into logiCAD, add a new library to the project.
Right-click on the created library and select
Export/Import
Start ST-Import
.
5.
Select the file to be imported and check the
Error-state viewer
for the results of the
import process.
Using the newly created data types, suitable technology converter function blocks can be
created. For each UNVT type, create a normal function block to convert an input of the
UNVT type to a number of standard IEC61131 data types and vice versa. You may look at
the technology converter blocks for SNVT types which are provided by LOYTEC, to get
ideas how to implement your own converter functions.
8.6.3 Create Your Own Data Type
For special applications, custom IEC61131 compliant data types may be created by the user,
which do not correspond to any CEA709 network type but should still be available as a data
point on the L-INX automation server, in order to access the data point value from the Web
interface or over XML as a parameter. Further, such data points can also be made persistent,
which makes variables of such custom data types persistent.
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), structures and simple arrays.
If such structured variables shall be mapped to a data point, which shall only be persistent to
store the structure but no access to its elements are required in the data point interface create
a suitable register data point during the IEC61131 variable import. In this case the data size
of custom structures cannot be determined automatically, 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.
As an alternative, structures and arrays the logiCAD type definitions can be exported to the
Configurator using structured text. The Configurator builds custom structured data point
types in the logiCAD category out of the structured text definitions. In this case, the exact
data size of a user register is determined by the structured data type. Structure members of
the logiCAD types are represented as a tree of sub-data points. logiCAD arrays (like ARRAY
[1..16] OF INT) are represented as a series of single data points where each data point
represents one array element. Note, that the array in logiCAD can still be access by index.