EasyManuals Logo

Omron NX701-1620 User Manual

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
Page #237 background imageLoading...
Page #237 background image
Appendix A
A-49
A
NJ/NX-series Database Connection CPU Units User’s Manual (W527)
DB_Delete (Delete DB Record)
Sample Programming
// ---------------------------------------------------------------------------------------------------------------------
// - Establish a DB Connection named MyDatabase1 and map a table with a variable.
// Start the sequence when the variable Trigger_Connect changes to TRUE.
IF ( (Trigger_Connect=TRUE)
AND (LastTrigger_Connect=FALSE)
AND (_DBC_Status.Run=TRUE) ) THEN
OperatingStart_Connect := TRUE;
Operating_Connect := TRUE;
END_IF;
LastTrigger_Connect:=Trigger_Connect;
// Sequence start processing
IF (OperatingStart_Connect=TRUE) THEN
// Initialize the instances of the applicable DB Connection Instructions.
DB_Connect_instance( Execute:=FALSE );
DB_CreateMapping_Select_instance(
Execute := FALSE,
MapVar := MapVar_Select,
SQLType := _DBC_SQLTYPE_SELECT
);
Stage := 1;
OperatingStart_Connect := FALSE;
END_IF;
// Establish the DB Connection named MyDatabese1.
// Map the variable MapVar_Select to the table Production of the DB Connection MyDB1 for the SELECT operation.
IF (Operating_Connect=TRUE) THEN
CASE Stage OF
1 : // Establish the DB Connection
DB_Connect_instance(
Execute := TRUE,
DBConnectionName := 'MyDatabase1',
DBConnection => MyDB1
);
IF (DB_Connect_instance.Done=TRUE) THEN
Stage := INT#2; // Normal end
END_IF;
IF (DB_Connect_instance.Error=TRUE) THEN
Stage := INT#99; // Error
END_IF;
2 : // Map the DB table with the variable
DB Connection Instructions

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron NX701-1620 and is the answer not in the manual?

Omron NX701-1620 Specifications

General IconGeneral
BrandOmron
ModelNX701-1620
CategoryController
LanguageEnglish

Related product manuals