Introduction

MOC/SOC asked to provide a state machine diagram of each SWA instruments, with IORs sequences (AIAFxxxx) as transitions.

They want to check if the weekly STP operation plannings are correct or not.

python library

Searching for a python library to handle with "State machine" we could find a package called python-statemachine

This library is able to:

  • provide a syntax to describe the behaviour of SWA instruments as a state machine, using states and transitions

  • draw and display the corresponding diagram

  • simulate the state machine when it receives actions (transitions)

  • check and validate if the transition sequences are OK

Caution

I have currently some problem to generate .png, but I can generate .svg diagram

PAS state machine

Here is a first try to describe PAS state machine

Initial state

  • documents/state_machine/PAS.ini.svg

After 2 steps

  • documents/state_machine/PAS.after.svg

After last step

The software generates an exception:

statemachine.exceptions.TransitionNotAllowed: Can't AIAF006 when in Configured.