WinCC
使用问题
•
WinCC
中如何与本地数据库
(
如
SQL SERVER
、
ORACLE)
进行数据交
换?
以下的测试将说明如连接远程的数据库:
Topic One: ODBC
Testing environment:
Primary PC with a WinCC, This PC, we named is Server.
Secondary PC with a Access DB, This PC, we named is Client.
Server PC and Client PC is connected by Ethernet.
Test step:
1.
The Server PC and the Client PC must config the DB server option. This is a very
important ODBC configuration step.
Control Panel -> SIMATIC Workstation -> Workstation Configuration -> TCP/IP
Configuration for Multiple Node Systems -> select the DB server option.
2. At the server PC node, active the WinCC project but do not running this project(This action
is only for the first time ODBC configuration at the client PC) . WinCC will build two ODBC
driver connections automatically, one is for RT Database and the other is for RC Database.
For example: "CC_u1_01-04-12_15:36:08R","CC_u1_01-04-12_15:36:08".
All of the jobs is over at the server PC node.
3. At the client PC node, open the contol panel folder and select the "Sybase SQL
Anywhere5.0" driver for configuration ODBC Driver.
Data Source Name
:CC_u1_01-04-12_15:36:08R (be named at the server PC node.)
User ID
: DBA
Password
: SQL
Server Name
: BJADLIJS_N (Server PC Node computer name)
Database Name
: CC_u1_01-04-12_15:36:08R (the same as Data Source Name)
Database File
: \\Bjadlijs\WinCC50_Project_u1\u1RT.db (the "WinCC50_Project_u1" is a
share directory by WinCC automatically and the "u1RT.db" is the WinCC RT database name.
you'd better search the "u1RT.db" file via the Browse button.)
At this time, we completed the ODBC configuration.
4. At the server PC node, Running the WinCC project( Don't forget to select the Tag Logging
option in the start up page, at the same time you could creat a form by user archive only for
test.)
5. At the client PC node, you could open an Access and import or link forms via an ODBC
driver that is builded at the step three.
•
如何正确使用第三方软件
(
如
VB)
对
WinCC
的
SYBASE
数据库进行操作,
应注意什么细节?
通过
ODBC,
可以使用第三方软件对数据库进行操作
(VB,VC,DELPHI).
下面是分别使用
DAO,RDO
和
ADO
方法对
WinCC
的
RT
数据库访问的简单例程
,
开发环境为
VB6.0: