EasyManua.ls Logo

Omron NX701-1620 - Page 233

Omron NX701-1620
306 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Appendix A
A-45
A
NJ/NX-series Database Connection CPU Units User’s Manual (W527)
DB_Delete (Delete DB Record)
- Retrieve records for the specified lot number from the DB Connection MyDB1 when the variable Trigger_Select changes to TRUE.
Check the completion of the DB_Select instruction.
DB_Select_instance.Done
OperatingEnd_Select
DB_Select
_instance.Error
Accept the trigger for retrieving DB records.
Trigger_Select
Operating
_Select
RS_Select_instance
OperatingEnd_
Select
Set
Reset1
RS
Q1
Create the conditions for the Where and Sort clauses.
Operating_Select
// Create the conditions for Where clause ("LotNo" = XXXX)
WhereCond_Select := CONCAT( '"LotNo" = $'', UINT_TO_STRING( LotNo ), '$'' );
// Create the conditions for Sort clause
// Sort the production completion time in descending order
SortCond_Select := '"FinishTime" DESC';
Retrieve the records from the DB Connection MyDB1.
Timeout is not monitored for the instruction execution.
Operating_Select
DB_Select_instance
MyDB1
WhereCond_Select
SortCond_Select
T#0ms
MapVar_Select
Execute
DBConnection
Where
Sort
TimeOut
MapVar
DB_Select
Done
Busy
Error
ErrorID
RecCnt
SelectedCnt
When the instruction is terminated due to an error, execute the error handler for the device (FaultHandler_Select).
Program the FaultHandler_Select according to the device.
Operating_Select
DB_Select_instance.Error
EN
FaultHandler_Select
FaultHander_Select
If two or more records were retrieved, delete the records other than the latest one.
Operating_Select
DB_Select_instance.Done
//
Normal end processing
IF DB_Select_instance.SelectedCnt > 1 THEN
Request_Delete := TRUE;
END_IF;
DB Connection Instructions

Table of Contents

Related product manuals