Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 976

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

Advertisement

Processing details
• These instructions search the records in the table specified by (s2) in the database corresponding to the identification
number specified by (s1). The maximum number of outputs is 64.
• Specify the field name of the record to be searched for in (s3).
• Specify the search conditions in (s4). A maximum of two conditions can be specified.
• The search result is stored in (d1).
• Even when executed from the interrupt program, this instruction performs a record search.
• When the DBSELECT(P) instruction retrieves and outputs a table recipeA record which matches the conditions in which the
output fields are 2 and 3, and the condition is field 1=2, the following occurs.
Table recipeA
Field 1
WORD
1
2
3
• Upon normal completion, the completion signal in the completion device (d2) is turned on and 0 is stored as the completion
status in the device (d3).
• The following figure shows the operation of the completion device at completion of the DBSELECT(P) instruction.
Program
DBSELECT(P) instruction
Completion device (d2)
Completion device (d2)+1
• SM753 (File being accessed) turns on while the DBSELECT(P) instruction is executed.
DBSELECT(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
DBSELECT(P) instruction cannot be executed while SM1498 (CPU module database start-up flag) is off.
processing is performed.
*1 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
974
7.21 Database Access Instructions
Field 2
Field 3
WSTRING
INT
(16 characters
maximum)
ProductA
100
ProductB
200
ProductC
300
ProductB
200
END processing
OFF
OFF
END processing
ON
ON
Searching data
in the database
END processing
Error completion
*1
While SM753 is on, the
*1
If executed, no

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents