摘要
基于RTLinux的软件控制器PLC系统,预先定义API函数,利用非实时层框架函数调用API实现相关功能。调用梯形图编辑API时,PLC系统集成梯形图编辑功能,编辑完成的梯形图文件由API进行管理和译码编译。梯形图扫描API,通过读取I/O状态和编译后的梯形图数据结构,进行逻辑解算并将结果传送至驱动模块。驱动模块再调用不同硬件板卡驱动API,最后将解算结果写至硬件板卡端口或从硬件端口上读取I/O状态信号。
The software controller PLC system based on RTLinux defines the API function in advance, and adopts non-real time layer frame function to call API and realize the corresponding functions. When calling trapezium to edit API, the API system integrates the trapezium edit function. The edited trapezium document is managed and coded by API. The trapezium scans API, the logical calculation is carried out and the results are sent to drive module by reading I/O state and coded trapezium data architecture. The drive module calls different hardware board drive API. At last, the calculation results are written to the hardware board port or read I/O state signal from hardware port.
出处
《兵工自动化》
2007年第2期95-96,共2页
Ordnance Industry Automation