The FiniteStateMachineTypeis the base ObjectTypefor StateMachinesthat explicitly define the possible Statesand Transitions. Once the Statesand Transitionsare defined subtypes shall not add new States andTransitions(see 4.4.18). Subtypesmay add causes or effects.
The Statesof the machine are represented with instances of the StateType ObjectType.Each Stateshall have a BrowseNamewhich is unique within the StateMachineand shall have a StateNumberwhich shall also be unique across all Statesdefined in the StateMachine. Be aware that Statesin a SubStateMachinemay have the same StateNumberor BrowseNameas Statesin the parent machine. A concrete subtype of FiniteStateMachineType shall define at least one State.
A StateMachinemay define one Statewhich is an instance of the InitialStateType. This Stateis the Statethat the machine goes into when it is activated.
The Transitionsthat may occur are represented with instances of the TransitionType. Each Transitionshall have a BrowseNamewhich is unique within the StateMachineand may have a TransitionNumberwhich shall also be unique across all Transitionsdefined in the StateMachine.
The initial Statefor a Transitionis a StateType Objectwhich is the target of a FromState Reference. The final Statefor a Transitionis a StateType Objectwhich is the target of a ToState Reference. The FromStateand ToState Referencesshall always be specified.
A Transitionmay produce an Event. The Eventis indicated by a HasEffect Referenceto a subtype of BaseEventType. The StateMachineTypeshall have GeneratesEvent Referencesto the targets of a HasEffect Referencefor each of its Transitions.
A FiniteStateMachineTypemay define Methodsthat cause a transition to occur. These Methodsare targets of HasCause Referencesfor each of the Transitionsthat may be triggered by the Method. The Executable Attributefor a Methodis used to indicate whether the current Stateof the machine allows the Methodto be called.
A FiniteStateMachineTypemay have sub-state-machines which are represented as instances of StateMachineType ObjectTypes. Each Stateshall have a HasSubStateMachine Referenceto the StateMachineType Objectwhich represents the child States. The SubStateMachineis not active if the parent Stateis not active. In this case the CurrentStateand LastTransition Variablesof the SubStateMachineshall have a status equal to Bad_StateNotActive(see Table 17).
The FiniteStateMachineTypeis formally defined in Table 4.
Table 4– FiniteStateMachineType definition
Attribute |
Value |
|||||
BrowseName |
FiniteStateMachineType |
|||||
IsAbstract |
True |
|||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
|
Subtype of the StateMachineType defined in 4.4.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 |
|
Conformance Units |
||||||
Base Info Finite State Machine Instance |
||||||
Base Info Available States and Transitions |
In some Serversan instance of a StateMachine may restrict the Statesand / or Transitionsthat are available. These restrictions may result from the internal design of the instance. For example, the StateMachinefor 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 Statesand/or Transitionsbased on its operating mode. For example, when a piece of equipment is in a maintenance mode the available Statesmay be limited to some subset of the Statesavailable during normal operation.
The AvailableStates Variableprovides a NodeIdlist of the Statesthat are present in the StateMachine instance. The list may change during operation of the Server.
The AvailableTransitions Variableprovides a NodeIdlist of the Transitionsthat 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 4.
Figure 4– Example of a FiniteStateMachine type
An example instance of the type is shown in Figure 5. In this example the States{7,8,9} and the Transitions{G,H,I,J} are not available in this instance.