EasyManua.ls Logo

Omron NX701-1620 - Page 258

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-70
NJ/NX-series Database Connection CPU Units User’s Manual (W527)
Sample Programming
(* ---------------------------------------------------------------------------------------------------------------------
-
Change the variable Warning to TRUE when the Spool usage of the DB Connection named MyDababase1 has exceeded 80%.
--------------------------------------------------------------------------------------------------------------------- *)
// 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_GetConnectionStatus_instance( Execute:=FALSE );
OperatingStart := FALSE;
END_IF;
IF (Operating=TRUE) THEN
// 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 Warning to TRUE when the Spool usage has exceeded 80%.
IF (MyStatus.SpoolUsageRate > SINT#80) THEN
Warning := TRUE;
END_IF;
Operating := FALSE;
END_IF;
IF (DB_GetConnectionStatus_instance.Error=TRUE) THEN
// Error handler
Operating := FALSE;
END_IF;
END_IF;

Table of Contents

Related product manuals