946
7 APPLICATION INSTRUCTIONS
7.21 Database Access Instructions
7.21 Database Access Instructions
The database access instructions add, update, obtain, or delete data with respect to the tabular data such as product and
production information managed as databases in the programmable controller.
These instructions construct a database from the Unicode text file that defines information such as a table configuration, and
operates the database thus constructed. ( MELSEC iQ-R CPU Module User's Manual (Application))
Importing data to the data base
DBIMPORT(P)
These instructions import the data stored in the Unicode text file at the path specified by (s) and construct a database.
■Execution condition
■Descriptions, ranges, and data types
Ladder ST
ENO:=DBIMPORT(EN,s,d1,d2);
ENO:=DBIMPORTP(EN,s,d1,d2);
FBD/LD
Instruction Execution condition
DBIMPORT
DBIMPORTP
Operand Description Range Data type Data type (label)
(s) Start device for storing the Unicode text file name
Example: "2:\database1\recipe\recipe_db.txt"
Within 255 characters
Unicode string ANYSTRING_DOUBLE
(d1) Completion device (start device that turns on one scan
upon completion of instruction)
• (d1)+0: Completion signal
• (d1)+1: Error completion signal
Bit ANYBIT_ARRAY
(Number of elements: 2)
(d2) Completion status
• 0000: Normal completion
• Other than 0000: Error completion (error code)
Word ANY16
EN Execution condition Bit BOOL
ENO Execution result Bit BOOL
RnCPU
RnENCPU
RnSFCPU RnSFCPURnPCPURnPCPU
(Standard) (Safety)
(Redundant)
(Process)