EasyManua.ls Logo

Omron NX701-1620 - Page 234

Omron NX701-1620
306 pages
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-46
NJ/NX-series Database Connection CPU Units User’s Manual (W527)
- Delete the records other than the latest one from the DB table
Check the completion of the DB_Delete instruction.
DB_Delete_instance.Done
OperatingEnd_Delete
DB_
Delete_instance.Error
Accept the trigger for deleting DB records.
Request_Delete
Operating
_Delete
RS_Delete_instance
OperatingEnd_Delete
Set
Reset1
RS
Q1
Create the conditions for the Where clause.
Operating_Delete
// Create the conditions for the Where clause (Delete the records other than the latest one)
WhereCond_Delete := CONCAT( '"LotNo" = $'',
UINT_TO_STRING( LotNo ),
'$' AND "FinishTime" < TO_TIMESTAMP($'',
DtToString( MapVar_Select[0].FinishTime),
'$',$'YYYY
-MM-DD-HH24:MI:SS.FF9$')'
);
Delete records from the table Production of the DB Connection MyDB1. Timeout is not monitored for the instruction execution.
Operating_Delete
DB_Delete
_instance
MyDB1
Production
WhereCond_Delete
Execute
DBConnection
TableName
Where
TimeOut
DB_Delet
e
Done
Busy
Error
ErrorID
RecCnt
Execute the normal end processing.
Operating_Delete
DB_Delete_instance.Done
// Normal end processing
Request_Delete := FALSE;
When the instruction is terminated due to an error, execute the error handler for the device (FaultHandler_Delete).
Program the FaultHandler_Delete for the device.
Operating_Delete
DB_Delete_instance.Error
//
Error handl
er
FaultHandler_Delete();
Request_Delete := FALSE;

Table of Contents

Related product manuals