Omron NX701-1620 User Manual page 265

Machine automation controller nj/nx-series database connection cpu units
Hide thumbs Also See for NX701-1620:
Table of Contents

Advertisement

// 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;
NJ/NX-series Database Connection CPU Units User's Manual (W527)
Appendix A
A
A-77

Advertisement

Table of Contents

Troubleshooting

loading

Table of Contents