• No results found

UNICORN MS SQL Server Integration

N/A
N/A
Protected

Academic year: 2021

Share "UNICORN MS SQL Server Integration"

Copied!
5
0
0

Loading.... (view fulltext now)

Full text

(1)

Objective

This application note describes how UNICORN Run Time Data can be viewed and stored to a database by a third party application by using OPC as communication platform.

Products used

For this application note, we chose the following:

A. Terravic Corporation as a vendor for OPC Client. The software used is Visual OPC Test Office Ver 3.0 (VOPCTO)

B. Microsoft™ SQL Server 2000

C. Windows™ 2000 or 2000 Server Operating System D. UNICORN 4.11

E. ÄKTAFPLC™

The OPC Client and OPC Server are located in separate PC's. Table 1. shows the setup used for this application note. The PC's communicate via TCP/IP.

Table 1.

PC 1 PC 2

Visual OPC Test Office ver 3.0 UNICORN 4.11 with

(VOPCTO) ÄKTAFPLC

MS SQL Server 2000 WIN 2000 OS Win 2000 or 2000 Server OS

Implementation

In this example VOPCTO is used to read UNICORN data and store them in the MS SQL Server Database. VOPCTO supports both the OPC Data Access and OPC Alarms & Event Servers.

Note: This procedure assumes the user is familiar with the VOPCTO program and MS SQL Server 2000 database.

Introduction

Market requirements today are focused on solutions that deliver optimal performance in terms of:

• Time to market • Cost efficiency

• Reliability and high quality

Large pharmaceutical production plants contain many components that must work smoothly together. One key element in plant architecture is the information management strategy. The problem of transferring the various

components into an integrated plant becomes obvious when different components speak different languages. However, if a unified language is used translation becomes unnecessary and efficiency increases. OPC provides this kind of unified communication language among modules in a process plant. OPC is a standard specification that allows data

management from any data source within a production environment. OPC defines a standard set of interfaces allowing the creation of a client/server model where any OPC client (any application interested in data) can communicate with any OPC server (any application providing data). UNICORN™ supports the following OPC standards:

• Security

• Data Access (DA) • Alarms & Events (A&E) • Historical Data Access (HDA)

Any OPC client can communicate with any OPC server (local or remote) since the interfaces required for communication are guaranteed to be the same for all servers. A local OPC server is a server found on the same machine as the OPC client, a remote OPC server is a server

(2)

1 Create Tag and Alarm tables within a

Database

This step will create two tables that will store UNICORN data. One table for Data and one for Alarms and Events. User controls the type of the database, location, and the table name. One table is needed to write tag data and one table is needed to write alarm condition data. The table name is user defined, however, the table field names and data types are not user defined. A SQL files to create SQL Server tag and alarm tables are shown below. No matter which database is used, the tag and alarm tables have predefined structures.

Tag Table

CREATE TABLE Tags (TagKeyID char(22) PRIMARY KEY, TagItemID char(50), TagAccessPath char(50), TagValue char(255), TagQuality char(50), TagType char(30), TagCanonical char(30), TagRights char(5), TagTimestamp char(30), TagServer char(100), TagActive char(5)); Alarm Table

CREATE TABLE Alarms (AlarmKeyID char(22) PRIMARY KEY, AlarmSource char(50), AlarmTimestamp char(30), AlarmMessage char(255), AlarmCategory char(100), AlarmSeverity char(10), AlarmAttributes char(255), AlarmCondition char(50), AlarmSubcondition char(50), AlarmChangeMask char(255), AlarmNewState char(255), AlarmQuality char(50), AlarmAckReq char(5),

AlarmActiveTime char(30), AlarmCookie char(25),

AlarmActorID char(100), AlarmServer char(100), AlarmType char(25));

For this example:

The Tag table name is – FPLCF300_DATA

The Alarm table name is – FPLCF300_ALARM

The database name is – Unicorn_SQL

1.2 Expand (as shown in Figure 1) and right click Table and click New Table.

1.3 Enter the table information as shown in the Tag Table (Fig 2). Fig 1.

Fig 2.

