The invention provides a script language string file macro replacement method, which predefines the annotation mode of the linked script language string in which the display elements of the monitoring screen need to be replaced at future runtime in the source code, draws the monitoring screen, and annotates the related link script language according to the annotation mode. Word string; Making macro substitution string file, which contains the original string that needs to be replaced and the replaced target string; When the monitoring system runs, when the monitoring screen is opened, the prepared macro substitution string file is opened, and the monitoring system automatically replaces the target string with the original word. String and automatically regenerate the link script language string to recompile and run. As long as a monitoring screen is developed and a string replacement file is made, all equipment monitoring pictures can be quickly generated during the second development, thus greatly improving the development efficiency.
【技术实现步骤摘要】
一种脚本语言字符串文件宏替换方法
本专利技术涉及自动化控制领域,特别涉及一种监控系统对设备的监控中,监控画面的脚本语言字符串文件宏替换方法。
技术介绍
随着社会的发展,SCADA系统(数据采集与监视控制系统)的应用越来越广泛,但同时对SCADA系统的技术要求也越高。其中,在人工成本不断增加的今天,给予SGADA系统的二次开发周期也越来越短。HMI(人机界面)是SGADA系统的操作窗口。HMI界面开发是技术员在二次开发时最为耗时的部分。针对界面二次开发,我们发现工程中有大量类似的界面模式,但是由于部分内容不一致需要做大量重复的工作,导致二次开发技术人员工作效率低下,而且占用资源。
技术实现思路
本专利技术要解决的技术问题,在于提供一种脚本语言字符串文件宏替换方法,只要开发好一个监控画面,然后对该画面做一批相关联的字符串替换文件。在打开该画面运行时,指定打开时附加的字符串替换文件就可以快速生成所有的设备监控画面,大大提高了开发效率。本专利技术是这样实现的:一种脚本语言字符串文件宏替换方法,包括:步骤S1、在源代码中预先定义监控画面的显示图素的链接脚本语言字符串中需要在将来 ...
【技术保护点】
1.一种脚本语言字符串文件宏替换方法,其特征在于:包括:步骤S1、在源代码中预先定义监控画面的显示图素的链接脚本语言字符串中需要在将来运行时被替换掉的字符串的标注方式;步骤S2、绘制监控画面,并根据预先定义的所述标注方式,在监控画面的显示图素中的链接脚本语言字符串中,将需要在将来运行时被替换掉的字符串进行标注;步骤S3、制作宏替换字符串文件,该宏替换字符串文件中包含需要被替换掉的原字符串和替换后的目标字符串;步骤S4、监控系统运行时,打开监控画面时通过监控系统的切换窗口或脚本函数附带打开制作好的宏替换字符串文件,监控系统将自动使用所述宏替换字符串文件中的目标字符串替换掉原字 ...
【技术特征摘要】
1.一种脚本语言字符串文件宏替换方法,其特征在于:包括:步骤S1、在源代码中预先定义监控画面的显示图素的链接脚本语言字符串中需要在将来运行时被替换掉的字符串的标注方式;步骤S2、绘制监控画面,并根据预先定义的所述标注方式,在监控画面的显示图素中的链接脚本语言字符串中,将需要在将来运行时被替换掉的字符串进行标注;步骤S3、制作宏替换字符串文件,该宏替换字符串文件中包含需要被替换掉的原字符串和替换后的目标字符串;步骤S4、监控系统运行时,打开监控画面时通过监控系统的切换窗口或脚本函数附带打开制作好的宏替换字符串文件,监控系统将自动使用所述宏替换字符串文件中的目标字符串替换掉原字符串,并自动重新生成链接脚本语言字符串,进行重新编译和运行。2.根据权利要求1所...
【专利技术属性】
技术研发人员:魏伏华,
申请(专利权)人:福州芝麻智能科技有限公司,
类型:发明
国别省市:福建,35
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。