5 Model ToC Previous Next

5.2 ProgramStateMachineType ToC Previous Next

5.2.3 ProgramStateMachineType components ToC Previous Next

5.2.3.1 Overview ToC

The ProgramStateMachineType components consist of a set of References to the Object instances of StateTypes, TransitionTypes, EventTypes and the Methods that collectively define the Program FiniteStateMachine.

readme_files/image007.png Figure 5 – Program FSM References

Figure 5 illustrates the component References that define the associations between two of the ProgramStateMachineType’s states, Ready and Running. The complementary ReferenceTypes have been omitted to simplify the illustration.

5.2.3.2 ProgramStateMachineType states ToC

The state Objects are instances of the StateType defined in OPC 10000-16. Each state is assigned a unique StateNumber value defined in Table 6. Subtypes of the ProgramStateMachineType can add references from any state to a subordinate or nested StateMachine Object to extend the FiniteStateMachine.

The Halted state is the idle state for a Program. It can be an initial state or a terminal state. As an initial state, the Program Invocation cannot begin execution due to conditions at the Server. As a terminal state, Halted can indicate either a failed or completed Program. A subordinate state or result can be used to distinguish the nature of the termination. The Halted state references four Transition Objects, which identify the allowed state transitions to the Ready state and from the Ready, Running, and Suspended states.

The Ready state indicates that the Program is prepared to begin execution. Programs that are ready to begin upon their creation may transition immediately to the Ready state. The Ready state references four Transition Objects, which identify the allowed state transitions to the Running and Halted states and from the Halted and Ready states.

The Running state indicates that the Program is actively performing its Function. The Running state references five Transition Objects, which identify the allowed state transitions to the Halted, Ready, and Suspended states and from the Ready and Suspended states.

The Suspended state indicates that the Program has stopped performing its Function, but retains the ability to resume the Function at the point at which it was executing when suspended. The Suspended state references four Transition Objects, which identify the allowed state transitions to the Ready, Running, and Halted state and from the Ready state.

5.2.3.3 ProgramStateMachineType transitions ToC

ProgramStateMachineType Transitions are instances of the TransitionType defined in OPC 10000-16 which also includes the definitions of the ToState, FromState, HasCause, and HasEffect references used. Table 7 specifies the transitions defined for the ProgramStateMachineType. Each transition is assigned a unique TransitionNumber defined in Table 6.

Table 7 – ProgramStateMachineType Additional References

SourceBrowsePath Reference Type Is Forward TargetBrowsePath
HaltedToReady ToState True Ready
  FromState True Halted
  HasCause True Reset
  HasEffect True ProgramTransitionEventType
  HasEffect True AuditProgramTransitionEventType
       
ReadyToRunning ToState True Running
  FromState True Ready
  HasCause True Start
  HasEffect True ProgramTransitionEventType
  HasEffect True AuditProgramTransitionEventType
       
RunningToHalted ToState True Halted
  FromState True Running
  HasCause True Halt
  HasEffect True ProgramTransitionEventType
  HasEffect True AuditProgramTransitionEventType
       
RunningToReady ToState True Ready
  FromState True Running
  HasEffect True ProgramTransitionEventType
  HasEffect True AuditProgramTransitionEventType
       
RunningToSuspended ToState True Running
  FromState True Suspended
  HasCause True Suspend
  HasEffect True ProgramTransitionEventType
  HasEffect True AuditProgramTransitionEventType
       
SuspendedToRunning ToState True Running
  FromState True Suspended
  HasCause True Resume
  HasEffect True ProgramTransitionEventType
  HasEffect True AuditProgramTransitionEventType
       
SuspendedToHalted ToState True Halted
  FromState True Suspended
  HasCause True Halt
  HasEffect True ProgramTransitionEventType
  HasEffect True AuditProgramTransitionEventType
       
SuspendedToReady ToState True Ready
  FromState True Suspended
  HasCause True Reset
  HasEffect True ProgramTransitionEventType
  HasEffect True AuditProgramTransitionEventType
       
ReadyToHalted ToState True Halted
  FromState True Ready
  HasCause True Halt
  HasEffect True ProgramTransitionEventType
  HasEffect True AuditProgramTransitionEventType

The HaltedToReady transition specifies the transition from the Halted to Ready states. It may be caused by the Reset Method.

The ReadyToRunning transition specifies the transition from the Ready to Running states. It is caused by the Start Method.

The RunningToHalted transition specifies the transition from the Running to Halted states. It is caused by the Halt Method.

The RunningToReady transition specifies the transition from the Running to Ready states. The RunningToSuspended transition specifies the Transition from the Running to Suspended states. It is caused by the Suspend Method.

The SuspendedToRunning transition specifies the transition from the Suspended to Running states. It is caused by the Resume Method.

The SuspendedToHalted transition specifies the transition from the Suspended to Halted states. It is caused by the Halt Method.

The SuspendedToReady transition specifies the transition from the Suspended to Ready states. It is caused internally.

The ReadyToHalted transition specifies the transition from the Ready to Halted states. It is caused by the Halt Method.

Two HasEffect References are specified for each Program transition. These effects are Events of ProgramTransitionEventType and AuditProgramTransitionEventType defined in 5.2.5. The ProgramTransitionEventType notifies Clients of the Program transition and conveys result data. The AuditProgramTransitionEventType is used to audit transitions that result from Program Control Methods.

readme_files/image008.png Figure 6 – ProgramStateMachineType causes and effects

Previous Next