摘要
Ovation控制系统组态工程涉及大量文本处理工作,如整理IO清单、点数据库组态、流程图画面组态、控制逻辑图组态等。组态人员经常要从多个不同类型的文件中提取各类信息或批量替换其中的字符串。常规的查找/替换方法只能根据确切的字符串进行简单的查找和替换,这种方法效率低、灵活性差,不适合进行复杂文本处理。正则表达式基于模式匹配法则对文本进行智能查找和替换,功能非常强大。把正则表达式引入Ovation控制系统组态工程,通过多个实例说明了正则表达式的具体应用,开发了基于COM接口,集成了各种正则表达式匹配模式的Excel插件,解决了组态工作中的各种文本处理问题,大大提高了控制系统组态工作效率和质量。
Configuration project of Ovation control system involves a lot of text processing works,such as IO list arrangement,point database configuration,flowchart picture configuration,control logic configuration,etc.Configuration engineers often need to extract a variety of information from documents of different types or need to replace strings of them in batch.Traditional methods of search and replace can only do simple work in this regard according to exact strings,therefore are low efficient and poor compatible,and are not fit to deal with complex text processing.Regular expression can intelligently search and replace the text based on pattern-matching rule,so has very powerful function.In this paper we introduce regular expression into configuration project of Ovation control system,demonstrate through examples the specific application of it,develop the COM interface-based Excel add-ins which integrates various commonly used matching patterns of regular expression,and solve different text processing problems in configuration project,these have greatly improved the efficiency and quality of control system configuration works.
出处
《计算机应用与软件》
CSCD
北大核心
2013年第3期323-326,共4页
Computer Applications and Software