EasyManua.ls Logo

Omron NX701-1620

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-64
NJ/NX-series Database Connection CPU Units User’s Manual (W527)
Sample Programming
(* ---------------------------------------------------------------------------------------------------------------------
- Change the value of the variable Warning to TRUE when the number of SQL execution failures in all connections is 100 or greater.
--------------------------------------------------------------------------------------------------------------------- *)
// Start the sequence when the variable Trigger changes to TRUE.
IF ( (Trigger=TRUE) AND (LastTrigger=FALSE) ) THEN
OperatingStart := TRUE;
Operating := TRUE;
END_IF;
LastTrigger := Trigger;
// Sequence start processing
IF (OperatingStart=TRUE) THEN
// Initialize the instruction instance.
DB_GetServiceStatus_instance( Execute:=FALSE );
OperatingStart := FALSE;
END_IF;
IF (Operating=TRUE) THEN
// Get the status of the DB Connection Service.
DB_GetServiceStatus_instance(
Execute := TRUE,
ServiceStatus => MyStatus
);
IF (DB_GetServiceStatus_instance.Done=TRUE) THEN
// Normal end processing
// Change the variable Warning to TRUE when the number of error executions is 100 or greater.
IF (MyStatus.FailedCnt >= DINT#100) THEN
Warning := TRUE;
END_IF;
Operating := FALSE;
END_IF;
IF (DB_GetServiceStatus_instance.Error=TRUE) THEN
// Error handler
Operating := FALSE;
END_IF;
END_IF;

Table of Contents

Related product manuals