摘要
在编译型PLC的研发过程中,为使PLC的通信具有通用性和开放性,采用了Modbus协议。针对中断数据收发会占用大量CPU的问题,以及几种常用PLC通信方式的优缺点,通过对Modbus协议的研究,在ARM技术和操作系统的支持下,结合编译型PLC的特点,提出了一种中断组合DMA的数据收发新方法和一种多任务通信方法,实现了一种实时性较好、CPU占用量较少的适合于编译型PLC串行链路上的Modbus服务器通信。测试结果表明了程序的正确性。
In order to make the communication of complied PLC which is researched and implemented to be compatible and open, Modbus protocol is adopted. Aiming at data transmission through interrupt will take up a lot of CPU time, and the advantages and disadvantages of several kinds of PLC communication mode,through the study of Modbus protocol,with the support of ARM technology and RTOS, and according to the characteristics of compiled PLC, a new combinational way of DMA and interrupt, and a effective multitask way is proposed. Finally, a kind of serial link Modbus communication that is higher real-time, lesser CPU occupation, and suitable to complied PLC is implemented. The test results turned out that the correctness of the program.
出处
《机电工程技术》
2014年第12期210-214,共5页
Mechanical & Electrical Engineering Technology