有限状态机是一种常用的用来处理过程不同状态的方法。数控系统是一个复杂且具有不同层次实时性要求的多任务控制器,数控系统在运行过程中往往要处理复杂的状态切换,如何保证系统内部各任务有序正确的运行是系统设计的重要内容,通过研究状态机的基本原理,结合开放式数控系统任务管理模块在控制过程中的状态切换,提出了使用状态机来解决数控系统复杂的任务管理,从而使系统任务管理模块逻辑更加清晰,并提高了系统的健壮性。
FSM(Finite State Machine)is a method to be used in procesing different states.While the NC system is a complex multi-tasking controller that require different realtime levels,which needs to deal with the complex state-changing.It how to ensure the correct order for each task within the system's operation is an important part of system design.The principle of the FSM is firstly studied combining with the state-switch of the open CNC system's task management module in the control process,a method,employing FSM,is put forward to solve complex CNC task management of the open CNC system,which makes logic of the task management module more clear and the system more stronger and healthy.