3 Programming the DB Connection Function
3-3
NJ/NX-series Database Connection CPU Units User’s Manual (W527)
3
3-2 Creating a Structure Data Type
3-2 Creating a Structure Data Type
To access a DB, you need to create a user-defined structure data type according to the table
definition of the DB.
This section describes the specifications and creation procedure of the structure data type.
3-2-1 Overview
You create a user-defined structure data type on Sysmac Studio based on the data type of the
table to access. Register all or some of the columns of the table as structure members.
Each structure member name and data type must match the corresponding column name and
data type of the table.
DB Connection Instruction
Table definition of the DB
Data type definition on
Sysmac Studio
Structure data type for DB access
When creating a variable called “DB Map Variable”, you specify the structure as its data type.
3-2-2 Specifications of Structure Data Type for DB Access
You can specify any name for the structures.
For all NJ/NX-series Controllers, specify NJ for Offset Type.
Register all or some of the columns of the table as members.
Structure member name Define the same name as the corresponding column of the table. The names are
Structure member’s data type Define a data type that matches the data type of the corresponding column of the
table.
Refer to Correspondence of Data Types between NJ/NX-series Controllers and
DB for details. However, you cannot specify the following data types and attribute
for structure members.
- Derivative data types