组态王与 OPC的AB软件

在组态王Rockwell Automation PLC的连接。

Rockwell Automation A-B PLC是一个著名的可编程控制器产品。其产品体系基本上涵盖了工业控制产品的各个领域,并以产品的可靠而著称。在国内的PLC市场的占有率将近30%

由于A-BPLC的种类繁多,且各种类型的PLC支持的通信协议不尽相同,使得第三方的HMI软件都不能很好的与A-B PLC进行连接。RSLinx软件是A-B PLC通用的通信配置软件(2.2以上的版本支持对以太网的网关配置),目前主要有以下几个版本:RSLinx OEM RSLinx Professional RSLinx Gateway RSLinx SDK四个版本。且均支持OPC服务(2.3版以上支持OPC2.0)

组态王软件已内嵌了OPC服务功能,支持OPC客户端和OPC服务器的工作方式。这样组态王就可以很方便的与A-B PLC进行通信。

具体的配置方法如下:

在组态王与A-B PLC进行OPC的配置是必须要有A-B PLC及相关的通讯附件。

1、 安装A-B PLC 、通讯卡、相关的软件,并作物理连接

2、 使用RSLinx连接A-B PLC的通讯网络。

配置通讯卡(参加图-1),选择ConFigure Drivers

-1

弹出入下的配置窗口(参见图-2)

-2

选择对应的通讯卡,并进行端口配置(可参照附带的安装手册),配置成功后将显示所配置的设备的运行状态。


使用RSWho命令查找连接的PLC设备(参见图-3)

参见图-3

RSWho命令成功的执行后,将在设备列表中列出与本机连接的所有硬设备。

使用Topic Configoration来进行OPC服务的配置(参见图-4)

-4

Date Source配置框中配置Topic,选择一个物理设备(PLC),按New按钮即可建立一个Topic,单击Done即可(参见图-5)

-5

3、
在组态王中建立yOPC设备的连接。

添加OPC设备。在组态王的工程器中选择设备OPC服务器新建,则弹出如下的窗口(参见图-6)。在OPC服务器列表中选择RSLinx OPC Server选择确定即可。

参见图-6

在数据字典里加入IO(参见图-7)

在组态王的工程器中选择数据库数据字典新建。确定变量名、变量类型等变量属性,在连接设备中选择RSLinx OPC Server ;手工键入寄存器地址,地址的格式为:”[Topic]变量别名”Topic:变量寄存器地址。单击确认即可。

-7

4、 附加的文档,A-B提供的说明文件。

Public Groups
RSLinx does not support public groups. Public groups are an optional part of the OPC specifications. However, behind the scenes, if two clients request the same information from a single instance of RSLinx, RSLinx will not read the data twice from the target processor. It will provide the same data to both clients, which is similar in effect to public groups.

As of v2.31, RSLinx does not support OPC within the .NET framework. The current Automation Interface conforms to the Visual Basic automation interface standards used in previous versions of Visual Basic. VB.NET uses different underlying technology.

Future development is planned, but Rockwell Automation, like other OPC servers, must wait for an OPC .NET interface specification from the OPC Foundation.

This document will provide a comparison between RSData and the RSLinx OPC Automation interface and is intended to provide guidelines for converting an existing application. For the purpose of this document, the PokeNRequest example was converted from an RSData application to an RSLinx OPC Automation Application. Both applications are attached to this technote for your review and are provided as-is for demonstration purposes only.

This document applies to the following software versions. There may be slight differences in functionality with other revisions.

RSData 1.60.01

RSJunctionBox 1.60.01

RSLinx SDK 2.30.02 (Build 79)

VisualBASIC 6.0 with Service Pack 5


PLEASE NOTE: RSLinx SDK (9355WABCENE) provides documentation on how to use the Automation Interface, development support, and samples. All other flavors of RSLinx provide the Automation interface as-is (no documentation, no support, no samples).

A key difference between the two is that RSData (and the other RSTools) is an ActiveX control, which provides a user interface, properties, methods and events. The RSLinx OPC Automation Interface is an Object Interface which provides properties, methods and events but no user interface. The RSTools ActiveX controls are also data-bound controls which enable you to link directly to a database with little or no additional code. The OPC Automation Interface does not have this capability. You will need to write code to link to a database.

The following RSData Properties are NOT SUPPORTED with the RSLinx OPC Automation Interface.


The following RSData Events are NOT SUPPORTED with the RSLinx OPC Automation Interface.


The following RSData Methods are NOT SUPPORTED with the RSLinx OPC Automation Interface.


The following tables list the RSData Properties, Events and Methods that have an equivalent in the RSLinx OPC Automation Interface. In the following table, the information in italics is a code sample of the Property, Event or Method.

《组态王与 OPC的AB软件.doc》
将本文的Word文档下载,方便收藏和打印
推荐:
下载文档
热门推荐
相关推荐