Virgo Logbook
UTC--:--:--
GPS-
Reports
AdV-COM›automation #56229

Autorelock implementation

Today we worked on the Autorelock implementation, on two different items.


DRMI_LOCK node: what was still missing was to fix the issue reported in #56174, which is correct implementation of the management of the SUS_PR node by the DRMI_LOCK node during the initial DRMI lock acquisition, in case that the PR safety trips (Figure 1, last Thursday night).

The code changes are only in the DRMI_LOCK node, in the ACQUIRE_DRMI_1F state: here we delayed by 1 cycle the assessment of the state of SUS_PR, which is now successful; as a result, the logic of the state ACQUIRE_DRMI_1F had to be revised, as it could lead to the node actually preventing the usual misalignement of the PR done by hand in order to perform the DRMI pre-alignment.

As a consequence, after entering such state the user must wait until the notification disappears (a few seconds if everything is in place already) before performing the pre-alignment by hand.

Four forced tests of this have been performed; in all of them the DRMI_LOCK node correctly acknowledged the PR being tripped, and brought it back before re-attempting the lock of the DRMI.


ITF_STATUS node: here the issue was that, with the Autorelock engaged, after the timeout was reached the node did acquire control of the main locking node, ITF_LOCK, but it did not request the fallback state to be reached (Figure 2); the code of the LOCKING state of such node has been revised, and we enforced the management of ITF_LOCK by ITF_STATUS as soon as the Autorelock is engaged, not only in the case we need the fallback; this has the following consequences/advantages:

  • if ITF_LOCK is managed (i.e. the GUI is purple), the user knows that the Autorelock has been enabled, without the need of checking ITF_STATUS; in this case, the user can disable the Autorelock by asking ITF_STATUS the STOP state, in which ITF_LOCK will return un-managed;
  • we don't need to use perilous time.sleep calls inside the Metatron code.

The code has been prepared but we could not test it due to lack of time, so it's still not in production.

1 comment

carbognani, magazzu · 3 Jul 2022 · 16:44 #56337

The goal of the shift was to verify the safety of lock losses when autorelock_failsafe is engaged, in particular considering the issues emerged during the previous tests.

The actions and tests performed were the following:

  • Restart of the ITF_STATUS node, verifying that the new stategy for management of ITF_LOCK node worked correctly, namely:

    • The management of ITF_LOCK by ITF_STATUS is performed while entering into AUTORELOCK_FAILSAFE

    • It is unmanage (by setting its MODE to AUTO) inside the STOP state and in any other human controlled state (COMMISSIONING, MAINTENANCE, etc.)

  • During the tests we encountered an error condition as soon as there was an unlock and transition to DOWN of ITF_LOCK plus transition to NOT_LOCKED of ITF_STATUS. In that case, an occurrence of ITF_LOCK stall was happening but the use of the standard unstall_nodes() decorator lead to an exeption. unstall_nodes() issue a guardian.Node.revive() command, which re-requests the last requested state but there was not any previous requested state. To overcome the problem a new decorator unstall_itf_lock() was introduced just issuing a request of the currently requested state:  nodes['ITF_LOCK'] = ezca['GRD-ITF_LOCK_REQUEST']

  • Test of the autorelock in case the retry number of locking attempts exceeds the max allowed retries set in the ini file (See plot #1, #2). For this test we set: locked_state_index = 65, locked_state_sqz_index = 65, max_lock_retries = 10 during the first test, 5 in the second, max_trans_duration = 2400. To perform systematics unlocks we waited for ITF_LOCK to surpass the step LOCKED_ARMS_IR_ALS and, from VPM, we closed and opened the Flip Mirror on the Green Path on SNEB. The test was performed twice to take into accounts modification of ITF_STATUS. At the end of both tests ITF_STATUS acknowledged the number of retries exceeded the one indicated and asked ITF_LOCK for the Fallback State (LOCKED_ARMS_IR). 

  • Test the autorelock to verify the retry count reset for the locking attempts in case ITF_LOCK could reach the target state (see Plot #3). For this test we set: locked_state_index = 58, locked_state_sqz_index = 58, max_lock_retries = 10, max_trans_duration = 2400. We manually triggered an unlock during the first attempt to increase the value of AUTRELOCK_RETRIES by 1, then to reach it the target. The counter resetted after ITF_STATUS switched to LOCKED State.

  • Test the autorelock in case the current locking attempt exceeds the max allowed duration set in the ini file (see plot #4). For this test we set:  locked_state_index = 65, locked_state_sqz_index = 65, max_lock_retries = 10, max_trans_duration = 300. To perform this test we manually set ITF_STATUS in AUTORELOCK_FAILSAFE, then asked ITF_LOCK to reach LOCKED_ARMS_BEAT_DRMI_1F. The timeout was triggered every time, putting the ITF back in the Fallback State (LOCKED_ARMS_IR). This test was repeated multiple times to verify its robustness.

  • Finally, we tried to reproduce the issue happened on June 13 Morning (see plot #5): after disengaging the Autorelock, the ITF was manually put in LOCKED_ARMS_IR but, after an unlock, it tried to reach CARM_NULL_1F. For this test we replicated the same condition of Sunday: while at LOCKING_ARMS_BEAT_DRMI_1F, we disegnaged the Autorelock and ask ITF_LOCK to go to LOCKED_ARMS_IR. After reaching this state, we triggered an unlock (by unlocking the IMC via VPM) and verified that it went back to LOCKED_ARMS_IR.

 

In the last 1/2 hour of the shift, while satisfied with the autorelock tests results we have attempted to put in operation a node (INJ_MAIN) running using the python3 ported version of metatron. After a simple and plain conversion of the user code via 2to3 (impacting actually only 2 lines of code) we made the node running and be managed by ITF_LOCK while reaching LOCKED_ARMS_IR without any evident misbehaviour. We have then reversed to the python2 version of the node. The generated data and logs will be analized offlline but this test result look quite promising for a smooth python3 porting.