文档详情

软PLC梯形图向指令表转化的算法研究与实现.PDF

发布:2017-03-24约1.17万字共4页下载文档
文本预览下载声明
第 11期 组 合 机 床 与 自动 化 加 工 技 术 NO.11 2013年 l1月 M odularM achineTool AutomaticM anufacturingTechnique NOV.2013 文章编号 :1001—2265(2013)11—0061—03 软 PLC梯形图向指令表转化的算法研究与实现水 韩 江,段 少磊 ,夏 链 ,董方方 (合肥工业大学 机械 与汽车工程学院,合肥 230009) 摘要 :梯形 图与指令表是 PLC中最常用的两种语言。其中梯形 图形象直观 ,易于编程 ,但梯形 图往往 需要转换为指令表语 言才能在 PLC运行 系统中解释执行。针对上述 问题提 出了一种适用于数控机 床软 PLC的梯形图向指令表转换的算法。该算法基于 AOV图映射 ,将梯形 图程序存储为邻接表数 据结构,采用拓扑排序方法将邻接表 中内容按指令表逻辑顺序输 出,最终实现梯形图向指令表 的转 化 。论文给出了该算法在 自主开发的软 PLC中的一个应用实例 ,描述了梯形图向指令表转化 的主要 思想和实现过程 。 关键词 :软 PLC;梯形 图;指令表 ;AOV图;邻接表 ;拓扑排序 中图分类号:TH164;TG659 文献标识码 :A Research and Implem entationofAlgorithm from LD toSTL in SoftPLC HAN Jiang,DUAN Shao—lei,XIA Lian,DONG Fang-fang (SchoolofMechanicalandAutomotiveEngineering,HefeiUniversityofTechnology,Hefei230009,China) Abstract:Ladderdiagram and instruction tablearethetwo mostcommonly used language in thePLC Ladderdiagram foritsintuitive image iseasilytoprogram ,butofrbeing interpretedandexecutedbythe PLC runtime system ,itoften need toconve~ to instruction table.In view oftheabovequestion,an al— gorithm oftransformationfrom ladderdiagram toinstructiontableofrthesoftPLC ofCNC machinetools ispresented.BasingonAOVdiagraph,Ladderdiagram isstoredofradjacencylistinthisalgorithm,and thecontentsoftheadjacencylistareoutputaccordingtoinstructiontablelogicalsequencebythetopolog— icalsortmethod.Finally,thertansformation from ladderdiagram to instruction table iscompleted.An exampleoftransformation in the self—developed softPLC isgiven in thepaper,which introducesthe mainideaofthealgorithm andrealizationprocess. Keywords:softPLC;ladderdiagram;instructiontable;AOVdiagraph;adjacencylist;topologicalsort 所以研究一种切实可行的梯形图向指令表转化的算 0 引言
显示全部
相似文档