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

Research based on sequential function chart in industrial PC with VC programming

在线阅读下载全文

作  者:熊田忠[1,2] 叶文华[1] 杨斌[1] 毛冬辉 王祺奥 黄艳飞 

机构地区:[1]南京航空航天大学机电学院,江苏南京210016 [2]三江学院电气与自动化工程学院,江苏南京210012 [3]南京欧创数控机床有限公司,江苏南京211199

出  处:《机电工程》2015年第6期878-882,共5页Journal of Mechanical & Electrical Engineering

基  金:江苏省科技支撑计划项目(BE2013715);江苏省科技成果转化专项资金项目(BA2014067)

摘  要:为了在工控机上实现类似于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.

关 键 词:工控机 VC 顺序功能图 PLC顺序控制 线程 

分 类 号:TH39[机械工程—机械制造及自动化] TP273.5[自动化与计算机技术—检测技术与自动化装置]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象