I
I. Scope of this document
This document provides an overview of the requirements for accessing WinCC’s databases using MS Office Access 2000 from a local machine, and across a network. It is not intended to be all-inclusive, and additional references on the subjects covered may be necessary.
II. Required Components
1. MS Access 2000
2. WinCC v5.0 SPI
3. User should have a working knowledge of Windows NT.
III. Steps for Accessing WinCC’s project databases using Sybase and MS Access 2000
Once a project has been created in WinCC, two databases are created in the WinCC project folder: The configuration database and the Runtime database.
The configuration database is named projectname.db, and contains configuration information for the project: Variable lists, alarm and trend archive definitions (not data), users, channel configurations, etc.
The runtime database is named projectnameRT.db and contains runtime data from Tag logging archives, alarm archives, and user archives.
Each database is identified by the GUID, or Global Unique Identifier. This GUID will be automatically entered as a Data Source Name on the PC where the project was created, and is used by other ODBC compliant databases to access its data. The specific GUID for a WinCC project database can be found in WinCC Explorer under project properties.
An example of the Splash projects GUID is shown here, and corresponds to the configuration database. The GUID for the Runtime database for this project would be the same, with a capitol R appended at the end: CC_Splash_00-07-07_09:10:37R.
To open this database from Sybase SQL Anywhere, do the following:
1. From the Windows Start menu, choose run, and enter ‘scview’
[pic]
2. Connect to the WinCC database you want to view – if WinCC is open, you need only enter the username and password: ‘dba’ and ‘sql’ respectively :
[pic]
You get this dialog by using the yellow database ‘can’ icon from the menu bar in Sybase, or using Tools -> connect.
This screenshot shows the tables in the configuration database in WinCC’s splash project. To see the data, right click on the table you are interested in, and choose view data.
There is a SQL Command window available that will allow you to execute SQL commands on the database contents, as well as many tools you can use to manage and export data.
To open the Runtime database, follow the same procedure, however from the Login Dialog, you would press the More button, and browse to the runtime database in the project folder, and enter in the same user name and password.
If the project is single-user, you will not be able to open the runtime database while WinCC project is activated. To do this, you will need to convert the project to Multi User mode from the WinCC Explorer project properties.
To Open the project database in MS Access, do the following:
1. Open a blank database in MS Access
2. Go to the Tables view, and right click, choose the ‘link table’ item:
3. From the next dialog, choose Files of type: ODBC Data sources:
[pic]
4. Choose the GUID of the data source you want to use:
[pic]
You can choose either the Configuration or Runtime database. The GUID of the project can be found in WinCC Explorer under Project Properties.
5. Choose the table or tables you want to link to from the next dialog:
[pic]
Here, we have chosen the table where users enter comments on Alarm logging sequence archives.
6. Next, choose which field in this table is the key field, or unique identifier:
[pic]
Here, we chose to make the date/time field the key field for our table.
6. The table will now appear in your Access database, and you can read and write to the table. Any changes you make here will be reflected in WinCC, although you may have to refresh the view in wincc.
[pic]
Accessing databases across a network:
You can use the same philosophy to access a WinCC database across a network. To do this, you need to create a User DSN on the machine you want to access FROM, using the ODBC 32 icon in Control Panel.
When the dialog comes up, press the Add button, and choose Sybase SQL Anywhere 5.0 driver, then choose finish.
Fill out the information on the connection dialog as shown:
[pic]
Note we have used the GUID in the database name field, and browsed to the actual database in the database file field.
Also note that we have NOT included the Database file name, and have checked network as the option:
If you actually put the database name in this field, (i.e. MyWinCCDDRT.db) then you will be able to access it when WinCC is not in runtime, but when runtime is activated, you wont be able to use the DSN – you will get an error.
If you leave it blank, the reverse is true: you will be able to use the DSN only when WinCC is in runtime, but NOT when WinCC is deactivated. If you need both, simply create 2 DSNs, one defining the RT database, and once configured as above.
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
Related searches
- how do i sell stocks i own
- i ask or i asked
- synonyms for i believe or i think
- i choose or i chose
- i think i found the one
- i bet or i ll bet
- humss cw mpig i 11 humss cw mpig i 12 humss cw mpig i 13
- i took a deep breath and listened to the old brag of my heart i am i am i am
- i feel like the things i should say are the things i can t say
- i have loved words and i have hated them and i hope i have made them right
- i looked and looked at her and i knew as clearly as i know th
- i e 577 02 9006 yah shua 577 02 9006 holy spirit i i e yah shu