EasyManua.ls Logo

Omron NX701-1620 - Page 265

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-77
A
NJ/NX-series Database Connection CPU Units User’s Manual (W527)
DB_ControlSpool (Resend/Clear Spool Data)
// Get the status of the DB Connection.
DB_GetConnectionStatus_instance(
Execute := TRUE,
DBConnectionName := 'MyDatabase1',
ConnectionStatus => MyStatus
);
IF (DB_GetConnectionStatus_instance.Done=TRUE) THEN
// Normal end processing
// Change the variable Resend to TRUE when the status of the DB Connection is Connected.
IF (MyStatus.Status = _DBC_CONNECTION_STATUS_CONNECTED) THEN
Resend := TRUE;
ELSE
Resend := FALSE;
Operating := FALSE;
END_IF;
END_IF;
IF (DB_GetConnectionStatus_instance.Error=TRUE) THEN
// Error handler
Operating := FALSE;
END_IF;
END_IF;
IF ( (Operating=TRUE) AND (Resend=TRUE) ) THEN
// Resend the Spool data.
DB_ControlSpool_instance(
Execute := TRUE,
DBConnection := MyDB1,
Cmd := _DBC_SPOOL_RESEND
);
IF (DB_ControlSpool_instance.Done=TRUE) THEN
// Normal end processing
Resend := FALSE;
Operating := FALSE;
END_IF;
IF (DB_ControlSpool_instance.Error=TRUE) THEN
// Error handler
Resend := FALSE;
Operating := FALSE;
END_IF;
END_IF;
DB Connection Instructions

Table of Contents

Related product manuals