1.4 Click the save button and type in the file name (FPLCF300_DATA).

1.5 Repeat steps 1.2 to 1.4 for Alarm Table (FPLCF300_ALARM).

1.1 Launch MS SQL, Start →→→→→ Programs →→→→→ Microsoft SQL Server

→ → → →

(3)

2 Setup an ODBC connection in the

Control Panel to the Database

This step configures Database connectivity so that VOPCTO can access the tables created in Step 1.

2.1 Start →→→→→ Settings →→→→→ Control Panel →→→→→ Administrative Tools. 2.2 Double click Data Sources (ODBC) icon.

2.3 Select System DSN tab, and click Add button. 2.4 Select SQL Server driver from the list, click Finish. 2.5 Enter Unicorn_SQL for Name and select 6938CD641941

(where 6938CD641941 is the name of the computer where SQL server resides) for Server from the drop down list. (Fig 3). Click Next.

2.6 Select the following check boxes: “With Windows NT Authentication …” “Connect to SQL Server…”

2.7 Click Next, click Next again.

2.8 Click OK and verify that Unicorn_SQL appear in the Name windows (Fig 4). Click OK to complete the step.

Fig 3.

Fig 4.

3 Configure Database

VOPCTO

This step configures VOPCTO to select which database to use and the name of the table to which data will be written.

3.1 Launch VOPCTO Program, Start →→→→→ Programs →→→→→ VisualOPCTest →→→→→ Visual OPCTest Office.

3.2 From Main menu, File →→→→→ Options →→→→→ Transfer tab. 3.3 Type in the information as shown below and click OK.

(4)

4 Connect to OPC Server within VOPCTO

This step connects VOPCTO to the UNICORN OPC Server (Data Access and Alarm & Events Servers), creates groups, adds tags to groups, and creates event subscriptions.

4.1 From the VOPCTO main menu, click Servers →→→→→ Connect to Server…

4.2 Expand “REMOTE” and navigate to find “STATION1” (name of PC where UNICORN OPC Server resides).

4.3 Double click “STATION1” to display available OPC Server (Fig 6).

4.4 Select OpcUNI0.opcDA2ServerS0.1 →→→→→ Connect Server… 4.5 Select OpcUNI0.opcAE1ServerS0.1 →→→→→ Connect Server… 4.6 The two items selected will appear on the lower left

windows: (Fig 7)

DA1\\STATION1\ OpcUNI0.opcDA2ServerS0.1 AE1\\STATION1\ OpcUNI0.opcAE1ServerS0.1

4.7 Right click DA1\\STATION1\.., select Add Private Group… (Fig 7).

Fig 6.

Fig 7.

4.8 Type in Group name (example: Group1) and click OK. 4.9 Right click DA1\\STATION1\..., select Browse Server Address

Space All. This will list all UNICORN item groups on the lower right windows from which user can select items to be store in database.

4.10 Click the “+” sign to expand the items.

4.11 Right click the item and select Add Item to Group1. The selected item will now appear on the upper windows (Fig 8).

Fig 8.

4.12 Repeat for all other items.

4.13 Right click AE1\\STATION1\..., select Create Event Subscription.

(5)

5 Connecting VOPCTO to Database

This step connects VOPCTO to the Database (the two tables created in step 1)

5.1 Main menu, Transfer →→→→→ Tags Database →→→→→ Connect to Tags Database.

5.2 Main menu, Transfer →→→→→ Alarms Database →→→→→ Connect to Alarms Database.

6 Select Tags to be written to Database

This step selects which Data Access items will be written to the Database.

6.1 Click the Tags tab.

6.2 In the Tags View, highlight a tag or multiple tags. 6.3 Main menu, Transfer →→→→→ Item Database Transfer →→→→→ Start

Item Database Transfer.

6.4 A circular icon (red or green) with a dot inside will indicate that the tag will be written to the Database.

7 Select Alarm Conditions to be written to

Database

This step selects which Alarms & Event items will be written to the Database.

7.1 Click the Alarm tab.

7.2 In the Alarms View, highlight on a condition event or multiple condition events.

