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-76
NJ/NX-series Database Connection CPU Units User’s Manual (W527)
Structured Text (ST)
Main Variables
Name
Data type
Initial value
Comment
DB_GetConnectionStatus_instance DB_GetConnectionStatus --- Instance of DB_GetConnectionStatus
instruction
DB_ControlSpool_instance DB_ControlSpool --- Instance of DB_ControlSpool
instruction
Trigger BOOL FALSE Variable used as a trigger for
resending the Spool data
LastTrigger BOOL FALSE Variable to retain the trigger status of
the previous execution
Operating BOOL FALSE When this variable is TRUE, the
resending processing of Spool data is
executed if necessary.
OperatingStart BOOL FALSE The initialization processing is
executed when this variable is TRUE.
Resend BOOL FALSE This variable changes to TRUE when
the status of the DB Connection is
Connected.
MyStatus _sDBC_CONNECTION_STATUS --- This variable is assigned to the
ConnectionStatus output variable
from
DB_GetConnectionStatus_instance.
MyDB1 DWORD --- This variable is assigned to the
DBConnection input variable to
DB_ControlSpool_instance.
Sample Programming
(* ------------------------------------------------------------------------------------------------------------------------------------------------------------
- Resend the SQL statements stored in the Spool memory when the status of the DB Connection is Connected.
------------------------------------------------------------------------------------------------------------------------------------------------------- *)
// Start the sequence when the Trigger variable 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 );
DB_ControlSpool_instance( Execute:=FALSE );
OperatingStart := FALSE;
END_IF;
IF (Operating=TRUE) THEN

Table of Contents

Related product manuals