摘 要:文章基于有限状态机原理提出一种实现专变终端控制模块业务功能的设计方案。专变终端控制模块的各项控制功能存在较为复杂的关联性,在多种类型的控制同时工作时,控制输出需要应对的事件和条件较多,为了使程序设计框架足够稳健,代码逻辑更有条理,在控制模块的设计中引入有限状态机的方法,降低了复杂业务功能代码维护和调试的难度。
关键词:专变终端;控制模块;程序设计;状态机
DOI:10.19850/j.cnki.2096-4706.2022.08.007
中图分类号:TP23 文献标识码:A 文章编号:2096-4706(2022)08-0025-05
Design and Implementation of Control Module for State Grid Special Transformer Terminal Based on State Machine Method
ZHOU Junwu
(Ningbo Singsung Smart Electric Co., Ltd., Ningbo 315034, China)
Abstract: Based on the principle of finite state machine, this paper presents a design scheme to realize the service function of the control module of special transformer terminal. Various control functions of the special transformer terminal control module have complex correlations. When various types of control work at the same time, the control output needs to deal with many events and conditions. In order to make the program design framework enough robust and the code logic more organized, the finite state machine method is introduced into the design of the control module to reduce the difficulty of maintaining and debugging the code of complex service functions.
Keywords: special transformer terminal; control module; programming; state machine
参考文献:
[1] 国家电网公司 . 电力用户用电信息采集系统技术规范第 1部分:专变采集终端技术规范:Q/GDW 1374.1—2013 [S]. [ 出版社不祥 ],2013.
[2] 嵌入式大杂烩微信公众号 . 嵌入式之状态机编程 [EB/OL].(2021-07-19)[2022-03-22].https://mp.weixin. qq.com/s?__biz=MzU5MzcyMjI4MA==&mid=2247498776& idx=1&sn=02b2f3d1747ede0cbfb9d52e85e1fa55&chksm=fe0e 92dfc9791bc9513fbd4b1613f26e6df0ab91445dbea628516afe54c afc13e4ed301aa120&scene=21#wechat_redirect.
[3] 张智峰,李亚军,梁爽 . 基于 STM32F103 国网专变采集终端设计 [J]. 电子技术与软件工程,2013(19):62-63.
[4] 国家电网公司 . 电力用户用电信息采集系统检验技术规范第 2 部分:专变采集终端检验技术规范:Q/GDW 379.2—2009 [S].[ 出版社不详 ],2009.
[5] 国家电网公司 . 电力用户用电信息采集系统功能规范:Q/GDW 1373—2013 [S]. [ 出版社不详 ],2013.
作者简介:周军武(1994—),男,汉族,浙江丽水人,工程师,本科,研究方向:电网信息采集设备研发。