Annex B (normative) StateMachines ToC Previous Next

B.4 Representation of state machines in the AddressSpace ToC Previous Next

B.4.5 FiniteStateMachineType ToC Previous Next index

The FiniteStateMachineType is the base ObjectType for StateMachines that explicitly define the possible States and Transitions. Once the States and Transitions are defined subtypes shall not add new States and Transitions (see B.4.18). Subtypes may add causes or effects.

The States of the machine are represented with instances of the StateType ObjectType. Each State shall have a BrowseName which is unique within the StateMachine and shall have a StateNumber which shall also be unique across all States defined in the StateMachine. Be aware that States in a SubStateMachine may have the same StateNumber or BrowseName as States in the parent machine. A concrete subtype of FiniteStateMachineType shall define at least one State.

A StateMachine may define one State which is an instance of the InitialStateType. This State is the State that the machine goes into when it is activated.

The Transitions that may occur are represented with instances of the TransitionType. Each Transition shall have a BrowseName which is unique within the StateMachine and may have a TransitionNumber which shall also be unique across all Transitions defined in the StateMachine.

The initial State for a Transition is a StateType Object which is the target of a FromState Reference. The final State for a Transition is a StateType Object which is the target of a ToState Reference. The FromState and ToState References shall always be specified.

A Transition may produce an Event. The Event is indicated by a HasEffect Reference to a subtype of BaseEventType. The StateMachineType shall have GeneratesEvent References to the targets of a HasEffect Reference for each of its Transitions.

A FiniteStateMachineType may define Methods that cause a transition to occur. These Methods are targets of HasCause References for each of the Transitions that may be triggered by the Method. The Executable Attribute for a Method is used to indicate whether the current State of the machine allows the Method to be called.

A FiniteStateMachineType may have sub-state-machines which are represented as instances of StateMachineType ObjectTypes. Each State shall have a HasSubStateMachine Reference to the StateMachineType Object which represents the child States. The SubStateMachine is not active if the parent State is not active. In this case the CurrentState and LastTransition Variables of the SubStateMachine shall have a status equal to Bad_StateNotActive (see Table B.17).

The FiniteStateMachineType is formally defined in Table B.4.

Table B.4 – FiniteStateMachineType Definition

Attribute Value        
BrowseName FiniteStateMachineType        
IsAbstract True        
References Node Class BrowseName DataType TypeDefinition Modelling Rule
Subtype of the StateMachineType defined in 6.2.          
HasComponent Variable CurrentState LocalizedText FiniteStateVariableType Mandatory
HasComponent Variable LastTransition LocalizedText FiniteTransitionVariableType Optional
HasComponent Variable AvailableStates NodeId[] BaseDataVariableType Optional
HasComponent Variable AvailableTransitions NodeId[] BaseDataVariableType Optional

In some Servers an instance of a StateMachine may restrict the States and / or Transitions that are available. These restrictions may result from the internal design of the instance. For example the StateMachine for an instrument’s limit alarm which only supports Hi and HiHi and can not produce a Low or LowLow. An instance of a StateMachine may also dynamically change the available States and/or Transitions based on its operating mode. For example when a piece of equipment is in a maintenance mode the available States may be limited to some subset of the States available during normal operation.

The AvailableStates Variable provides a NodeId list of the States that are present in the StateMachine instance. The list may change during operation of the Server.

The AvailableTransitions Variable provides a NodeId list of the Transitions that are present in the StateMachine instance. The list may change during operation of the Server.

An example of a FiniteStateMachine type is shown in Figure B.4 below.

readme_files/image014.png Figure B.4 – Example of a FiniteStateMachine type

An example instance of the type is shown in

Figure B.5. In this example the States {7,8,9} and the Transitions {G,H,I,J} are not available in this instance.

readme_files/image015.png Figure B.5 – Example of a FiniteStateMachine instance

Previous Next