7.3 From main menu, Transfer →→→→→ Condition Database Transfer

→ →→

→→ Start Condition Database Transfer.

7.4 A “C” icon (with or without border) with a dash inside will indicate that the condition will be written to the Alarms database.

8 Stop Transferring data or alarm

conditions to Database

This step shows how to stop collecting data in Database

8.1 Highlight the items.

8.2 Main menu, Transfer →→→→→ Item Database Transfer →→→→→ End Item Database Transfer (For Data).

8.3 Main menu, Transfer →→→→→ Condition Database Transfer →→→→→ End Condition Database Transfer (For Alarm).

Fig 9.

For further information:

Asia PacificTel: +852 2811 8693 Fax: +852 2811 5251 AustralasiaTel: +61 2 9899 0999 Fax: +61 2 9899 7511 AustriaTel: 01 57 606 16 19 Fax: 01 57 606 16 27 BelgiumTel: 0800 73 888 Fax: 03 272 1637

CanadaTel: 1 800 463 5800 Fax: 1 800 567 1008 Central, East, South East EuropeTel: +43 1 982 3826 Fax: +43 1 985 8327 Denmark Tel: 45 16 2400 Fax: 45 16 2424 Finland & BalticsTel: +358 (0)9 512 3940 Fax: +358 (0)9 512 394 39 FranceTel: 0169 35 67 00 Fax: 0169 41 9677 GermanyTel: 0761 4903 401 Fax: 0761 4903 405 ItalyTel: 02 27322 1 Fax: 02 27302 212 JapanTel: 81 3 5331 9336 Fax: 81 3 5331 9370

Latin AmericaTel: +55 11 3933 7300 Fax: +55 11 3933 7306 Middle East and AfricaTel: +30 2 10 96 00 687 Fax: +30 2 10 96 00 693 NetherlandsTel: 0165 580 410 Fax: 0165 580 401 NorwayTel: 2318 5800 Fax: 2318 6800

PortugalTel: 21 417 7035 Fax: 21 417 3184 Russian & other C.I.S. & N.I.S.Tel: +7 (095) 232 0250,956 1137 Fax: +7 (095) 230 6377 South East AsiaTel: 60 3 8024 2080 Fax: 60 3 8024 2090 Spain Tel: 93 594 49 50 Fax: 93 594 49 55 Sweden Tel: 018 612 19 00 Fax: 018 612 19 10 SwitzerlandTel: 0848 8028 12 Fax: 0848 8028 13 UKTel: 0800 616 928 Fax: 0800 616 927 USATel: +1 800 526 3593 Fax: +1 877 295 8102

Licensing information

A license for the commercial use of GST gene fusion vectors must be obtained from Chemicon International Incorporated, 28820 Single Oak Drive, Temecula, CA 92590, USA.

References

Related documents

vetiyeler çocuklara geçiş yapacakları yeni toplumsal katmanın habercileri- dir. Sünnetin bir geçiş ritüeli olduğu sık sık vurgulanmaktadır. Bunun öte- sinde daha

In SQL Server Management Studio, expand SQL Server Agent, then expand the Jobs folder, right-click the merge agent job, and then select Properties.. The Job Properties dialog box

In Exchange System Manager, expand Servers, MS Exchange Server (example: Win2K DC), the mailbox store group, right click on the mailbox store for which you want to enable

In SQL Server Management Studio Object Explorer, connect to an instance of the Microsoft SQL Server Database Engine, and then expand that instance.. Expand Databases, and

In this scenario, the UNICORN database and license server software, as well as the client and instrument server software, are installed on the local computer.. In other words,

Expand SQL Server 2005 Network Configuration and click on Protocols for SHELBY.. Right-click Named Pipes and select Enabled and then do the same thing

(1) Click ‘Refresh Server list’ to obtain a list of available SQL servers (2) Select the SQL server from which you wish to take the backup.. (3) Select ‘Authentication’

(In the All Application Profiles navigation tree, expand Microsoft SQL Server, then expand WhatsUp Gold Embedded SQL. Click the WhatsUp Database Monitor.) 2 In the components