Intouch and sql database connection method

Introduction to InTouch

InTouch is an industrial automation configuration software, Wonderware products. Founded in 1987, Wonderware is a subsidiary of Invensys in the UK and is the pioneer in the manufacturing operations system to launch the human-machine interface (hmi) automation software based on the Microsoft Windows platform. The world's first company to introduce configuration software.

InTouch includes three main programs, the InTouch Application Manager, Win-dowMaker, and Window Viewer. In addition, InTouch also includes the diagnostic program Wonder-ware Logger.

The InTouch Application Manager is used to organize the applications you create, and it can also be used to configure Window Viewer as an NT server, both client-based and server-based (C/S structure).

Intouch and sql database connection method

WindowMaker is a development environment in which object-oriented graphics can be used to create animated touch-sensitive display windows. These display windows can be connected to industrial I/O systems and other Microsoft Windows applications. WindowMaker is the development environment for lnTouch. The WindowMaker graphical user interface complies with the Windows 2000 and Windows NT GUI standards. Support for floating and fixed toolbars, right-click menus throughout the program for quick access to frequently used commands, and a customizable palette of 16.7 million color support (color support is limited only by graphics performance). WindowMaker's application browser gives you a powerful graphical way to browse and configure InTouch applications. It gives you easy access to the most commonly used commands and features of WindowMaker, such as all Windows commands, all configuration commands, and all InTouchQuickScript editors. In addition, the application browser displays all installed add-ons, such as SQL Access Manager, SPC Pro, and Recipe Manager, and provides you with a customizable application launcher. To quickly switch between HMI configuration, I/O server configuration, and control configuration, you can configure the application browser to launch any other Factorysuite program or Windows program.

Window Viewer is used to display the running environment of the graphics window created in WindowMaker. Window Viewer performs InTouch Quickscript execution of historical data logging and reporting, processing alarm logging and reporting, and acts as a client and server for DDE and SuiteLink communication protocols.

By using InTouch system software, you can also create powerful, full-featured applications that take full advantage of the key features of the Microsoft Windows platform, including generic AcTIveX controls, OLE graphics and networking, and InTouch software can add custom AcTIveX controls. Full extension of functions, wizards, regular objects, and creation of InTouch Quickscript (development language).

QL and Intouch connection

There are two ways, the first way is ODBC (the same way as the Micorosoft Access, see the access-intouch document)

Method 2 (SQL Server and Intouch are configured on the same machine or on different machines)

SQLserver is ready to work

SQL server inside the database MMTest, create a table Table1, two columns, aa, bb

Intouch and sql database connection method

Open TCP/IP in SQL Server Configuration Manager

Intouch and sql database connection method

1, create the following tagname in Intouch

ConnecTIonID Memory Integer Tag ResultCode Memory Integer Tag

SQLErrorMsg1(SQLErrorMsg1) memory message aa memory real bb memory message

2. Create a binding list in Intouch's SQL Access Manager.

Create a binding list BindTable in Intouch

Intouch and sql database connection method

3, create a button, animation connection - action

Create button SQLconnect,

ResultCode = SQLConnect(ConnecTIonID, "Provider=SQLOLEDB; User ID=sa; Password=sa18O1; Initial Catalog=mmtest; Data Source=tr06;");

Create a button selection table: ResultCode = SQLSelect(ConnectionID, "Table1", "table1", "", "");

Create the first line of the button: ResultCode = SQLFirst(ConnectionID );

Create the next line of the button: ResultCode = SQLNext(ConnectionID );

Create the last line of the button: ResultCode = SQLLast(ConnectionID );

Create button close button: ResultCode = SQLDisconnect(ConnectionID );

Intouch and sql database connection method

4, the data change script tagname ResultCode

IF ResultCode ==0 THEN

SQLErrorMsg1 = "no errors occrred";

ELSE

SQLErrorMsg1 = SQLErrorMsg(ResultCode);

ENDIF;

Intouch and sql database connection method

5, create a few points display, display error message SQLErrorMsg1, you can understand the connection,

Run the test as shown below

Intouch and sql database connection method

6, SQLConnect () usage

The following table describes the SQLConnect() function properties used by Microsoft SQL Server

Intouch and sql database connection method

35kV And Below Dry Type Transformer

35Kv And Below Dry Type Transformer,Insulation Dry Type Power Transformer,Cast Resin Dry Type Power Transformer,Dry Type Distribution Transformers

SANON DOTRANS Co., Ltd. , https://www.sntctransformer.com