针对以微处理器为核心的传统PLC存在实时性低、灵活性差的问题,提出一种基于FPGA的PLC实现方案,建立在FPGA平台并行扫描执行PLC程序的依赖模型。并行化PLC程序,使FPGA平台的PLC程序能够被并行执行,大幅提升PLC的实时性。提出IEC61131-3标准的结构化文本语言到硬件描述语言(HDL)的转换方法和FPGA平台下IEC61131-3基础功能模块库实现方法,实现结构化文本程序转换生成FPGA平台的PLC程序。通过实验验证了FPGAPLC控制器的可行性及性能。
Aimming at poor timeliness and flexibility of traditional PLC with the core of microprocessor,a PLC implementation scheme based on FPGA was proposed.A dependency model for parallel scan execution of PLC programs was built on the FPGA platform.PLC program was paralleled,making the FPGA platform PLC program be executed in parallel,thus greatly enhancing the real-time performance of PLC.The method of transforming IEC61131-3standard structured text language to the hardware description language(HDL)and IEC61131-3basic function module library realization method on FPGA platform were proposed,the structured text program was converted into PLC program of FPGA platform.The feasibility and performance of the FPGA-PLC controller are verified by experiments.