求一篇关于成本财务报表外文文献的外文译文,要求附原文,不少于3000字符,谢谢。

有关信息管理与信息系统的外文文献 翻译成中文大概3000字左右,外文字符大约10000个字符, 谢谢。_百度知道
有关信息管理与信息系统的外文文献 翻译成中文大概3000字左右,外文字符大约10000个字符, 谢谢。
我有更好的答案
到万方瞧瞧,我去那里找过论文,可惜没下载下来,在淘宝上看到了《翰林书店》店铺,店主帮我下来的,第一次这样操作,不错。
采纳率:35%
为您推荐:
其他类似问题
外文文献的相关知识
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。求一篇经济类外文文章,最好有中文翻译(3000字符左右)谢谢啊_百度知道
求一篇经济类外文文章,最好有中文翻译(3000字符左右)谢谢啊
我有更好的答案
去大学里的期刊数据库里去找吧,一大把一大把的
为您推荐:
其他类似问题
中文翻译的相关知识
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。可以给我同样一篇机械方面的外文吗,也是3000字左右,带中文翻译的,谢谢了啊,毕业设计急求啊_百度知道
可以给我同样一篇机械方面的外文吗,也是3000字左右,带中文翻译的,谢谢了啊,毕业设计急求啊
我有更好的答案
这叫论文作假!方舟子饶不了你!!!!!!!
不是吧,这也叫造假啊
应该吧!呵呵!不过这种事情最好自己写,免得将来麻烦,而且网上也不好找!
为您推荐:
其他类似问题
您可能关注的内容
中文翻译的相关知识
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。求一篇关于成本控制的外文文献(要有英文原文和译文和作者出处),谢谢了_百度知道
求一篇关于成本控制的外文文献(要有英文原文和译文和作者出处),谢谢了
或者是跟成本沾边的都可以,但是必须要有原文和译文还有作者出处,麻烦大家帮帮忙
我有更好的答案
我以为需要啊,各位大侠帮帮忙
为您推荐:
其他类似问题
您可能关注的内容
外文文献的相关知识
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。附件清单 10 外文文献翻译译稿 1:设计与实现基于 Modbus 协议的嵌入式 Linux 系统彭道刚 1,2,张豪 1,2,杨丽 1,李慧 (1。 200090 电力学院电力与自动化工程,上海电力学院,上海,中国; 2。 CIMS 工程 研究中心,同济大学,上海 200092,中国)摘要:随着嵌入式计算机技术的飞速发展,新一代工业自动化数据采集和监测系 统,采用核心的高性能嵌入式微处理器的,该系统很好地适应应用程序。它符合 消费等的严格要求的功能,如可靠性,成本,尺寸和功耗等。 在工业自动化应 用系统,Modbus 通信协议的工业标准,广泛应用于大规模的工业设备系统,包 括 DCS,可编程控制器,RTU 及智能仪表等。为了达到嵌入式数据监测的工业自 动化应用软件的需求,本文设计了嵌入式数据采集监测平台下基于 Modbus 协议 的 Linux 环境采集系统。串行端口的 Modbus 协议是实现主/从式,其中包括两种 通信模式:ASCII 和 RTU。因此,各种药膏协议的设备能够满足串行的 Modbus 通信。在 Modbus 协议的嵌入式平台实现稳定和可靠。它在嵌入式数据监测自动 化应用系统的新收购的前景良好。 关键词:嵌入式系统,嵌入式 Linux,Modbus 协议,数据采集,监测和控制。 1、 绪论 Modbus 是一种通讯协议,是一种由莫迪康公司推广。它广泛应用于工业自动化, 已成为实际的工业标准。 该控制装置或不同厂家的测量仪器可以链接到一个行业 监控网络使用 Modbus 协议。 Modbus 通信协议可以作为大量的工业设备的通讯 标准,包括 PLC,DCS 系统,RTU 的,聪明的智能仪表。随着嵌入式计算机技术 的飞速发展, 嵌入式数据采集监测系统, 使用了高性能的嵌入式微处理器为核心, 是一个重要的发展方向。 在环境鉴于嵌入式 Linux 的嵌入式工业自动化应用的数 据,一个 Modbus 主协议下的采集监测系统的设计和实现了这个文件。因此,通 信设备,各种药膏协议能够满足串行的 Modbus。 2、 Modbus 协议简介 Modbus 协议包括 ASCII 码,RTU 和 TCP 传输模式,支持传统的 RS - 232 和 RS - 422,RS - 485 和以太网设备。至于串口的 Modbus 设备,控制器,在标准 的 Modbus 网络协议可以建立在两个传输模式:ASCII 模式或 RTU 模式种。至于 以太网的 Modbus 设备,传输模式是 Modbus / TCP 协议。相同的传输模式和参数 必须选择在网络上所有设备的 Modbus。 Modbus 协议是独立于硬件。取而代之的是物理层,它只定义了利用结构的 资料,该控制器能够区分的。然而,网络式的沟通是没有定义。 Modbus 协议规 定了信息和数据结构,指挥和响应方式。该协议以主/从方法用于数据通信。主 机发出的请求信息, 而从机产生响应信息和主返回到正确的信息作出反应的要求 后接收。主机还可以将信息发送到修改了数据的从机。 Modbus 协议需要验证数据。串行协议具有校验,此外,ASCII 模式采用 LRC 校验,RTU 模式和使用 16 CRC 校验。但是,TCP 模式没有额外规定检查,因为 TCP 协议是一个可靠的协议,面临的连接。此外,使用的 Modbus 主从方式,接 收和发送在固定时间内的资料。在实务上,如果某些从属设备分开,主可以诊断 它,故障被修复后,网络可以自动连接。因此,Modbus 协议是可靠的。 由于 Modbus 协议的消息结构,每个控制器需要一台设备的地址,这是用来 区分消息和法官会采取什么行动进行。如果响应是必要的,控制器将产生答复和 Modbus 协议传送到查询的一面。 表 1 的 ASCII 和 RTU 的 Modbus 协议模式比较。 正如表 1 所示的模式, ASCII 在 已经开始和结束标记, 使它很方便的程序处理。 由于 ASCII 模式传输 ASCII 字符, 可以阅读, 因此它是视觉调试。 此外, 它是相对容易实现 ASCII 模式法改会检查。 但正如 ASCII 模式传输可读字符,传输效率比较低,比较与 RTU 模式,因此,一 般来说,当大量的数据将被传输,RTU 模式大多是选择。 表.1、比较 ASCII 和 RTU 模式3、该系统的设计 正如图 1 所示,它是嵌入式数据采集系统的总体结构图。在这个系统中,嵌 入式数据采集平台是核心和控制设备的数据通信与嵌入式数据采集平台的 Modbus 协议的 Modbus 从站通过各种。因此,数据采集,数据分析后,通过 TCP / IP 是实现预处理的数据传输给操作员和工程师监测中心站。图 1 系统的体系结构 工业级微处理器是 Atmel 公司的 AT91RM9200 的作为嵌入式数据采集平台的 核心。 在嵌入式数据采集平台集成多种周边连接此外, 包括串口, CAN 总线接口, 使 AD / DA 接口,RS485 接口,SD / MMC 卡读写器,JTAG 和调试调试接口等,1 8 英寸 TFT 真彩色液晶显示屏,它可以在数据可能被用于演示,也有触摸屏的功 能,也集成在该平台。嵌入式 Linux 操作系统中使用的嵌入式数据采集平台,以 及 Modbus 协议主功能得以实现。因此,嵌入式平台,可以通过串口读了 Modbus 协议奴隶的数据,并显示在 LCD(触摸屏)被处理后,分析和数据。同时,可以 传输数据,通过以太网接口的嵌入式平台,以供进一步的监测和管理监测中心经 过分析和处理中。 4、 设计与 Modbus 协议的嵌入式 Linux 环境下执行 4.1、嵌入式 Linux 系统及移植 随着 Linux 的发展方向之一,嵌入式 Linux 有许多成功和成熟的产品。稳定 性,可靠性和高效率的嵌入式 Linux 正在证明了的事实。嵌入式 Linux 开放的源 代码,提供技术支持,具有良好的可扩展性广泛,支持多种硬件。所有这些都是 嵌入式 Linux 的优势。该系统采用嵌入式的硬件环境为 Linux 操作系统和 ARM9。 目前,臂 Linux 支持公司的一系列的 ARM 处理器,包括 ARM610,ARM710, ARM720Tcores,ARM920Tcores,StrungARM110,SrtongARM1100,XScale 和等是 Atmel 的 AT91RM9200 的板的使用为目标,在这个文件。从标准 Linux 不同,它 必须开始从闪存或 ROM 中。美国启动用作本文启动程序。图 2 一般臂步骤 Linux 的移植 为了手动移植 Linux 操作系统,它也需要各种资源 Linux 驱动程序。如果该 设备是由他们自己设计的,它需要编写相应的驱动程序。 Linux 的移植的一般 步骤如图 2。 至于到了 ARM 内核和文件系统的 Linux,u - boot 的是先通过串口下载到开 发板, 然后使用串口或网络的方法。 由于内核和文件系统的反映是相当大的文件, 通过串行端口传输速度缓慢;以太网模式用于下载内核和文件系统。当然,网络 的 U - Boot 的参数需要在下载前处理。 根据建立的 u - boot 命令模式的 u - boot 的网络参数: TFTP 服务是运行在服务器上,然后编译内核和文件系统映像的图像被添加 到服务器的目录。服务器和网络开发板与电缆连接,然后,内核和文件下载到系 统的内存通过运行启动命令行下面的命令下的 u - boot:已编译的 Linux 可以操作臂后进行 bootm 。内核和文件系统中的 内存可以通过闪存写入启动处长秩序的 u。 该系统能自动运行后, 设置启动参数。 然后程序操作的开发板。 4.2、串行配置的 Modbus 协议在 Linux 环境下 标准的 Modbus 串行协议使用的 RS232/RS485 传输。 串行设备设备节点为/ dev/ttyS0 来 (COM1 端口) dev/ttyS1 COM2 端口) Linux 环境。 和/ ( 在 由于 Modbus 串行协议包括两种传输模式:ASCII 和 RTU 模式。起始标记和结束标记的两种模 式是不同的。此外,每个信息包数据的位置也不同。因此,必须单独处理。以 RTU 模式为例,介绍在 Linux 环境下的 Modbus 串行协议配置。 头文件由串行操作需要的是:当 Modbus 协议的特点是采用 RTU 传输模式下,串行波特率,数据位,停止 位置,检查位置和控制应根据设定的框架特征的信息。 建立串口波特率: 串行数据建立的立场,停止位置,检查位置:初始化控件的特征:4.3、Modbus 协议的串行软件设计 这里主要介绍了方案的设计与实现串行 Modbus 协议,其中包括两种传输模 式 RTU 和 ASCII。在 Modbus 主机服务包括人机交互模块,功能选择模块,功能 处理模块和返回处理模块。每个模块的功能是实现了在嵌入式 Linux 环境。 人机交互模块是为用户和平台的通信模块。它主要实现了网页打印功能,用 户信息的输入和指导等。 该函数的选择模块是平台选择的 Modbus 主函数的选择参数根据用户输入的 信息。这些参数包括传播方式的,服务类型,从站地址等。 该函数处理模块是这个平台的核心。它包括串口初始化的功能,结构的 Modbus 帧, 模态分析的 Modbus 帧, 各类业务处理和业务处理等 6 种主要的设计, 其中包括:为串行的 Modbus 设备在这个平台阅读线圈状态,读输入状态,读保 持寄存器,读输入寄存器,写,写单线圈单登记。这 6 种的模式涵盖了 Modbus 的基本功能需求。而这是非常方便的扩大,如果必要的其他职能。 返回处理模块流程操作平台的结果。如果用户请求的服务流程成功,服务结 果将通过标准打印输出设备, ,否则错误信息打印。 在设计中,以使其得到方便。功能参数,是一个结构的定义如下:凡 slave_address 就是从站地址。一个 Modbus 网络允许最多 255 个从站。 该函数是服务模式的选择特点, 并有六种服务模式在本系统提供的, 分别为 1-6。 该 start_address 是 16 位字符,这是目前从站供电设备的起始地址。该 pointnum_or_setdata 包括 2 种文字,服务 1-4 是点头人数增加经营,服务 5 和 6 是 16 位字符正在建立。 图 3 函数的程序处理模块的 Modbus 主流程图 图 3 是函数的程序处理模块的 Modbus 主流程图。该方案首先确定了格式字 符值,建立了传输模式,用户需要,这将决定哪些串行配置功能和服务功能什么 样的选择。然后设置串口参数在 Linux 环境。相应的服务结构功能是通过判断用 户的请求服务类型的选择。例如,如果格式为 0,采用 RTU 模式。该函数是 1, 这意味着用户请求读取线圈。 该方案通过使用 construct_rtu_frm 构造函数是由 rtu_read_status 函数调用的 Modbus 的请求帧。该方案保留了串行传输缓冲区 mod_tx_buf,这是事先定义它,然后把通过调用命令的 Modbus 串行传输请求帧。 如果程序设定的时间内得到答复框架, 该方案将处理答复帧通过调用相应的模式 解析函数。举例来说,当是 ASCII 传输模式,在 ascii_data_anlys 函数被调用, 如果传输模式是 RTU 模式,然后 rtu_data_anlys 函数被调用。解析函数的分析 数据,接收缓冲区接收串行。如果答复框架分析是正确的,该函数将数据加载到 目标缓冲区。如果是错误的,该函数将终止这项服务,并处理错误,打印错误信 息了。 4.4、服务的结构和功能分析框架 以读持有注册服务为例,介绍了施工过程中要求的 Modbus 帧。该函数读取 保存寄存器数是 03 和建设要求的 Modbus 帧是实现通过 rtu_read_hldreg 和 ascii_read_hldreg 功能。前者实现了 RTU 的框架结构,而后者的 ASCII 框架结 构。该 rtu_read_hldreg 结构如下所示: 输入参数 board_adr 就是从站地址, 用户需要访问的。 是缓冲区的 com_buf 了 Modbus 帧传输领域。该 start_address 是访问的起始地址和长度 lenth 是访 问的。所有这些变量,则是通过结构模块参数的人机互动。 高()和低()是两个定义的函数。该高()是为了获得高的 8 位,低() 是获得低 8 位。该 construct_rtu_frm 功能是 RTU 的框架结构。所有的服务都是 通过调用此函数实现,形成 RTU 的请求帧。其结构如下所示:经过这些步骤, 一帧请求已完成制作。 最后, 为了写 (fd, mod_tx_buf, tx_len) 是通过调用串行端口发送和传输缓冲区的请求的 Modbus 帧传输。 tx_len 是服 凡 务构造函数返回值。 请求帧传输后,该方案将等待从站回应。为了避免无休止的循环机制,通过 检测从站没有回应,建立一个加班。如果从站并没有在预定时间响应,程序产生 一个错误消息并停止该服务。 如果服务程序在预定的时间收到答复框架, 分析了通过调用解析函数的答复 时限。该模式结构的 RTU 解析函数如下: 5、结论 Modbus 通信协议的广泛使用,已成为事实上的工业标准,其实。它是用大 量的工业设备作为它们之间的通讯标准,包括 DCS,可编程控制器,RTU 通讯, 智能仪表及监控系统等新一代工业自动化数据采集采用高性能嵌入式微处理器 为核心。因此,它适应应用程序很好地满足功能性,可靠性,成本,体积,功耗 等严格要求, 为了达到嵌入的数据监测的工业自动化应用, 系统采集要求 Modbus 协议的主站上的嵌入式数据采集监测 Linux 环境下的平台,是本文设计的基础。 每个从站之间的通信实现。根据掌握的 Modbus 的嵌入式 Linux 环境服务程序运 行稳定,可靠的测试后,Modbus 协议。它提供了良好服务的 Modbus 主站,并符 合标准的 Modbus 协议。其在工业自动化数据采集监测系统的新一代应用前景非 常好。 6、 鸣谢 这项工作支持的项目一部分由上海科技攻关项目(编号 ) ,上海 曙光跟踪计划(第 06GG13)和上海领先学科项目(No.P1303) 。 7、 参考资料 【1】 第十一波,方艳 6 月应用嵌入在串口设备联网技术[J]。电力自动化设备, ) :99-101。 【2】 张浩,黄云彦,彭道岗。EGI 立足于预警系统研究[J] Modbus 协议。机电 一体化,):15 - 18。 【3】 李娟,张波,丘东元。多机通信与 Modbus RTU 的总部设在电能质量监测 系统[J]。电力自动化设备,2007,27, (1):93 - 96。 【4】 岳杨,张春光,袁爱进。设计和嵌入式人机界面的实现基于 Modbus 的研 究[J]。工业控制计算机,):8 - 10。 【5】 闵华松,刘光临。嵌入式状态监测与故障诊断系统的高速旋转机械的研究 [J]。信息与控制,) :309 - 313。 【6】 鲍可进,邬建勇。对权力的执行情况与嵌入式 Web 服务器系统[J]远程监 控。计算机工程与设计,) :。 附件清单 11 外文文献翻译原文 1:Design and Realization of Modbus Protocol Based on Embedded Linux System PENG Dao-gang1,2, ZHANG Hao1,2, YANG Li1, LI Hui1 (1. College of Electric Power and Automation Engineering, Shanghai University of Electric Power, Shanghai 200090, C2. CIMS Research Center, Tongji University, Shanghai 200092, China) The 2008 International Conference on Embedded Software and Systems Symposia (ICESS2008) Abstract: With the rapid development of the embedded computer technology, the new generation of industrial automation data acquisition and monitoring system, which takes the high performance of embedded microprocessor as its core, adapts well to the application system. It meets the strict requests of the function, reliability, cost, size and power consumption, etc. In the industrial automation application system, the Modbus communication protocol is widespread industrial standard and is used in massive industrial equipments, including DCS, PLC, RTU and the intelligent instrument, etc. In order to reach the demand of the embedded data acquisition monitoring system of the industrial automation application, an embedded data acquisition monitoring platform based on Modbus protocol under the Linux environment is designed in this paper. The serial port Modbus master protocol is realized, which includes two kinds of communication mode: ASCII and RTU. As a result, communicating with various serial Modbus salve protocol equipments can be satisfied. The Modbus master realized by this embedded platform is stable and reliable. It has excellent prospect in the embedded data acquisition monitoring system of new automation applications. Keywords: E Embedded L M D Monitoring and control 1.Introduction Modbus is a kind of communication protocol which is promoted by Modicon Corporation. It is widely used in the industrial automation and has become the actual industrial standard. The control devices or the measuring instrument of different manufacturers can be linked into an industry monitor network by using the Modbus protocol. The Modbus communication protocol is used in massive industrial equipments as the communication standard, including PLC, DCS, RTU, the smart intelligent instrument and so on. With the rapid development of embedded computer technology, embedded data acquisition monitoring system which uses the high performance embedded microprocessor as its core is an important development direction. In view of the embedded data acquisition monitoring system of the industrial automation application, a Modbus master protocol under the embedded Linux environment is designed and realized in this paper. Therefore, communicating with various serial Modbus salve protocol equipments can be satisfied. 2.Introduction of Modbus protocol The Modbus protocol includes ASCII, RTU and TCP transmission mode, supporting traditional RS-232, RS-422, RS-485 and the Ethernet equipments. As to the serial port Modbus equipments, the controller which correspondent in the standard Modbus network can be established in two kinds of transmission mode: ASCII mode or RTU mode. AS to the Ethernet Modbus equipments, the transmission mode is the Modbus/TCP protocol. The same transmission mode and parameters must be chosen for all equipments in Modbus network. Modbus protocol is independent of hardware. Instead of the physical level, it only defines the structure of information which thecontroller can distinguish and use. However, the type of communication network is not defined. The Modbus protocol stipulates the structure of the information and data, the way of command and response. The Maser/Slave method is used for data communication. The Master sends out the request information, and the Slave produces the response information and returns to the Master to respond to the request after receiving the correct information. The Master can also send information to revise the data of the Slave directly. The Modbus protocol needs to verify the data. The serial protocol has the parity check, besides, the ASCII mode uses the LRC check, and the RTU mode uses 16 CRC check. But the TCP mode does not stipulate extra check, because the TCP protocol is a reliable protocol which faces to the connection. Moreover, Modbus uses Master and Slave way, receiving and sending the data in fixed time. In practical, if certain slave equipment is separated, the Master can diagnose it, and after the fault being repaired, the network can be connected automatically. Therefore, the Modbus protocol is reliable. Because of the structure of the message of Modbus protocol, each controller needs one device address, which is used to distinguish the message and judge what action will be carried out. If responding is necessary, the controller will produce replies and transmit it to the inquiry side in the Modbus protocol. Table 1 is comparison of ASCII and RTU mode of Modbus protocol. As is shown in Table 1, the ASCII mode has starting and ending marks, making it is very convenient to the program processing. As the ASCII mode transmits the ASCII character which can be read, so it is visual to debug. In addition, it is relatively easy to realize the LRC check of the ASCII mode. But just as the ASCII mode transmits readable character, the transmission efficiency relatively low, comparing with the RTU mode, therefore, generally speaking, when large quantity of data will be transmitted, the RTU mode is chosen mostly.3.Design of the System As is shown in Figure 1, it is the overall structure chart of the embedded data acquisition system. In this system, the embedded data acquisition platform is the core and data of the controlled plant communicate with the embedded data acquisition platform by the Modbus protocol through all kinds of Modbus slave. As a result, the data acquisition, the data analysis and the data transmission to the operator and engineer station of the monitoring center after pretreatment through TCP/IP is realized.The industrial level AT91RM9200 microprocessor of Atmel Corporation is used as the core of embedded data acquisition platform. The embedded data acquisition platform integrates many kinds of periphery connections, including the serial port, the CAN bus interface, the AD/DA interface, RS485 interfaces, SD/MMC card reader, JTAG and DEBUG debugging interface and etc. In addition, an 8 inch TFT real colorful LCD, which can possibly be used in data demonstration and also has the function of touch screen, is also integrated in the platform. The embedded Linux operating system is used in the embedded data acquisition platform, and the Modbus protocol master function is realized. As a result, the embedded platform can read the data of the Modbus protocol slave through the serial port, and demonstrate the data on LCD (touch screen) after analysis and being processed. Simultaneously, data can be transmitted through the embedded platform Ethernet interface to the monitoring center for further monitoring and management after analysis and being processed. 4.Design and implementation of the Modbus Protocol under embedded Linux environment 4.1 Embedded linux system and its transplantation As one of Linux development directions, embedded Linux has many achievements and mature products. The stability, reliability and the high efficiency of embedded Linux is being proved by the facts. The embedded Linux opens the source code, provides technical support widely and has good extendibility, supports many hardware. All these are the advantages of embedded Linux. This system uses ARM9 as the hardware environment and embedded Linux as operating system. At present, Arm Linux supports a series of ARM processors, including ARM610, ARM710, ARM720Tcores, ARM920Tcores, StrungARM110, SrtongARM1100, Xscale and etc. The AT91RM9200 of Atmel Corporation is used as the goal board in this paper. Different from the standard Linux, it must be started from FLASH or the ROM. The u-boot is used as the boot program in this paper.In order to transplant Arm Linux, it also needs driver on the board for each resource under Arm Linux. If the equipment is designed by their own, it needs to compile the corresponding drivers. The general steps of Linux transplantation is listed in Figure 2. Regarding to kernel of the Arm Linux and the file system, u-boot is downloaded through the serial port to the development board firstly, and then the serial port or network way is used. As the kernel and reflection document of file system is quite large, the transmission speed through the the Ethernet mode is used to download the kernel and the file system. Certainly, network parameter of u-boot needs to be disposed before downloading. Establishing the network parameter of u-boot under the u-boot order mode:The tftp service is run on the server, and then the compiled kernel and images of file system image are added to the server directory. Server and network development board are connected with cable, and then the kernel and file system are downloaded into the RAM by running the following commands under the u-boot order lines: The compiled Arm Linux can be operated after carrying out bootm . The kernel and file system of the RAM can be written into FLASH through the cp order of u-boot. The system can run automatic after setting the start parameter. Then the program is operated on the development board. 4.2 Serial configuration of Modbus protocol under the Linux environment The standard Modbus serial protocol uses the RS232/RS485 to transmit. The equipment node of serial equipment is /dev/ttyS0(COM1) and /dev/ttyS1(COM2) under the Linux environment. As the Modbus serial protocol consist two kinds of transmission mode: ASCII and the RTU. The starting marks and ending marks of the two modes are different. Moreover, the data position of each information packet is also different. As a result, it must be processed separately. Take RTU mode as example to introduce the configuration of Modbus serial protocol under the Linux environment. The head files needed by serial operation are:When the Modbus protocol is used in RTU transmission mode, the serial baud rate, the data position, the stop position, the check position and the control characteristic should be set according to the characteristic of its information frame. Establishment of serial baud rate:Establishment of serial data position, stop position and check position:Initialization the characteristics of control: 4.3 Design of serial Modbus protocol master software The design and realization of serial Modbus protocol master program is mainly introduced in this paper, including two kinds of transmission mode: ASCII and RTU. The Modbus master service includes the man-machine interaction module, the function choice module, the function processing module and the return processing module. Each module function is realized under the embedded Linux environment. The man-machine interaction module is a communication module for the users and the platform. It mainly realizes the functions of page printing, guidance of users’ information inputting and etc. The function choice module is the platform which chooses the function selection parameter of Modbus master according to the user information input. These parameters include modes of transmission, service types, slave station address and etc. The function processing module is the core of this platform. It includes the functions of initialization of serial port, structure of Modbus frame, analysis of Modbus frames, each kind of service processing and etc. Six main kinds of service processing mode is designed for serial Modbus equipment in this platform, which includes: read coil status, read input status, read holding registers, read input registers, write single coil and write single register. These six kinds of mode cover the basic function demand of Modbus. And it is very convenient to expand other functions if necessary. The return processing module processes operation result of the platform. If the users request the service processes successfully, the service results will be printed through the standard output equipment, or the error message is printed otherwise. In the design, in order to make it convenient to get .function parameters, a structure is defined as following:Where, slave_address is the address of slave station. A Modbus network permit 255 slave station at most. The function is the choice character for service mode, and there are six kinds of service mode supplied in this system, respectively 1-6. The start_address is the 16Bit character, which is the start address of the being operated equipment of slave station. The pointnum_or_setdata consist two kinds of words, service 1-4 are the numbers of nod being operated, and service 5 and 6 is the 16Bit character being established.Figure 3 is the flow diagram for function processing module of the Modbus master program. The program determines the value of the format character at first, establishing the transmission mode that users need, which will decide what serial disposition function and what kind of service function is chose. Then set serial parameter under the linux environment. The corresponding service structure function is chose by judging the service type of the user request. For example,if format is 0, the RTU mode is used. The function is 1 and it means that the user requests to read the coil. The program constructs the Modbus request frame through using construct_rtu_frm function which is called by rtu_read_status function. The program preserves it in serial transmission buffer mod_tx_buf, which is defined beforehand, and then transfers the Modbus request frame by calling serial transmitting order. If the program receives the reply frame within the setting time, the program will process it by calling reply frame analytic function of the corresponding mode. For example, when the transmission mode is ASCII, the ascii_data_anlys function is called and if the transmission mode is RTU, then rtu_data_anlys function is called .The analytic function analyze the data which the serial receive buffer receives. If the reply frame analysis is correct, the function will load the data to goal buffer area. If it is mistaken, the function will terminate this service and process the error, print error message out. 4.4 Function of service structure and analyze of the reply frame Take the read holding register service as example to introduce the construction process of Modbus requesting frame. The function number of read holding register is 03 and the construction of Modbus requesting frame is realized through rtu_read_hldreg and ascii_read_hldreg function. The former realizes the RTU frame structure and the latter the ASCII frame structure. The structure of rtu_read_hldreg is shown as following:The input parameter board_adr is the address of slave station to which users need to visit. The com_buf is buffer area of the Modbus frame transmission. The start_address is the starting address for visit and the lenth is length of the visit. All these variables are obtained through structure parameter of the man-machine interaction module. HI() and the LOW() are two defined functions. The HI() is to obtain high 8 Bits of the 16Bit, and the LOW() is to obtain its low 8 Bits. The construct_rtu_frm function is the structure of RTU frame. All services are realized by calling this function to form the RTU request frame. Its structure is shown as follows:After these steps, a completed request frame has been produced. Finally, the order write(fd, mod_tx_buf, tx_len) is sent by calling the serial port, and the Modbus transmission buffer area request frame is transmitted. Where tx_len is the returning value of service structuring function. After the transmission of request frame, the program will wait for the slave station to respond. In order to avoid the endless loop causing by no response from slave station, an overtime examination mechanism is established. If the slave station supple has no response in scheduled time, the program produces an error message and stops this service. If the service program receives the reply frame in scheduled time, it analyzes the reply frame by calling the analytic function. The structure of the analytic function of RTU mode is as follows:5.Conclusions The Modbus communication protocol is used widely and has become actually the industrial standard in fact. It is used in massive industrial equipment as communication standard between them, including DCS, PLC, RTU, the intelligent instrument and etc. The new generation of industrial automation data acquisition monitoring system uses the high performance embedded microprocessor as its core. As a result, it adapts well for the application to meet the strict request of the function, reliability, cost, size, power consumption and etc. In order to reach the demand of the embedded data acquisition monitoring system of the industrial automation application, a modbus protocol master station based on the embedded data acquisition monitoring platform under the linux environment is designed in this paper. The communication between each slave stations is realized. The Modbus master service program under the embedded Linux environment runs stable and reliable after the Modbus protocol test. It provides Modbus master station with good service, and it conforms to the Modbus protocol standard. The prospect of its application in the new generation of industrial automation data acquisition monitoring system is excellent. Acknowledgements This work was supported in part by Shanghai Tackling Key Scientific and Technological Project (No. ), Shanghai Dawn Tracking Project (No. 06GG13) and Shanghai Leading Academic Discipline Project (No.P1303). References: [1] XI Bo, FANG Yan-jun. Application of embedding technology in networking of serial-port devices[J]. Electric Power Automation Equipment, 2007, 27, (8): 99-101. [2] ZHANG Hao, HUANG Yun-yin, PENG Dao-gang. EGI based on the Modbus protocol for EWS[J]. Mechatronics, ):15-18. [3] LI Juan, ZHANG Bo, QIU Dong-yuan. Multi-computer communication based on Modbus RTU in power quality monitoring system [J]. Electric Power Automation Equipment, ):93-96. [4] YUE Yang, ZHANG Chun-guang, YUAN Ai-jin. Design and implementation of embedded man-machine interface based on Modbus[J]. Industrial Control Computer, ):8-10. [5] MIN Hua-song, LIU Guang-lin. Embedded state monitoring and fault diagnosing system of high speed rotating machinery [J]. Information and Control, ):309- 313. [6] BAO Ke-jin, WU Jian-yong. Implementation of remote monitor for power system with embedded web server[J]. Computer Engineering and Design, ):. 附件清单 12 外文文献翻译译稿 2: 可视化的PLC程序使用XML米巴尼尤尼斯和 G.弗雷 摘要:由于 P LC 程序日益复杂,在 PLC 应用方面有越来越多的兴趣爱好者。 形式化方法,让僵化的证明系统属性被核查和验证。一个传统思路的方法就是在 PLC 编程中设立一个正式的设计方法。不过,现有的软件已被优化,改变,或移 植到新系统.有需要找到从某一 PLC 程序开始的方法。因此,规范 PLC 程序是一 个现在研究的热点。该文章概述了基于形式化的 PLC 程序基础上从新启动的方 法。转型成为一个独立的格式和可视化的结构,在这个过程中,PLC 程序的确定 是作为这项措施的重要中间步骤。 这表明如何 XML 和相应的技术可用于形式化和 可视化现有的 PLC 程序。 一 导言 可编程逻辑控制器(PLC )是一种特殊类型的计算机,它应用于工业和安全 的关键地方。应用 PLC 的目的是控制某一特定的或可选择的过程,它是通过产生 的电控制信号回应电器中相关的输出信号来实现的。 应用在制造业和化工过程控 制,机械加工,交通,电力分配,以及其他许多领域。PLC 控制有着极大的不同, 自动化应用范围的复杂性从一个简单的小组运作到控制一个会议室的的灯光和 自动窗成为一个全自动化的生产线。 随着他们应用 PLC 知识的增加, 他们把 PLC 应用到复杂性和品质要求高的地 方,特别是对安全性要求特别严格的地方。由于在有限的时间里 PLCD 的发展应 用日益复杂,现有的软件或 PLC 的模块也在迅速发展,以此,需要一个正式的办 法加以规范 。为了确保高品质的要求,我们需要检查和验证程序,以及分析和 模拟现有系统[ 2 ] 。其中一个重要的领域就是已经在最近的时间成长在规范化 的 PLC 程序是逆向工程[ 3 ] 。逆向工程是通过评估达到了解它的运转过程,以 达到重复或加强的目的。而重用的 PLC 守则正在建立,作为一种打击复杂 PLC 程序的工具,逆向工程在今后几年将得到越来越多的重要性,特别是如果现有的 硬件被适用于各种不同程序环境的新硬件所取代的情况下。 现有的 PLC 程序的可视化是逆向工程一个重要的中间步骤。 本文章提供了一 个方法,使用 XML 使 PLC 程序可视化,让 PLC 程序工程师更容易把握方向和更好 地了解。 该文件的结构如下。 首先, 简单的介绍了 PLC (根据国际电工委员会 61131-3 的标准是给予)和相应的编程技巧,。在第三部分,在现有基础上用形式化 PLC 程序重新设计方法的介绍。PLC 代码转型成为一个独立的格式被确定为在这个过 程中重要的第一步。XML 和相应的技术,例如 XSL 和 XSLT(第四节可以使用的这 种转变)。第五部分提出了应用 XML 的使 PLC 程序可视化的方法并用一个例子做 出说明。最后一节总结了结果,并就今后的工作在这方面正在进行的项目做了一 个前景的展望。 二 PLC 和 IEC 61131 自从七十年代初期公布于世,由于它的成功的完成目的,取代了机器上的硬 连线控制设备, PLC 日益受到重视, 最终它作为一个独特的应用领域成长起来, 。 它的研究和开发,主要是为控制工程。 IEC61131 是为工业自动化第一次真正的努力来规范 PLC 的编程语言。 1993 在 国际电工委员会[ 4 ]上公布了 IEC 61131 作为可编程控制器标准。在标准化 PLC 的编程语言之前,正在制定为了个别 PLC 实用的专有编程语言。为了提高不同产 品的兼容性,开放性和互操作性以及为了促进工具和方法的发展,国际电工委员 会 61131 标准设立固定的一套符号。第三部分,定义了一个适合 5 种编程语言标 准: Originated (IL)语言是一种低层次的文本语言, 其结构类似于汇编语 言。Originated 语言 L 被视为 PLC 的在所有其他 IEC61 131-3 语言都可以翻译 语言。 梯形图(L0)是一种被认为起源于于美国的图形语言。LDS 符合从电子及电器 电路实施控制逻辑的编程风格。 结构化文本( ST)是一个非常强大的高层次的语言。圣借从帕斯卡尔那里 借用了它的语法,充实它的一些特点。圣包含一个现在编程语言多要求的所有要 素。 功能块图(FBD)是一种图形语言,在工业流程里是非常常见的。在这种语 言中,控制器被认为是可在功能块之间流动的信号和数据。FBD 把换文本编程转 变为功能块编程,因而提高了模块化和软件重用性。 顺序功能图(SFC)是一个图形化的语言。SFC 要素的定义是为了构建可编 程序控制器程序的组织。 其中在 IEC 61 131-3 中出现的一个问题就是在 PLC 的编程工具的工程信息 中没有一个标准化的格式。 目前, 每个厂商都在运用他们各自的具体的不同格式。 这亦是其中一个原因就是被限制了的形式化的做法, 以单一的程序或算法。 不过, 最近的 PLC 用户组织 PLCopen (见 http://www.plcopen.org )阻止了一个技术 委员会,以确定一个基于格式 accordingto 的 IEC 61131-3 的 XML 项目 。这种 新格式将缓解形式化的工具,使之成为 PLC 项目的所有相关的信息。 三 重新设计的方法 对于重新设计所提出的态度,(参见图 1 )是基于认为 XML 可作为一种中 间媒体语言用来改造 PLC 的代码。 这种转变提供了取得 avendor 独立规格代码优势, (即使 PLCopen 成功地 。 确定了一种标准化的格式为 PLC 所应用,仍将有很多现有的程序不符合这个标 准) 。 在此代码基础上的一个明智步骤转型到一个正式的模型(自动机)正在计划 之中。这个模型可以用来进行分析,模拟仿真,正式的检查和验证,最终对同一 PLC 或其他产品重新执行该优化算法。 一个很大的可能就是这个完成编程的逆向启动只能是一个半自动的过程, 中 间可视化的代码是最重要的一点。在过程中的不同阶段,代码或形式化模型不同 方面的都必须是可视化的设计方式,只有这样设计者才可以进一步的指导工作。 XML 以其强大的可视化和改造工具,成为解决这方面的工作的一种理想的工具。 四 作为一种可视化工具的 XML XML (可扩展标记语言)是一种简单而灵活的元语言,即一种描述其他语言 的语言。由万维网协会( W3C )裁定(W3C)作为一个方言 SGML 分支语言, XML 的删除两个阻碍网络发展[ 6 ]制约因素。依赖于一个单一的,一成不变的文件 类型( HTML ),这种文件类型中大部分被滥用任务,这是从来没有设计为对一 方有利。充满了 SGML 的复杂性,他的语法,让许多强大的并且努力到计划方案 到了另一个方向。 当 HTML 描述了数据本身是怎样显现的同时, XML 描述了数据本身。一些行 业和学科、医疗记录及报纸出版,其中已使用 XML 交换信息,可以跨多个平台来 应用。在一个信息获取人可以使用各种不同的方式形式下,XML 可可裁定描述几 乎任何种类的信息。 它是专门设计用于支持从根本上使用不同形式的数据的系统 之间的信息交流,例如民航处及调度之间的应用。使用拥有强大的解析器和固有 的简单性的条款 XML,句法和语义语法比常规词汇分析器和验证分析器的使用更 有利,(参见图 2 .7 ) 。 常规的程序代码分析方法需要一个扫描仪(词法分析仪)由剖析器检查语法 结构的代码产生了一套终端符号(令牌),并生成一个对象网。在该对象的内部 结构的程序代表的确定对象和两者之间的关系。 双方扫描器和分析器将使用的这 种方法是面向文件的,这就意味着,分析不同类型的文件,需要重新生成的代码 为扫描仪和分析器。一个应用这种方法的方法的例子可以在[ 8 ] 发现 。 使用 XML 的最有前途的方面,就是 XML 及其应用的互补性转变为标准化,以 便给它的用户提供最大的灵活性。基于该 XML 的方法是十分有利的,因为词汇的 规格是不变的组成部分, 因此 XML 良好的形式从各自的个别申请是独立的。 因此, XML 的解析器也可以吧 XML 文件在一个抽象的代表性换成以所谓的文档对象模型 ( DOM ) ,不需使用语法。 DOM 的是一个应用程序编程接口( apii )对 HTML 和格式良好的 XML 文件有效。它定义的逻辑结构文件和文件的方式访问和操纵。 在 DOM 中的规格,任期“文件”是中被越来越多广泛使用的意识。 XML 被用来 作为一种代表许多不同种的信息可能在不同的系统中存储以及许多传统上, 这将 被看作是数据而不是作为文件。不过, XML 介绍了此数据文件,并且 DOM 可以 用来管理这方面的数据[ 5 ] 。 XML 的转型语言 XSLT 的是能够不仅转换 XML 到另一个 XML 或 HTML ,还能够 转换到许多其他友好的用户格式。前 XSLT 的来临以前 ,改造 XML 成为任何其他 格式只有通过在一个程序语言如 C + + , Visual Basic 或 Java 定制开发的应 用程序来实现。这个程序与尊重的结构性变化 XML 相比文件缺乏一般性。XSLT 的演变,作为一个高层次的宣示性的语言,[ 9 ]对利用的观念,习俗申请的变 革都是十分相似的。 XSLT 的功能分为两个步骤。在第一步,它执行的结构性转型,以便为转换 成 XML 的结构,反映了所需的输出。第二阶段是格式化的新架构成所需的格式, 如 HTML 或 PDF (参见图 3 ) 。这个转变最重要的优势是它允许一个可以想象 的简单而容易的文件或数据结构良好嵌入内部结构, 以了解 XML 来制作。 HTML 当 被选择作为格式转化的产生的时候,是有可能使用 HTML 的广泛能力来产生出可 想象的和有吸引力的可视化程序。 每一个 XML 文件都有自己的语法和词汇。因此,除了作为良好的形式, XML 文件需要符合一套规则。根据 W3C 建议,这套规则已通过文件型态定义( DTD ) 或一个 XML 架构加以界定。该定义的规则在一个 DTD 或一个 XML Schema 的国家 层次和结构制约的 XML 文件。 近期,一些另类语言已提出,DTD 是用以界定文件文法。W3C XML Schema 的语言重复了重要的功能 DTDS ,并增加了一些特点。使用 XML 的语法,例如, 明确之间的关系架构和命名空间,一个有系统的区分元素的种类和数据类型,和 单继承的形式,类型的推导。在其他的话架构提供了更丰富和更强大的方式描述 的信息,比什么是可能的与 DTDS 。图 4 显示了 XML 技术讨论上述之间的联系。 五 方法的可视化 OFPLC 程序 A.概况 由于 Instruction List (IL)是在欧洲最常用的 PLC 编程语言,现在展示的 介绍的做法是在此基础上的语言。西门子第 5 步和标准版根据的 IEC 61131-3 正在被考虑。 XML 文件显示的生成显示了不同方面的 PLC 程序, 实现了在以下三个步骤 (参 见图 5 ) : 1.PLC 程序到 XML 文件的转换 2. XML 的的可行性和确定了语法的 XML 的 XML 架构, 3. 根据该指令集的来源,临立会,转换的 XML 介绍元素的定义这三个步骤是讨论分别分节 B 至 D。小组 E 节解释了在前一阶段期间不同的 XMLS 的可视化取得的成绩。 在整个这一节的一个例子是用来说明所提出的概念。 6 显示了在西门子公 图 司名单中 S5Z 中 PLC 的代码的书面指示。临立会的代码是写在形式的地方,每列 的元素,是一种地址,标签,指示,操作和说明或评构成的分隔清单。Kommentar : Autor Erstellt :15.07.2003 Geaendert am: B1B:O NETZWERK 1 EMPFANGEN SLAVE 3 VON MASTER NAME :EMPE'MAST 0005 :U M98.7 ABFRAGE OB EMPFANG MOEGLICH
:SPB= MOOl
:A DB140 EMPFANGSFACH IST DB 140 OOOA :L KF+20 LAENGE DES DATENPAKETS oooc :T DLO OOOD :L KF+O ZIELNUMMER O=MASTER OOOF :T DRO
:UNM98.7 FANGEN WIEDER ERLAUBEN 0012 :S M98.7 0013 MOOl :NOP 0
:BE BAUSTEIN ENDE Fig. 6 A PLC program written in Siemens S5 Instruction ListB PLC 程序转换成为格式良好的 XML 由于 ASCII 格式 PLC 程序加上一个结构与单独列地址,标签,指示,运算和说 明划定的表格,XSLT 的可以把它转换为格式良好的 XML 文件。通过这种转变 获 得的 XML 文件是一个分层结构的文件。 图 7 显示通过 XML 文件获得改造的 PLC。XML 文件是在结构上的等级,其中 的根元素是 ilcodeblock 是代表全 PLC 的代码。 每行的 PLC 代码是包含在相应的 ilrow 元素,这是米呃子元素。注:结构选择的 XML 代表性的 IL 代码是面向在 工作的建议,该 plcopen 。C. XML 验证和 XML 架构 由于前处理,除了正在完善被确认 XML 文件,可以验证的使用验证解析器取 得的 XML,形成符合一套句法规则所界定的背景下的 PLC 编程语言。 D. 介绍的认可 这一步,可视化的PLC程序在这个过程中使用XML确保XML文件将用于只包含 有效可视化,可以用来变换,以及形成有效的另一个XML ,这是由于对鉴定指示 拥有一个额外的属性附加到指示标记。此属性通知是一个有效的指示,指示是否 是有关的指令集。这个转变的程序,也能指示附加属性的标记,宣布一项分类的 指示到预定义类。 转换的XML的指示识别的证明了XML的语义是与PLC的编程语言的操作类型相 一致的。 在本节中的例子中, (参见图8 ) ,新的XML包含额外的根据它所代表的 类型分类指示的运作属性。 步骤指示分为11不同类型的操作如合乎逻辑的, 跳转, 负载或转让的运作转让等等。&?xml version=&l.O& encOding=&ISO-8859-1& ?& &ILCodeBlock& &ILRow& (Instruction instructionId='Logical Operation&) U&/Instruction& &/ILROW& -. &ILRow& &Instruction instructionId=&Jump Operation&& SPB-&/Instruction& &Instruction instructionId=& special Operation && BE&/Instruction& &/ILROW& &/ILRow& Fig. 8 A new transformed XML showing only the inslructions and the corresponding instruction ID &/ILCodeBlack&E. 可视化的XML 上述所产生的两种XML文件可转化为HTML或在XSL的帮助下转换为其他可读 的文件。 一个巧妙的XSL可以被设计用来产生一个可以容易想象的转达PLC程序的 逻辑或者其他特征的HTML文件。 此外, DOM的结构在嵌入在XML中 (参见图9 ) , 也可让使用者用一个简单的方法浏览PLC程序。 例如在HTML中做的可视化程序 。这可视化已经完成XML的转换,他作为一个 表中的子元素去验证的语法。 指示鉴定后的XML被转化成使用XSL转化,取得那里的指示和身份指示后,根 据该行动的类型提取的XML在 HTML表载列了两栏(指示,指令编号)是在可视化 的。 HTML结构的建议,这不是唯一的可能性,其中的XML可以可视化,但他们提 供一个很容易的切实可行的方案,那就是为用户把握的PLC代码。 图 10显示了相同的PLC的代码,在图 4他作为一个HTML文档转换XML文档, 显示的图 7使用的XSL 。这可视化,更好地了解PLC程序成为可能。图 11显示了 在图 6中的XML教学入侵检测系统特殊的可视化。 六 结论和展望 重新设计的PLC程序需要一个正式的办法加以发展。在本文章中,是来解决 这个任务一个方法的介绍。在给出了书面指示PLC程序的基础上,在清单的通过 一个明确步骤转型为被建议的正式代表。由于这个过程不会完全自动,有必要采 取灵活的可视化中间步骤。XML是作为一种灵活的,标准化的手段来充当数据格 式来描述的PLC代码。相应的XSL转换和文档对象模型的技术是作为工具,在重整 过程为各种定制可视化任务。 基于XML的描述PLC程序的进一步转变,将适用于最后得出一个完全形式化描 述原PLC的代码。这将是在成立一个有限自动机。在这个计划过程中,他们通过 一个知识库确定共同的介素的结构和正规化, 七 参考文献 1 、L.巴雷西,米毛里,甲蒙蒂,和 皮兹 主编“PLC的设计 编程和代码生 成”,收录在IEEE 会议,并在cybernefics smczooo 上出版第
页。 2 、 g.弗雷和L. 里兹 , “形式化方法在PLC编程” ,在IEEE结论对系统,人 与控制论 smc'zooo ) , Nashville , ( 美国, 2000年10月。 第2431年至2436 页 3 、米巴尼尤尼斯和G.弗雷, “形式化现有的PLC程序:一项调查” ,在2003 年,里尔(法国) ,号文件中S2 -的R - 00 - 0239 , 2003年7月。 4 、国际电工委员会,国际电工技术委员会的国际标准1131-3 ,可编程控制器, 第3部分,编程语言, 1993年。 5 、在万维网财团: / / www.w3.org/ 6 、 XML的主页: hftp : / / xml.com / 7 、 r. kliewer ,逆向工程,冯steuerungssojiware.ph.d 。论文, 德国 Kaiserslautern大学生产自动化研究所, 1999年。 8 、米凯, XSLT的-程序参考员。 附件清单13外文文献翻译原文2: Visualization of PLC Programs using XMLM. Bani Younis and G. Frey Juniorprofessorship Agentenbased Automation University of Kaiserslautem P. 0. Box 3049, D-67653 Kaiserslautem, Germany Abstract - Due to the growing complexity of PLC programs there is an increasing interest in the application of formal methods in this area. Formal methods allow rigid proving of system properties in verification and validation. One way to apply formal methods is to utilize a formal design approach in PLC programming. However, for existing software that has to be optimized, changed, or ported to new systems .There is the need for an approach that can start from a given PLC program. Therefore, formalization of PLC programs is a topic of current research. The paper outlines a re-engineering approach based on the formalization of PLC programs. The transformation into a vendor independent format and the visualization of the structure of PLC programs is identified as an important intermediate step in this process. It is shown how XML and corresponding technologies can be used for the formalization and visualization of an existing PLC program. I. INTRODUCTION Programmable Logic Controllers (PLCs) are a special type of computers that are used in industrial and safety critical applications. The purpose of a PLC is to control a particular process, or a collection of processes, by producing electrical control signals in response to electrical process- related inputs signals. The systems controlled by PLCs vary tremendously, with applications in manufacturing, chemical process control, machining, transportation, power distribution, and many other fields. Automation applications can range in complexity from a simple panel to operate the lights and motorized window shades in a conference room to completely automated manufacturing lines. With the widening of their application horizon, PLC programs are being subject to increased complexity and high quality demands especially for safety-critical applications. The growing complexity of the applications within the compliance of limited development time as well as the reusability of existing software or PLC modules requires a formal approach to be developed [I]. Ensuring the high quality demands requires verification and validation procedures as well as analysis and simulation of existing systems to be carried out [2]. One of the important fields for the formalization of PLC programs that have been growing up in recent time is Reverse-engineering [3]. Reverse Engineering is a process of evaluating something to understand how it works in order to duplicate or enhance it. While the reuse of PLC codes is being established as a tool for combating the complexity of PLC programs, Reverse Engineering is supposed to receive increased importance in the coming years especially if exiting hardware has to be replaced by new hardware with different programming environments Visualization of existing PLC programs is an important intermediate step of Reverse Engineering. The paper provides an approach towards the visualization of PLC programs using XML which is an important approach for the orientation and better understanding for engineers working with PLC programs. The paper is structured as follows. First, a short introduction to PLCs and the corresponding programming techniques according to the IEC 61131-3 standard is given. In Section Ⅲ an approach for Re-engineering based on formalization of PLC programs is introduced. The transformation of the PLC code into a vendor independent format is identified as an important first step in this process. XML and corresponding technologies such as XSL and XSLT that can be used in this transformation are presented in Section IV. Section V presents the application of XML for the visualization of PLC programs and illustrates the approach with an example. The final Section summarizes the results and gives an outlook on future work in this ongoing project. Ⅱ PLC AND IEC 61131 Since its inception in the early ‘70s the PLC received increasing attention due to its success in fulfilling the objective of replacing hard-wired control equipments at machines. Eventually it grew up as a distinct field of application, research and development, mainly for Control Engineering. IEC 61 131 is the first real endeavour to standardize PLC programming languages for industrial automation. In I993 the International Electrotechnical Commission [4] published the IEC 61131 Intemational Standard for Programmable Controllers. Before the standardization PLC programming languages were being developed as proprietary programming languages usable to PLCs of a special vendor. But in order to enhance compatibility, openness and interoperability among different products as well as to promote the development of tools and methodologies with respect to a fixed set of notations the IEC 61131 standard evolved. The third part of this standard defines a suit of five programming languages: Instruction List (IL) is a low-level textual language with a structure similar to assembler. Originated in Europe IL is considered to be the PLC language in which all other IEC61 131-3 languages can be translated. Ladder Diagram (LO) is a graphical language that has its roots in the USA. LDs conform to a programming style borrowed from electronic and electrical circuits for implementing control logics. Structured Text (STJ is a very powerful high-level language. ST borrows its syntax from Pascal, augmenting it with some features from Ada. ST contains all the essential elements of a modem programming language. Function Block Diagram (FBD) is a graphical language and it is very common to the process industry. In this language controllers are modelled as signal and data flows through function blocks. FBD transforms textual programming into connecting function blocks and thus improves modularity and software reuse. Sequential Function Chart (SFC) is a graphical language. SFC elements are defined for structuring the organization of programmable controller programs. One problem with IEC 61 131-3 is that there is no standardized format for the project information in a PLC programming tool. At the moment there are only vendor specific formats. This is also one reason for the restriction of formalization approaches to single programs or algorithms. However, recently the PLC users’ organization PLCopen (see http://www.plcopen.org) started a Technical Committee to define an XML based format for projects according to IEC 61131-3. This new format will ease the access of formalization tools to all relevant information of a PLC project. Ⅲ. RE-ENGINEERING APPROACH The presented approach towards re-engineering (cf. Fig.1) is based upon the conception that XML can be used as a medium in which PLC codes will be transformed. This transformation offers the advantage of obtaining avendor independent specification code. (Even if the PLCopen succeeds in defining a standardized format for PLC applications, there will remain a lot of existing programs that do not conform to this standard.) Based on this code a step-wise transformation to a formal model (automata) is planned. This model can then be used for analysis, simulation, formal verification and validation, and finally for the re-implementation of the optimized algorithm on the same or another PLC. Since re-engineering of complete programs will, in most cases, be only a semi-automatic process, intermediate visualization of the code is an important point. At different stages of the process different aspects of the code and/or formal model have to be visualized in a way that a designer can guide the further work. XML with its powerful visualization and transformation tools is an ideal tool for solving this task. IV. XML AS A TOOL FOR VISUALIZATION XML (extensible Markup Language) is a simple and flexible meta-language, i.e, a language for describing other languages. Tailored by the World Wide Web Consortium (W3C) as a dialect of SGML [S], XML removes two constraints which were holding back Web developments [6]. The dependence on a single, inflexible document type (HTML) which was being much abused for tasks it was never desi and the complexity of full SGML, whose syntax allows many powerful but hard-to-program options on the other side. While HTML describes how data should be presented, XML describes the data itself. A number of industries and scientific disciplines-medical records and newspaper publishing among them-are already using XML to exchange information across platforms and applications. XML can be tailored to describe virtually any kind of information in a form that the recipient of the information can use in a variety of ways. It is specifically designed to support information exchange between systems that use fundamentally different forms of data representation, as for example between CAD and scheduling applications. Using XML with its powerful parsers and inherent robustness in terms of syntactic and semantic grammar is more advantageous than the conventional methodof using a lexical analyzer and a validating parser (cf. Fig. 2, [7]). The conventional method of analysis of program code requires a scanner (lexical analyser) which generates a set of terminal symbols (tokens) followed by a parser that checks the grammatical structure of the code and generates an object net. In the object net the internal structure of the program is represented by identified objects and the relations between them. Both the scanner and the parser to be used in this method are document oriented which implies that analysis of different types of documents requires rewriting the generated code for the scanner and the parser. An example of an application of this method can be found in [8]. The most promising aspect of using XML instead is that XML and its complementary applications for transformations are standardized so as to provide maximum flexibility to its user. The XML based method is advantageous, since the lexical specification is an invariant component of XML; therefore the well-formedness is independent from the respective individual application. Hence, an XML-Parser also can transfer well-shaped XML documents in an abstract representation called Document Object Model (DOM) without using a grammar. DOM is an application programming interface (APII) for valid HTML and well-formed XML documents. It defines the logical structure of documents and the way a document is accessed and manipulated. In the DOM specification, the term &document& is used in a broad sense increasingly. XML is used as a way of representing many different kind of information that may be stored in diverse systems, and much of this would traditionally be seen as data rather than as documents. Nevertheless, XML presents this data as documents, and the DOM can be used to manage this data[5]. XSLT, the transformation language for XML is capable of transforming XML not only to another XML or HTML but to many other user-friendly formats. Before the advent of XSLT, the transformation of XML to any other format was only possible through custom applications developed in a procedural language such as C++, Visual Basic or, Java. This procedure lacked the generality with respect to the structural variation of XML documents. Capitalizing on the concept that the custom applications for the transformations are all very similar, XSLT evolved as a high-level declarative language [9]. XSLT functions in two steps. In the first step, it performs a structural transformation so as to convert the XML into a structure that reflects the desiredoutput. The second stage is formatting the new structure into the required format, such as HTML or PDF (cf. Fig. 3 ). The most important advantage of this transformation is that it allows a simple and easily-conceivable representation of the document or data structure embedded inside the well-structured but hard-to-understand XML to be produced. When HTML is chosen as the format of the transformed produce it is possible to use the extensive ability of HTML to produce an easily-conceivable and attractive visualization of a program. Every XML document has its own syntax and vocabulary. Therefore, in addition to being well-formed, the XML document needs to conform to a set of rules. According to W3C recommendations this set of rules has to be defined either through a Document Type Definition (DTD) or an XML Schema. The rules defined in a DTD or an XML Schema state the hierarchical and structural constraints of the XML document. The DTD is for defining t more recently a number of alternative languages have been proposed. The W3C XML Schema language replicates the essential functionality of DTDs, and adds a number of features: the use of XML instance syntax rather than an ad hoc notation, clear relationships between schemas and namespaces, a systematic distinction between element types and data types, and a single-inheritance form of type derivation. In other words schemas offer a richer and more powerful way of describing information than what is possible with DTDs. Fig. 4 shows the XML technologies discussed above and the connection between them. V. AN APPROACH FOR THE VISUALIZATION OFPLC PROGRAMS A. Overview Since Instruction List (IL) is the most commonly used PLC language in Europe, the presented approach is based on this language. The proprietary IL dialect Siemens STEP 5 and the standardized version according to IEC 61131-3 are considered.The generation of XML documents showing different aspects of a PLC program is realized in the following three steps (cf. Fig. 5): 1.Transformation of the PLC program to an XML document 2.Validation of the XML against the XML Schema which sets the syntax of the XML 3.Identification of the Instruction elements of the transformed XML according to the instruction set of the source PLC These three steps are discussed in sub-sections B to D respectively. Sub-section E explains the visualization of the different XMLs obtained during the preceding steps. Throughout this Section an example is used to illustrate the presented concepts. Fig. 6 shows a PLC code written in Instruction List Siemens S5. The PLC code is written in atabular form where each row element is either a delimited list consisting of address, label, instruction, operand and description or a comment. Kommentar : Autor Erstellt :15.07.2003 Geaendert am: B1B:O NETZWERK 1 EMPFANGEN SLAVE 3 VON MASTER NAME :EMPE'MAST 0005 :U M98.7 ABFRAGE OB EMPFANG MOEGLICH
:SPB= MOOl
:A DB140 EMPFANGSFACH IST DB 140 OOOA :L KF+20 LAENGE DES DATENPAKETS oooc :T DLO OOOD :L KF+O ZIELNUMMER O=MASTER OOOF :T DRO
:UNM98.7 FANGEN WIEDER ERLAUBEN 0012 :S M98.7 0013 MOOl :NOP 0
:BE BAUSTEIN ENDE Fig. 6 A PLC program written in Siemens S5 Instruction ListB. Conversion of a PLC Program inio a well-formed XML Given a PLC program in ASCII format and in a tabular structure with separate columns for addresses, labels, instructions, operands and descriptions delimited by whitespaces, XSLT can convert it into a well-formed XML document. The XML document obtained through this transformation is a hierarchically structured document. Fig. 7 shows the XML document obtained through the transformation of the PLC code of Fig. 6. The XML document is structured in a hierarchy in which the root element is the IL Code Block representing the whole PLC code. Each of the rows of the PLC code is contained within a corresponding ILRow element which is M e r smtctured into child elements. Note: The structure chosen for the XML representation of IL-Code is oriented at the working proposal of the PLCopen.C. XML Validation against the XML Schema The XML obtained as a result of the previous processing can be validated using a validating parser that confirms that the XML document in addition to being well-formed conforms to the set of syntactic rules defined in context of the PLC programming language. D. rdenhpcation of instructions This step in the process of visualization of PLC programs using XML ensures that the XML document to be used for visualization contains only valid instructions.XSLT can be used to transform the well-formed and valid Xh4L to another XML which as a result of identification on instructions has an additional attribute appended to the instruction tags. This attribute notifies whether the instruction is a valid instruction of the concerned instruction set. This transformation procedure is also capable of attaching attributes to the instruction tags that declares a classification of the instructions into predefined classes. The instruction identification of the transformed XML proofs the semantic of the XML in accordance with the operation types of the PLC programming language. In the example of this section, (cf. Fig. 8), the new XML contains additional attributes which classify the instructions according to the type of operation it represents. The STEPS instructions are categorized into eleven different types of operations e.g. logical, jump, load or transfer operation assignment, etc. &?xml version=&l.O& encOding=&ISO-8859-1& ?& &ILCodeBlock& &ILRow& (Instruction instructionId='Logical Operation&) U&/Instruction& &/ILROW& -. &ILRow& &Instruction instructionId=&Jump Operation&& SPB-&/Instruction& &Instruction instructionId=& special Operation && BE&/Instruction& &/ILROW& &/ILRow& Fig. 8 A new transformed XML showing only the inslructions and the corresponding instruction ID &/ILCodeBlack&E. Visualization of XML Both of the XML documents generated above can be transformed into HTML or other readable documents with the help of XSL. An ingenious XSL can be designed so as to produce an HTML which can convey the logical and other features of the PLC program in an easily conceivable form. Moreover, the DOM structure embedded in the XML (cf. Fig. 9), also enables the user to navigate through the PLC programs in an easy way. For the example the visualization is done in HTML. This visualization is done for the transformed XML after the validation of it's syntax as a table where the child elements of the ILRow are the columns of this table. The XML after the instruction identification is transformed using the XSL, where the instruction and the instruction Id, obtained after extracting the XML according to the type of operations are visualized in a table containing two columns (Instruction, Instruction Id) in HTML. The HTML structures suggested here are not the only possibilities, with which the XML can be visualized, but they give a very easy practical option for the user's grasp of the PLC code. Fig. IO shows the same PLC code as shown in Fig. 4 as a HTML document converted &om the XML document shown in Fig. 7 using XSL. This visualization enables a better understanding of the PLC program. Fig. 11 shows the special visualization of instruction ids given in the XML of Fig. 6. VI. CONCLUSIONS AND OUTLOOK Re-engineering of PLC programs needs a formal approach to be developed. In this paper one way to solve this task is introduced. Based on a given PLC program written in Instruction List a step-wise transformation to a formal representation is proposed. Since this process will not be fully automatic, the need for flexible visualization of intermediate steps is derived. XML is presented as a flexible, standardized means to serve as data format for the description of the PLC code. The corresponding technology of XSL transformations and the Document Object Model are presented as tools for the variety of customized visualization tasks during the re-engineering process. Based on the XML description of PLC programs further transformations will be applied to finally derive a completely formalized description of the original PLC code. This will be in the form of a finite automaton. During this process it is planned to identify common IL structures and formalize them via a library. Gaining the Benefit of the XML Metadata Interchange (XMI) as an open industry standard that applies XML to abstract systems such as UML and referring to the classification of the instructions of IL into the eleven categories mentioned above. We can extract UML classes from this classification, as it resembles the action semantics of UML.VII. AKNOWLDGMENT We would like to express gratitude to the “StiAung Rheinland-Pfalz fir Innovation” for sponsoring our work under project number 616. VIII. REFERENCES 1. L. Baresi, M. Mauri, A. Monti, and M. Pezze, “PLCTools: Design, Formal Validation, and Code Generation for Programmable Controllers”, in. IEEE Conference on Systems, Man, and Cybernefics (SMCZOOO), Nashville, USA, Oct. 2000, pp. . 2. G. Frey and L. Litz, “Formal methods in PLC programming”, in IEEE Con on Systems, Man and Cybernetics (SMC’ZOOO), Nashville, USA, Oct. 2000, pp. . 3. M. Bani Younis and G. Frey, “Formalization of Existing PLC Programs: A Survey.“, in CESA 2003, Lille (France), Paper No. S2-R-00-0239, July 2003. 4. International Electrotechnical Commission, IEC International Standard 1131-3, Programmable Controllers, Part 3, Programming Languages, 1993. 5. World Wide Web Consortium://www.w3.org/ 6. XML Home Page: hftp://xml.com/ 7. R. Kliewer, Reverse Engineering von Steuerungssojiware.Ph.D. thesis, University of Kaiserslautern, Germany,Institute for Production-Automation, 1999. 8. M. Kay, XSLT - Programmer’s Reference. ISBN, Wrox Press Ltd2001
赞助商链接

我要回帖

更多关于 外文译文 的文章

 

随机推荐