Creating Unicode Text Files - Mitsubishi Electric MELSEC iQ-R-R00CPU User Manual

Melsec iq-r series cpu module application user's manual
Table of Contents

Advertisement

Creating Unicode text files

When the DBIMPORT(P) instruction is executed, a database is created on an SD memory card, according to setting details in
the tab-delimited format of Unicode text file. The user must create Unicode text files on an SD memory card.
Setting details of Unicode text file
The following table lists items which must be specified in a Unicode text file to create a database.
Item
Database name
Table definition start tag
Table name
Field name
Data type
Key constraint
Index
Setting value
Table definition end tag
*1 The termination character, NULL, is not counted in the number of characters.
*2 The length of characters is represented by single-byte characters. For double-byte character strings, one double-byte character should
be counted as two single-byte characters.
*3 For the programmable controller CPU with firmware version earlier than "28", the maximum number is 16.
Description
Specify a database name, using single-byte alpha-numeric characters.
• Within 32 characters
• Not case-sensitive
• The following characters cannot be used: " # % * + , / : ; < = > ? [ \ ] | ' { } & ~ $ @ ^
Specify the tag, <table>, using a single-byte lower-case characters. When defining more than one table, enclose each
table with <table> and </table>.
Specify a table name, using single-byte alpha-numeric characters.
• Within 32 characters
• Not case-sensitive
• The following characters cannot be used: " # % * + , / : ; < = > ? [ \ ] | ' { } & ~ $ @ ^
• The maximum number of tables is 32.
Specify the name of each field of each record, using single-byte alpha-numeric characters, and in the tab-delimited format.
• The maximum number of characters which can be used for each field name is 32.
• Case-sensitive
• The following characters cannot be used: " and '
• The maximum number of fields is 128.
Specify the data type of each field in the tab-delimited format. The data types which can be specified are as follows. They
must be specified using upper-case characters.
• BOOL
• WORD
• DWORD
• INT
• DINT
• REAL
• LREAL
• STRING: Specify the number of characters after a colon (:) (For example, when the number of characters is 16, the user
can specify like that: "STRING: 16"). The range of the number of characters is 1 to 124.
• WSTRING: Specify the number of characters after the colon (:) The range of the number of characters is 1 to 124.
Specify the key constraint on each field, using single-byte alphabetical characters. Between key constraints, a tab must be
inserted as a delimiter. One of the following can be specified:
0: None
1: Primary key (used to uniquely identify each record) When a primary key is specified, its key name also must be
specified after a colon (:) (e.g. "1: pk1"). Key names must be up to 16 single-byte alphabetical characters and are case
sensitive.
2: NOT NULL constraint (When this setting is selected, setting values cannot be left unspecified by skipping specification
of primary keys or foreign keys. (This value is used to set a restriction.)
3: Foreign key (used to refer to the field of another table.) When a foreign key is specified, a table name, which is to be
associated with the key name, also must be specified after a colon (:), like that: "3: Key Name: Table Name" (e.g. "3:
fk1: tb2"). Key names must be up to 16 single-byte alphabetical characters and are case sensitive.
Specify 0 (single-byte numeric character) when any indexes are not specified. When an index is specified, the name of the
index and a field name must be specified using a colon (:) between them, like that: "Index Name: Field Name" (e.g. "id1:
field1").
• Index names must be up to 16 single-byte alphabetical characters and are case sensitive.
• The maximum number of indexes is 128.
• For fields with a primary or foreign key constraint, indexes are automatically set, and it is not necessary to specify
indexes by this setting (if specified, the DBIMPORT(P) instruction is completed with an error).
Specify the setting value of each field in the tab-delimited format.
• Characters or numbers which will be set to each field must match with the specified data type ( Page 237 Creating
Unicode text files,  Page 238 Format of setting values in Unicode text)
• Individual records are set by row.
Specify the tag, </table>, using a single-byte lower-case characters.
*3
*3
*3
13.2 Database Access Instruction
*1*2
*1
13 DATABASE FUNCTION
13
237

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents