组态王与AB PLC通过OPC的连接-精品文档资料.doc
《组态王与AB PLC通过OPC的连接-精品文档资料.doc》由会员分享,可在线阅读,更多相关《组态王与AB PLC通过OPC的连接-精品文档资料.doc(9页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、组态王与AB PLC的连接。Rockwell Automation 的A-B PLC是一个著名的可编程控制器产品。其产品体系基本上涵盖了工业控制产品的各个领域,并以产品的可靠而著称。在国内的PLC市场的占有率将近30%。由于A-B的PLC的种类繁多,且各种类型的PLC支持的通信协议不尽相同,使得第三方的HMI软件都不能很好的与A-B PLC进行连接。RSLinx软件是A-B PLC通用的通信配置软件(2.2以上的版本支持对以太网的网关配置),目前主要有以下几个版本:RSLinx OEM、 RSLinx Professional 、RSLinx Gateway、 RSLinx SDK四个版本。且
2、均支持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选择对应的通讯卡,并进行端口配置(可参照附带的安装手册),配置成功后将显示所配置的设备的运行状态
3、。使用RSWho命令查找连接的PLC设备(参见图-3)。参见图-3RSWho命令成功的执行后,将在设备列表中列出与本机连接的所有硬设备。使用Topic Configoration来进行OPC服务的配置(参见图-4)。图-4在Date Source配置框中配置Topic,选择一个物理设备(PLC),按New按钮即可建立一个Topic,单击Done即可(参见图-5)。图-53、 在组态王中建立y与OPC设备的连接。添加OPC设备。在组态王的工程器中选择设备OPC服务器新建,则弹出如下的窗口(参见图-6)。在OPC服务器列表中选择RSLinx OPC Server选择确定即可。参见图-6在数据字典里
4、加入IO点(参见图-7)在组态王的工程器中选择数据库数据字典新建。确定变量名、变量类型等变量属性,在连接设备中选择RSLinx OPC Server ;手工键入寄存器地址,地址的格式为:”Topic名变量别名”或”Topic名:变量寄存器地址”。单击确认即可。图-74、 附加的文档,A-B提供的说明文件。Public GroupsRSLinx does not support public groups. Public groups are an optional part of the OPC specifications. However, behind the scenes, if tw
5、o 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 c
6、urrent 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 specific
7、ation 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 applicati
8、on 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
9、.60.01 RSJunctionBox 1.60.01 RSLinx SDK 2.30.02 (Build 79) VisualBASIC 6.0 with Service Pack 5PLEASE 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
10、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 eve
11、nts 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 P
12、roperties are NOT SUPPORTED with the RSLinx OPC Automation Interface. Display Related PropertiesAutoColumnsCaptionTransparentGridOnScrollTopRowBackColorCaptionXGridWidthTabIndexBackStyleCaptionYHeightTabStopBevelHeightCausesValidationHelpContextIDTagBevelHighlightDecimalPlacesIndexToolTipTextBevelSh
13、adowDisplayCaptionLeftTopBevelStyleDisplayCaptionVerticalLeftBorderTopBordersBevelWidthDisplayPictureLinkTipTrailingZerosBorderColorDisplayValueLinkTipBackColorValueBackColorBorderInnerDragIconLinkTipForeColorValueColorBorderInnerColorDragModeLinkTipTextValuePadDownloadBorderStyleDrawDisabledShadowP
14、ictureValueShadowBorderWidthEnabledPicturePathValueShadowColorBottomBorderFlashEnabledPictureStretchValueTransparentCaptionFlashOnRightBorderValueXCaptionBackColorFlashSpeedScreenPriorityValueYCaptionColorFlashTimeScrollColumnHeightVisibleCaptionShadowFontScrollColumnWidthWhatsThisHelpIDCaptionShado
15、wColorGridColorScrollFirstColumnWidthDatabase Related PropertiesDataBindingsDataFormatDataSourceDataFieldDataMemberDataUpdateOther Unsupported PropertiesEndValueExpressionForReadWriteValueLinkErrorDisplayStartValueExpressionForWritePokeTypeSymbolUseStartEndValueThe following RSData Events are NOT SU
16、PPORTED with the RSLinx OPC Automation Interface. Display Related EventsClickGotFocusLostFocusScrollPosChangedDblClickKeyDownMouseDownValidateDragDropKeyPressMouseMoveDragOverKeyUpMouseUpOther Unsupported EventsLinkErrorLinkItemSupportedLinkOutOfMemoryLinkItemNotSupportedLinkNotifyLinkServerDisconne
17、ctedLinkUnableToConnectToServerThe following RSData Methods are NOT SUPPORTED with the RSLinx OPC Automation Interface. Display Related MethodsAboutBoxMoveShowValuePadDragSetFocusShowWhatsThisThe following tables list the RSData Properties, Events and Methods that have an equivalent in the RSLinx OP
18、C Automation Interface. In the following table, the information in italics is a code sample of the Property, Event or Method.RSDataRSLinx OPC Automation Interface EquivalentPropertiesLinkServerMyRSData.LinkServer = RSLinxOPCServer.ConnectOpcServer.Connect RSLinx OPC ServerLinkTopicMyRSData.LinkTopic
19、 = MyTopicThese two properties are combined in the AddItems Method of the OPCGroup object.OpcGroup.OPCItems.AddItem PLCS:23, 1LinkItemMyRSData.LinkItem = S:23LinkModeMyRSData.LinkMode = 1, 2, or 3These three properties are combined in the IsSubscribed Property of the OPCGroup object.OPCGroup.IsSubsc
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 组态王与AB PLC通过OPC的连接-精品文档资料 组态 AB PLC 通过 OPC 连接 精品 文档 资料
限制150内