Today I started to implement some modifications to the node, in order to have it also automatically set the Science Mode; this is a follow-up to the AUTORELOCK_FAILSAFE functionality, meaning that the AutoScience mode will force also the Failsafe to be on. For the time being we decided (see issue 100) not to constrain this with the BNS Range, both for methodological and DAQ reasons.
There are two new states and a modified one:
- AUTOSCIENCE_ON (new, idx = 200): this is after AUTORELOCK_FAILSAFE in the same path, so it will be executed after it; it will set an (internal) global flag "autorelock" True, that is used in the other states of the node (the "automatic" LOCKED, NOT_LOCKED and LOCKING states which follow automatically the status of the interferometer; it will also set to 1 a new channel DQ_META_AUTORELOCK_AUTOSCIENCE, which can be used also in the DMS; as it happens for the AUTORELOCK_FAILSAFE state, this new one is executed to turn on things, but then the node will fall back to the appropriate one of the three channels listed above; finally, this state will enable the management of both ITF_LOCK (as the Autorelock did already) and ITF_STATUS;
- AUTOSCIENCE_OFF (new, idx = 175): this is similar to the STOP state, but it will turn off ONLY the AutoScience feature, and it will set free only ITF_STATUS; the Autorelock will be still enabled;
- STOP: already present, now it will turn off both the Autorelock failsafe and the Autoscience;
- LOCKED: in here now we make the check: if the Autoscience is enabled, and if we are in PREPARE_SCIENCE, after a timer the node will request SCIENCE to ITF_STATUS; now the timer is 10 seconds for testing purposes, but we may want to have a larger one, both to make sure that we didn't unlock immediately at the end of the acquisition, and to allow also the injection of the squeezing without going in and out of Science for a few seconds before engaging it;
- LOCKING: no change;
- NOT_LOCKED: when we unlock, ITF_STATUS will go out of SCIENCE automatically; in case AutoScience is on, ITF_CONDITIONS would complain that ITF_STATUS changed request; so here we force ITF_STATUS to go to PREPARE_SCIENCE as it would already do by itself.
Things tested:
- automatic transition to Science;
- engagement/disengagement of the Autoscience feature;
- transition to SCIENCE blocked if ITF_STATUS is not in PREPARE_SCIENCE.
Things not tested:
- correct transition in case of unlock;
- correct management in case of squeezing engagement (i.e. moving from one Science-allowed state to another, with part of the lock acquisition in-between);
- improve node management in case only Autorelock Failsafe is on and not AutoScience;
- extensive testing.
The current manual functionality should have been left alone, as everything happens only when autoscience == True.
In case other debugging channels are needed let me know. The new states layout is attached.