摘要
针对自主研制的基于ARM-FPGA的小型可编程控制器,设计了一种小型PLC编程装置的编译系统;该系统采用微处理器LPC2478为硬件平台,选取μC/OS-II系统为软件平台,以ADS1.2为开发工具,选用指令表作为编程语言;设计新的指令系统,以及指令的分类与编码;动态编辑PLC源程序指令文件;分析指令文件的词法、语法和语义,优化其代码,并处理出现的错误,再将其编译成PLC主机能识别的二进制目标代码;通过实验,表明该系统能有效地编辑指令文件及正确编译PLC指令。
According to the independent research small Programmable Logic Controller based on ARM and FPGA, PLC compiling sys- tem is designed. The system adopts the microprocessor LPC2478 as the hardware platform' s core, μC/OS--II system as the software plat- form' s core, ADS1.2 as the development tool, Instruction list as the program language. A new instruction system, classification and coding of instructions are designed. PLC source program instruction file is editted dynamically. The lexical, syntax and semantics of the instruction file are analyzed, and its codes are optimized, and errors appeared are handled, PLC source program instruction file is compiled to create bina- ry object code PLC host can identify. Through the test, the system can edit instruction file effectively and compile PLC instructions correctly.
出处
《计算机测量与控制》
北大核心
2014年第4期1225-1229,共5页
Computer Measurement &Control
基金
广西研究生教育创新计划资助项目(2013105940811M01)
广西科学基金项目(桂科自0991067)