Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 962

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

Processing details
• These instructions add a record to the table specified by (s2) in the database corresponding to the identification number
specified by (s1).
• Specify the number of fields of the record to be added and field names in (s3). For the field names to be added, not all fields
making up the table need to be specified. NULL is stored in a field which is not specified.
• Specify the number of records to be added and the size and value per record in (s4).
• The following figure shows an example when a record is added to the table recipeA by using the DBINSERT(P) instruction.
(1)
1
2
(1) Field 1: WORD
(2) Field 2: WSTRING (16 characters maximum)
(3) Field 3: INT
• Upon successful completion, the completion signal in the completion device (d1)+0 is turned on and 0 is stored as the
completion status in the device (d2).
• Upon completion with an error, the error completion signal in the completion device (d1)+1 is turned on and an error code is
stored as the completion status in the device (d2).
• The following figure shows the operation of the completion device at completion of the DBINSERT(P) instruction.
Program
DBINSERT(P) instruction
Completion device (d1)
Completion device (d1)+1
• SM753 (File being accessed) turns on while the DBINSERT(P) instruction is executed.
DBINSERT(P) instruction cannot be executed. If executed, no processing is performed. However, the instruction has been
completed with an error while the database access instruction is being executed.
• When "To Use or Not to Use the Built-in Database Access" is set to "Use" in the module parameter of the CPU module, the
DBINSERT(P) instruction cannot be executed while SM1498 (CPU module database start-up flag) is off.
processing is performed.
*2 For the firmware versions supporting SM753 and SM1498, refer to the list of special relay areas. ( MELSEC iQ-R CPU Module
User's Manual (Application))
7 APPLICATION INSTRUCTIONS
960
7.21 Database Access Instructions
(2)
(3)
ProductA
100
ProductB
200
END processing
OFF
OFF
END processing
ON
ON
Adding data to
the database
END processing
Error completion
*2
While SM753 is on, the
*2
If executed, no

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents