PackML 从会到不会——状态机(1)
最近又重新在想起标准化的东西。在工控行业要说设备标准化哪个最成功的——当属 PackML。所以开此坑,用于记录学习(啃标准文档)的过程.
状态机(Unit / Machine States)
定义(Definition)
A unit / machine state completely defines the current condition of a machine. A machine state is expressed as an ordered procedure, or programming routine, that can consist of one or more commands to other Procedural Elements1 or equipment entities, or consist of the status of a Procedural Element or equipment entity, or both. In performing the function specified by the state, the machine software will issue a set of commands to the machine Procedural Elements or equipment entities which in turn can report status.
Only one major processing activity may be active in one Machine at any time. The linear sequence of major activities will drive a strictly sequentially ordered flow of control from one State to the next State – no more than one state of the base model is allowed to be active in one Machine at the same time.
简而言之,就是设备状态反映了设备当前的状况。这个状态可以根据程序以及外部设备的命令(输入信号)来改变,同时需要将设备当前的状态(输出信号)反馈出来。
在任何时候,一台设备中只能处于一个状态。而且从一个状态跳到下一个状态有严格有序的控制流,不允许一台机器同时激活超过一个状态。
状态类型(Types of States)
For the purposes of understanding three machine state types are defined:
Acting State: A state which represents some processing activity. It implies the single or repeated execution of processing steps in a logical order, for a finite time or until a specific condition has been reached. In ANSI/ISA 88.00.01 these are referred to Transient states, those states ending in “ING”.
Wait State: A state used to identify that a machine has achieved a defined set of conditions. In such a state, the machine is maintaining a status until transitioning to an Acting state. In ANSI/ISA 88.00.01 this was referred to as a “Final” or Quiescent” state.
Acting State:过渡状态(代理状态)。进入这此状态后,它会在有限的时间内或到达到特定条件之后就会跳出该状态。这些状态都以“ING”结尾。主要是用来解决设备状态跳转过程中需要处理的信号。
Wait State:稳定状态(等待状态)。在这种状态下,设备会保持一个状态,直到转换到 Acting 状态。
双重状态:既是 Acting State,又是 Wait State。Execute 是其唯一的状态。
状态定义(Defined States)
定义中规定了状态机系统最小要求包含 Stopped、Idle、Execute、Aborted 四个状态
状态转换及状态命令(State Transitions and State Commands)
A state transition is defined as a passage from one state to another. Transitions between states will occur as a result of a local, remote, or procedural State Command. State Commands are procedural elements that in effect cause a state transition to occur.
状态转换,即从一个状态过渡到另一个状态。而状态转换通过状态命令来进行。
State Commands are comprised of one or a combination of the following types:
Operator intervention.
Response to the status of one or more procedural elements.
Response to machine conditions.
The completion of an Acting state procedure.
Supervisory or remote system intervention.
状态命令则可以由一下一种或则多种组合完成:
操作员干预。
对一个或多个程序触发的状态做出回应。
对设备条件(内部或外部)的响应。
完成 Acting State 的程序。
监督或远程系统干预。
状态转换的例子(Examples of State Transitions)
使用同一个物理接口来同时表示 reset 命令和 clear 命令是比较常见的用法。
允许在 Idle、Complete、Stopped 和 Resetting 状态下执行 stop 或者 abort 命令。
状态模型(State Model)
A State Model completely defines the behaviour of a machine in one unit control mode. In a State Model, states are arranged in an ordered fashion that is consistent with the specified operation of the machine. The specific states required are dependent on the machine operation.The compilation of all defined functional states and their transitions is called the Base State Model.
状态模型完全定义了设备在一种模式下的行为。在状态模型中,状态严格按照设备的控制流有序排列。而所需的特定状态则需要通过规定的状态转换得来。
定义了所有的功能状态及其转换的模型称为基本状态模型。
基本状态模型(Base State Model)
深灰色轮廓内的状态可以转换为 STOPPING 状态或 ABORTING 状态。
浅灰色轮廓内的状态可以转换为 ABORTING 状态。
本文作者: Jacob Chen
本文链接: https://jacobcj.gitee.io/2021/11/26/01PackMLMachineState/
版权声明: 本博客所有文章除特别声明外,均采用 BY-SA 许可协议。转载请注明出处!
版权声明: 本文为 InfoQ 作者【陈的错题集】的原创文章。
原文链接:【http://xie.infoq.cn/article/a3d1cf392309d5141fe8dcc11】。
本文遵守【CC BY-SA】协议,转载请保留原文出处及本版权声明。
评论