例程-RSLinx通信设置
- 格式:pdf
- 大小:730.37 KB
- 文档页数:5
【教程】RSLinx软件安装及与上位机通讯设置一、软件安装1、安装打开RSLinx安装包,进行安装。
安装过程中提示输入序列号的时候,输入 “1234567890”10位数即可。
2、授权安装好后制作授权。
运行授权文件夹\dekart private disk 2.03文件夹的PrvDisk.exe,在弹出的“磁盘”选项卡里,点“连接”按钮,在弹出的查找范围内选择AB_Dpd文件夹里的AB all key_123456.dpd,密码输入“123456”。
这样系统自动生成一个虚拟的Z盘,再点“开始“--所有程序---rockwell softwareutilitiesmove activation。
在弹出的对话框,from drive选Z:,to drive选D:,点OK,再点MOVE就好啦。
二、配置通讯1. 设置IP地址打开电脑网络连接,设置本地连接的TCP/IP属性如下。
IP 地址: 192.168.4.XXX子网掩码: 255.255.255.02. 设置通讯路径打开电脑,选择“开始”――“程序”――“Rockwell Software”――“Rslinx”,打开Rslinx,选择菜单栏“Communications”――“Configure Drivers”,在“Available Driver Types”里选择“Ethernet device”,单击“Add New”,出现一对话框;如上图,选择合适的name(三鼓写AB_ETHZCX3,两鼓写AB_ETH1)后,单击“ok”后,出现下面的对话框:如图,将station列的0行输入正确的ip(192.168.4.200),点确定。
返回,在“Communications”――选择“RSWho”,点AB_ETHZCX3,联机的话就可以找到所有的PLC模块和DeviceNet网络上的设备。
通讯管理工具RSLinxRSLinx是罗克韦尔自动化公司为用户提供的通讯管理软件,它运行在Windows操作系统的计算机上。
用户只需选择一种从该计算机到工业控制网络上任一模块的通讯方式,就可以通过该软件建立起与工业控制网络上所有设备的通讯。
RSLinx操作举例(计算机到Logix处理器为串口连接):1) 用户选择从计算机到网络的通讯方式:串口方式2) 用户检查计算机上相关通讯卡件是否已经安装,连接电缆是否正确:使用1756-CP3连接计算机和处理器。
3) 点击RSLinx“communication(通讯)”下拉菜单中的“Configure Drivers(配置驱动方式)”选项。
4) 在“available drivers(可用驱动方式)”中选择“RS-232 DF1 devices”,再点击“add new”选项,并选择OK。
置)”,等待运行结果后选择OK。
6) 点击RSLinx“communication(通讯)”下拉菜单中的“RSWho”选项,就会弹出整个工业控制网络的树状浏览画面(见下图)。
注:用户还可点击浏览画面中的“”,以进一步浏览其所延伸的网段。
模块升级工具ControlFLASH:罗克韦尔自动化公司新一代控制平台中的大部分模块都是“内置微处理器+功能软件(firmware)”的智能模块,并且功能软件(firmware)均存储在可重复刷新的存储器中。
用户只需使用最新版本的ControlFLASH软件,对模块进行刷新即可实现模块升级,从而保证客户采购的模块在很长的使用时间内都能与新技术以及增强功能相适应。
ControlFLASH可单独运行在Windows操作系统的计算机上,也可内嵌在Logix5000控制编程软件中。
用户通过RSLinx建立起计算机到待升级模块的通讯通道后,即可运行该软件。
在软件中用户根据画面提示依次选择设备目录号、新的功能软件版本号(firmware revision)即可。
1、PC上编写的上位机软件若与罗克韦尔的PLC进行通讯,可以通过罗克韦尔的官方软件RSLINX进行DDE通讯。
如下图所示:2、对RSLINX进行设置注意:若要进行DDE通信,需要对RSLINX进行破解。
具体破解方法请百度。
破解后RSLINX显示为RSLINX 。
点击命令窗口中的Communications->Configure Drivers下拉选择第二项RS-232 DF1 devices。
点击Add New.->OK弹出如下界面确保PLC与PC已经通过串口线相连,并且PLC已经上电。
打开电脑的设备管理器,查看连接PLC 的串口编号。
将串口编号填入RSLINX界面,然后点击Auto-Configure.若连接成功,则如下显示。
成功后点击OK,然后关闭Configure Drivers界面。
点击如下小红框,则出现如下界面,表示已经通信上了。
3、建立DDE连接。
点击RSLINX软件界面上的DDE/OPC->Topic Configuration.点击NEW->设置topic名称->点击如下红框3所示->apply->done则已经设置完成。
4、上位机软件与RSLINX进行通讯。
笔者所用的上位机软件平台为LABWindows/CVI.首先,确保RSLINX软件已经打开。
用这条语句与RSLINX进行握手。
ConnectToDDEServer (&plc_datalink, "RSLinx", "rslinx_dde", clientCB, 0)其中的rslinx_dde为刚才设置的topic名称。
RSLinx为软件名称,plc_datalink为int连接句柄变量。
接下来就可以通过操作RSLINX操作PLC 了。
//通过这条语句就能让PLC里面的B3:3/9寄存器置1.ClientDDEWrite (plc_datalink,"B3:3/9", CF_TEXT,"1", 1, 0);//通过这条语句就能读取PLC里面的B3:3/9寄存器的值。
XP/Win7系统下AB logix5000软件安装步骤首先要安装的是RSlinx软件,此软化是AB自动化产品中电脑跟plc相连通信的必备软件,此软件版本众多,但安装方法基本相同,开始安装RSlinx的是2.31版本,安装完毕后电脑无法与plc相连接,当时通讯所需的设置方法正确。
后来下载的2.57版本安装上后通讯正常了。
安装方法非常简单,在此就不说了。
下图为安装RSlinx时的一个截图。
上面说的安装方法是在XP下进行的,如果是在win7系统下安装方法跟上面相同,唯一的区别是安装完毕RSLinx软件是打不开的,解决办法在论坛有这样一个解决方案,原话如下:1.Open 'RSLinx Classic Launch Control Panel' via: Start=> Program =>Rockwell Sof2.tware =>RSLinx =>RSLinx Classic Launch Control Panel;2.Click 'Stop' button;3.Disable 'Always run as services';4.Click 'Start' button again.The icon of RSLinx Classic will display.按照上面的方法操作,再打开RSlinx就能打开了。
这点区别就是两个系统下安装rslinx的唯一区别,其他软件相同。
按照上面的操作,RSlinx软件完美运行。
安装完RSlinx软件后,再安装RSlogix5000.安装的方法也是非常简单,安装过程基本是傻瓜式安装,不用管,一步步安装,直到完成,安装完成为止。
当然也可以根据自己需要选择自定义安装,安装的过程中基本都是同意,OK 忽略等操作。
安装方法简单,网上也有很多教程,在此就不多说了。
下面着重讲解网上说的较少的授权方法。
应用RSLinx Classic建立OPC通信OPC(OLE for Process Control)是由微软提供的基于OLE技术的一种通信标准,被设计成允许客户端的应用软件以兼容的方式访问底层数据。
OPC为应用软件从任何数据源访问数据提供了公共通道,有了OPC,不同种类的计算环境的系统集成变得非常简单。
RSLinx Classic是一个OPC适应的服务器。
建立OPC对控制器的数据采集步骤如下:1、在RSLinx Classic的OPC为控制器建立相应的Topic,选择DDE/OPC->Topic Configuration…2、点击Topic Configuration…进入Topic组态的数据源页面,点击底部,新建Topic,命名OPCTEST。
每个Topic都有对应的硬件设备,如果希望对同一个控制器有不同的数据采集时间,可以建立多个Topic,右侧的数据采集和通信路径详细地对Topic进行组态。
3、选择在线控制器192.168.1.100,点击Apply->Done。
4、OPC数据可以被第三方软件访问,要想测试OPC是否采集到数据,使用OPC Test Client来检查。
在开始菜单中选择该工具,如图。
5、进入该软件界面,点击,选择OPC Server。
在列表中列出了可选的Server,选择,点击OK,进入工作界面。
6、点击,建立新Group,Name为OPCML1400。
7、建立新Item,可以看到新建的名为“OPCTEST”的Topic,8、点击“Online”,可以读到当前控制器中的标签。
在右侧点击添加标签,继续添加选择,完成后点击。
9、打开OPC Test Client监测变量标签10、运行RSLogix500程序,打开500软件标签列表,同时打开OPC Test Client,可见当梯形图运行时,位变量改变,OPC Test Client 列表中变量也同时改变,即OPC可以读到标签改变。
RS--Linx软件应用(一)一、RSLinx通信软件概述RSLinx系列软件是用于AB公司可编程控制器的服务器软件,为AB公司的PLC处理器与罗克韦尔自动化以及其它公司的(如微软)的许多软件产品提供了通信连接。
通过RSLinx通信软件可以在PC机上显示整个网络的结构和各网络节点的工作状态。
RSLinx具有DDE功能,通过它能为应用DDE协议的商业软件(如微软的Excel)提供网络上各节点采集到的设备数据,实现数据显示与登录或作数据趋势图分析等功能;用户还能够从管理计算机设定多个独立的参数,通过RSLinx软件,在控制网网络上处理实时数据;同时该软件在人机界面和PLC编程软件之间、在PLC编程软件和对应的PLC的处理器之间起通信连接作用。
如下图:由上图可以看出,RSLinx充当的是通信和数据交换的服务器。
通过RSLinx与工业控制网络连接的通信协议以及通信通道后,个人计算机和装在其上的应用软件如RSLogix、RSNetWorx、RSView32等才能和控制网络建立通信关系。
目前RSLinx有6个版本:RSLinx Lite:•提供最低的功能以支持Rockwell Software和从AB购买的应用软件;•该版本不作为独立的商业软件出售,而是捆绑在其它需要直接访问RSLinx网络驱动程序的产品上。
•该版本不支持动态数据交换(DDE)或已公布的RSLinx C应用编程接口(API)。
•它支持许多Rockwell Software可编程控制器的编程产品也所选择的A-B自动化产品的通信。
•如果安装了RSLinx 或RSLinx OEM 而无合适的激活文件,则安装的软件就回复成RSLinx Lite。
RSLinx Single Node:•包括必需的功能以支持Rockwell Software产品的通信服务。
•支持OPC和DDE接口,但仅支持一个设备。
•不支持RSLinx C应用编程接口(API)RSLINX OEM:•RSLinx OEM包括必需的功能以便支持与所有Rockwell Software可编程控制器与MMI产品的通信•它具有RSLinx Lite所有的功能,加上限于Rockwell Software产品的AdvanceDDE,它还支持用户使用RSLinx C 应用程序编程接口(API)开发的应用程序•该产品支持众多软件商使用RSLinx C SDK (Software Development Kit)开发的应用程序。
Product Overview RSLinx for Allen-Bradley programmable controllers is a complete factory communications solution for the Microsoft ®Windows NT ®and Windows ®95/98operating systems.It provides PLC ®processor connectivity for a wide variety of Rockwell Automation products, such as RSLogix5/500™, RSView32™,RSBatch ™, PLC-5®A.I.Series ™Ladder Logistics™and PanelBuilder ™software.Its AdvanceDDE ™interface provides optimized communication to our HMI and component software products, as well as custom DDE applications or off-the-shelf DDE-compatible applications such as Microsoft Excel ™or Microsoft Access ™.The RSLinx OLE for Process Control (OPC) interface provides an industry-standard exchange mechanism optimized for performance.Its C Application Programming Interface (API) supports communication to custom applications developed using the RSLinx C SDK ™.RSLinx can communicate to multiple clients concurrently while managing device connections on any of the defined Allen-Bradley networks.Its architecture is designed as a true 32-bit application to take full advantage of features incorporated into Microsoft’s new operating systems.A New Look – RSWho RSWho is the new network browse interface replacing the old Superwho.It provides improved functionality in an intuitive, user-friendly Windows Explorer style environment.View all active networks from a single window.Simply point and click to navigate through the network hierarchy to view the desired information.No more single driver viewing! Just expand a node and see remote devices on the other side of the bridge!Y ou can view devices as an icon for a quick visual on device type or display detailed information such as device type and status.Inactive devices are displayedwith a red X.By simply selecting the item of interest and clicking the right mouse button, a context-sensitive menu is displayed to perform such actions as configuring a DDE/OPC Topic or displaying diagnostic information.An Industrial Communication Hub RSLinx provides a complete driver suite for all of Allen-Bradley communication and information networks.This packaging provides a complete solution for your network configuration needs from older legacy networks supportedby remote routing through 1785-KA, 1785-KA5, 5130-KA,and 5820-EI to the newer more capable ControlLogix Gateways.It supports communication hardware ranging from serial port devices (1770-KF2, 1770-KF3, 1770-KFC,1770-KFD) to PC based network cards (1784-KTX, 1784-KTC, Ethernet).The table on the right lists the supported device/networks.ConnectivityEthernet to PLC-5 / SLC 5 / 5820-EI / 1756-ENET 1784-KTX / KTXD / PKTX / PCMK / KT / KT2 to DH+1784-KTX / KTXD / PKTX / PCMK to DH-4851784-KTCX to ControlNet1784-PCC to ControlNet1784-PCD / PCIDS to DeviceNet (Windows NT)DF1 to 1770-KF2 / 1785-KE to DH+DF1 to 1770-KF3 / 1747-KE / 1747-PIC to DH-485DF1 to PLC-5 / CH0, SLC / CH0, MicroLogix, PanelViewDF1 to 1770-KFC to ControlNetDF1 to 1770-KFD to DeviceNetDF1 Polling MasterDF1 SlaveSoftLogix 5 Controller (Windows NT)Remote Devices via RSLinx GatewayDDE/OPC Client ConnectivityRSLinx provides connectivity for client applications using OPC or multiple DDE data formats.The OPC and AdvanceDDE interfaces provide optimized read operations by packing multiple requests from multiple clients in a single transaction.In configuring a DDE T opic, you can specify whether or not you want DDE poke operations optimized. The benefit of optimizing DDE poke operations is packing multiple updates in a single write operation, thus reducing the overall number of packets required.Operations such as downloading a recipe can take advantage of this feature.Other DDE formats supported include FastDDE™(for Wonderware®clients), XL_T able, and CF_T ext to support Microsoft Office™products and other generic DDE clientCustom Applications through C SDK RSLinx C SDK for Allen-Bradley Programmable Controllers is the Software Development Kit used for creating custom applications utilizing thecommunications capabilities of RSLinx.It contains development files, sample programs, online documentation, and a copy of RSLinx OEM;everything needed to create custom applications that can communicate with devices connected to RSLinx.Selecting the Right Package RSLinx is available in packages to suit a wide varietyof features and functionality.It is the core communication component integrated with manyRockwell Automation products providing connectivity to plant floor devices for programming and monitoring.RSLinx OEM is the package of choice if your client application only needs AdvanceDDE communications.The standard version of RSLinx provides AdvanceDDE, CF_T ext, XL_T able, or FastDDE communications to any client that can act as a DDE client.RSLinx C SDK is a software development kitthat enables development of custom applications toaccess the communications capabilities of RSLinx.Technical Specifications•IBM ®-compatible 486/66 or greater•Microsoft Windows 95 (with DCOM95), Windows 98or Windows NT (Version 4.0 or later)•16 MB of RAM minimum (32 MB recommended)•15 MB of free hard disk space (or more based on application requirements)•16-color SVGA Graphics Adapter 800 x 600 or greater resolution (256-color recommended)•Ethernet card and/or Allen-Bradley communicationsdevice or cable depending upon the applicationFor More InformationFor more information on the latest pricing or a demonstration of any Rockwell Software package,please contact your local Rockwell Automation sales office or authorized Allen-Bradley distributor.For the very latest on Rockwell Software product development, visit our Web site on the Internet at ©2000 Rockwell Software Inc.All rights reserved.Printed in the United States of America.RSBatch, RSLinx, RSLinx C SDK, RSLinx Gateway, RSLinx OEM,RSLogix 5/500, RSView32, A.I.Series, Ladder Logistics, AdvanceDDE, FastDDE, WINtelligent LINX, and the Rockwell Software logo are trademarks of Rockwell Software Inc.PanelBuilder and SLC are trademarks, and PLC and PLC-5 are registered trademarks of the Allen-Bradley Company.Access and Excel are trademarks, and Microsoft, Windows and Windows NT are registered trademarks of the Microsoft Corporation.All other trademarks are the property of their respective holders and are hereby acknowledged.Doc ID 9398-LINXTD-03.01.00Argentina • Australia • Austria • Bahrain • Belgium • Bolivia • Brazil • Bulgaria • Canada • Chile • China,People’s Republic of • Colombia • Costa Rica • Croatia • Cyprus • Czech Republic • Denmark • Dominican Republic • Ecuador • Egypt • El Salvador • Finland • France • Germany Ghana • Greece • Guatemala • Honduras • Hong Kong • Hungary • Iceland • India • Indonesia • Ireland • Israel • Italy • Jamaica • Japan • Jordan Kenya • Kuwait • Lebanon • Macau • Malaysia • Malta • Mauritius • Mexico • Morocco • The Netherlands • New Zealand • Nigeria • Norway Oman • Pakistan • Panama • Peru • Philippines • Poland • Portugal • Puerto Rico • Qatar • Romania • Russia • Saudi Arabia • Singapore Slovakia • Slovenia • South Africa,Republic of • Spain • Sweden • Switzerland • Taiwan • Thailand • Trinidad • Tunisia • Turkey • United Arab Emirates • United Kingdom • United States • Uruguay • Venezuela • Vietnam • Zimbabwe。