帮忙翻译一下吧~~~~谢谢!!!!

0引言随着生产过程中自动化技术的提高,PLC由于可靠性高、使用方便等特点,得到了广泛的应用。但PLC的运算速度较慢,其控制算法较为简单,对于较为复杂的算法,其实现较为困难... 0 引言
随着生产过程中自动化技术的提高,PLC由于可靠性高、使用方便等特点,得到了广泛的应用。但PLC的运算速度较慢,其控制算法较为简单,对于较为复杂的算法,其实现较为困难或无法实现。因此,PLC与工控机之间的通信的实现,可充分利用工控机强大的运算功能,满足工业控制系统的需求。工控机与PLC进行通信的目的是满足系统运行情况监控的需要。不但对于大中型控制系统是必要的,小型控制系统对其监控也是有利于了解系统运行状况,及时发现运行故障,故障原因的查找及系统的恢复。若采用工控组态软件,其功能强大,以上目标可以很好地得到满足,但却由于价格昂贵,带来控制系统软件成本的大大增加。另外,由于组态软件系统架构的影响,其内含的功能对于某些控制系统的监控任务的特殊需求是无法满足的,功能扩展较为困难。因此,利用Windows通用编程开发程序,如Visual Basic开发小型控制系统的监控软件很有必要,采用这种方案的其中一个难点是工控机与PLC之间的通信问题。

1 PLC与工控机的编程口通信
三菱FX 型PLC与工控机之间进行通信,其通信方案有以下方案可供选择,如N:N网络、并行链接、计算机链接和无协议通信等。在通常的PLC控制系统中,PLC基本单元可通过配置串行通信模块或通信电路板的方式实现通信功能。
小型控制系统,为了尽可能的降低系统成本,利用FX。 系列PLC的编程口,在不增加系统硬件成本的条件下实现上位机与PLC通信。PLC编程口的基本功能是向PLC的用户程序区写入程序和程序的在线调试。从其功能上分析,其完全具备作为监控通信接口的功能,并具备读、写、置位及复位PLC内部软元件的能力。在控制系统的PLC程序调试成功之后,则编程口就基本上闲置,因此可以考虑采用PLC的编程口进行通信操作,相对于采用通信模块或通信电路板的系统,可节省硬件成本的支出,只需要一条编程电缆(如SC—O9或SC一11)就可以达到通信的目的。不过其缺点是该方案只适于对单台PLC进行通信,且通信距离较短。

2 编程口通信协议

2.1 通信端口的设置
采用PLC的编程口通信时,其通信参数的设置只需在工控机端进行相关参数设置,而PLC端不需对D8120通信格式数据寄存器进行任何设置。为了保证通信的进行,工控机串行通信端口应初始化设置如下:波特率9600 bit/s,采用偶校验方式,7位数据位,1位停止位。

2.2 通信协议的命令字
编程口通信协议中,计算机对PLC最基本的操作有以下几种:位或字元件的读操作、位或字元件的写操作、位元件的强制置位操作和位元件的强制复位操作,该协议中相关功能的命令代码如表1所示。

2.3 通信的命令帧格式
PLC与工控机之间进行编程口通信时,该通信过程是以工控机发出命令帧,准备读取、写入、置位或复位PLC的软元件;PLC在收到命令帧后首先识别并校验命令是否出错,若命令不可识别或校验错误,发出错误响应帧NAK(15H),而当命令校验无误,则由内部CPU 自动按照指定格式生成响应帧L3]。命令帧格式如表2所示。
展开
 我来答
黄花遍地开
2009-03-09 · TA获得超过1560个赞
知道小有建树答主
回答量:790
采纳率:0%
帮助的人:718万
展开全部
0 Introduction
With the production process automation technology improve, PLC because of high reliability, ease of use characteristics such as has been widely used. However, slower computing PLC, and its relatively simple control algorithms, for the more complex algorithm, its implementation is more difficult or impossible to achieve. Thus, PLC and IPC communication between the implementation, can take full advantage of IPC powerful computing capabilities, to meet the needs of industrial control systems. IPC to communicate with the PLC is designed to meet the system needs to monitor the situation. Not only for large and medium-sized control system is necessary to monitor small-scale control system is also conducive to their understanding of system operation conditions, the timely detection of operation failure, the cause of the malfunction of search and system recovery. If the IPC configuration software, and its powerful, well above the targets can be met, but because of the high cost of bringing the cost of control system software, greatly increased. In addition, the configuration because of the impact of software system architecture, which includes the functions of control systems for some of the monitoring mission are unable to meet the special needs of the functional expansion of the more difficult. Therefore, the use of Windows General Programming procedures, such as Visual Basic to develop small control system monitoring software is necessary to adopt such programs are one of a difficult point in IPC with the problem of communication between the PLC.

1 PLC and IPC programming mouth communication
Mitsubishi FX-based PLC and IPC communication between, and its communication programs have the following options, such as N: N network, parallel link, computer links and non-protocol communications. Usually at the PLC control system, PLC basic unit can be configured through the serial communication module or communications circuit board implementation of the way communication function.
Small control systems, in order to reduce system costs as much as possible, the use of FX. Series PLC's programming port, the system hardware at no additional cost under the conditions of implementation of the PC and PLC communications. PLC programming are the basic functions of the mouth to the PLC user program area of the write process and procedures for online debugging. Function on its analysis, its fully equipped with communication interface as the function of monitoring and have the capacity to read, write, home place and reset the internal soft PLC components capacity. At the PLC control system for program debugging success, then I would basically idle programming, it can consider the use of PLC programming port for communication operations, as opposed to the use of communication module or circuit board communications systems, can save hardware costs only need a programming cable (such as SC-O9 or SC 1 11) can achieve the purpose of communication. But its shortcomings are only suitable for the program on a single PLC to communicate, and short communications.

2 Programming Port Communication Protocol

2.1 communication port settings
PLC programming using the mouth communication, the communication parameters set up only at IPC client to carry out the relevant parameters set, and the client do not need to PLC communication format D8120 data register for any of the settings. In order to ensure the conduct of communications, industrial control computer serial communication port settings should be initialized as follows: baud rate 9600 bit / s, the use of dual parity means 7 data bits, 1 stop bit.

2.2 Communication Protocol command word
Programming Port Communication Protocol, the computer on the PLC to operate the most basic are as follows: bit or word elements read operation, bit or word write operation components, digital components of the compulsory purchase digital operations and digital components of the mandatory reset operation, The protocol-related functions in order code as shown in table 1.

2.3 communications command frame format
PLC and IPC communication between the programming port, the communication process is based on an order IPC frame, ready to read, write, purchase or reduction of the soft PLC components; PLC frame after receipt of an order first of all order to identify and check whether the error, if the command can not be identified or calibration error, send the wrong frame in response to NAK (15H), and when the command checksum correct, by the internal CPU automatically generated in accordance with the prescribed format in response to frame L3]. Command frame format as shown in table 2.
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式