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 #218 background imageLoading...
Page #218 background image
Appendix A
A-30
NJ/NX-series Database Connection CPU Units User’s Manual (W527)
// Map the variable MapVar_Insert to the table Production of the DB Connection MyDB1 for the INSERT operation.
// Map the variable MapVar_Update to the table Production of the DB Connection MyDB1 for the UPDATE 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_CreateMapping_Insert_instance(
Execute := TRUE,
DBConnection := MyDB1,
TableName := 'Production',
MapVar := MapVar_Insert,
SQLType := _DBC_SQLTYPE_INSERT
);
DB_CreateMapping_Update_instance(
Execute := TRUE,
DBConnection := MyDB1,
TableName := 'Production',
MapVar := MapVar_Update,
SQLType := _DBC_SQLTYPE_UPDATE
);
IF ( (DB_CreateMapping_Insert_instance.Done=TRUE)
AND (DB_CreateMapping_Update_instance.Done=TRUE) ) THEN
Operating_Connect:=FALSE; // Normal end
END_IF;
IF ( (DB_CreateMapping_Insert_instance.Error=TRUE)
OR (DB_CreateMapping_Update_instance.Error = TRUE) ) THEN
Stage := INT#99; // Error
END_IF;
99 :
// Execute the error handler.
// Program the error hander (FaultHandler_Connect) according to the device.
FaultHandler_Connect();

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