期刊文献+

基于顺序功能图的工控机VC编程研究

Research based on sequential function chart in industrial PC with VC programming
下载PDF
导出
摘要 为了在工控机上实现类似于PLC顺序控制的功能,提出了基于顺序功能图的VC编程方法。以一个典型顺序功能图为例,通过单独开线程模拟PLC主扫描循环,从而可以不影响控制系统的其他界面操作;主扫描循环程序依次包含输入映射、步转换、步输出、输出映射等子程序;采用开线程结合Sleep函数实现了PLC定时器功能;给出了实现该顺序功能图的西门子S7-300 PLC主要梯形图程序作为对照,详细描述了其VC实现的步骤和主要代码。采用VC++6.0编程并在PC机上进行了运行调试,通过读取Windows的CPU时间戳的方法对主扫描循环时间进行了测试。研究结果表明,所提出的方法能较好地完成顺序控制功能,扫描时间短,可以满足工业控制要求,具有一定的应用价值。 In order to realize the sequential control function similar to PLC in industrial PC( IPC), a VC programming method based on sequential function chart(SFC) was proposed. Taking a typical SFC as an example, a thread was started to simulate the PLC main scan cycle so as to have no effect on other HMI operations. The main scan cycle program includes the input mapping, the step transferring, the step out- putting and the output mapping sub-program in sequence. The PLC timer was implemented with a new thread and the Sleep function. The main ladder program of Siemens S7-300 PLC to realize this example SFC was proposed, by contrast, the step and the key code to implement it by VC was described in detail. All the code was programmed and debugged with VC + + 6.0 on PC, and the main scan cycle period was measured by the Windows CPU stamp counter. The experiment has proved that the proposed method can well accomplish the sequential control function with short cycle period and meet the industrial control requirement and worth to be applied properly.
出处 《机电工程》 CAS 2015年第6期878-882,共5页 Journal of Mechanical & Electrical Engineering
基金 江苏省科技支撑计划项目(BE2013715) 江苏省科技成果转化专项资金项目(BA2014067)
关键词 工控机 VC 顺序功能图 PLC顺序控制 线程 industrial PC VC sequential function chart PLC sequential control thread
  • 相关文献

参考文献13

二级参考文献19

共引文献132

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部