Appendix A
A-27
A
NJ/NX-series Database Connection CPU Units User’s Manual (W527)
DB_Update (Update DB Record)
Update production data in the DB Connection MyDB1.
Set the timeout for instruction execution to 500 ms.
MyDB1
MapVar_Update
WhereCond
T#500ms
Execute
DBConnection
MapVar
Where
TimeOut
Done
Busy
Error
ErrorID
RecCnt
SendStatus
When the instruction is terminated due to an error, execute the error handler for the device (FaultHandler_Update).
Program the FaultHandler_Update according to the device.
// Go to next step when the instruction is not completed within the specified time
IF DB_Insert_instance.ErrorID = 16#3012 THEN
RETURN;
ENDIF;
// Error handler
FaultHandler_Update();
Close the DB Connection MyDB1.
Check the completion of the DB_Close instruction.
Accept the trigger for closing the DB Connection.
Close the DB Connection MyDB1.
When the instruction is terminated due to an error, execute the error handler for the device (FaultHandler_Close).
Program the FaultHandler_Close according to the device.
DB Connection Instructions