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

Deployment and Test of the TCS_MAIN Metatron Node

Today we put in operation the TCS_MAIN node, which is for now devoted to the automatization of the DAS characterization measurements via the HWS image acquisitions, as recently performed several times. This involves the management and the interaction of several layer of software, which make the controllability of the process not straightforwardly possible only at the Metatron level. Here I try to recap the several layers present, then the node states and their interface with the other software.


Software processes (all in the VPM unless specified):

  • ISYS_EER_DAC : used to drive the INJ HWS, as the flip mirror cannot be used as it is on EIB;
  • TTL_det : used to drive (with the flip mirror) the DET HWS; this will soon be decommissioned and it will be done in a similar way to the INJ one;
  • PyTCS : cm-enabled slow servo for the DAS/CH powers;
  • TCSAgilisRot : used to drive the waveplates for the DAS/CH actuators, handled directly by PyTCS;
  • HWS : cm-enabled server which interacts with the HWS acquisition software (this one is still in the VirgoOnlineTest environment but lives in the same cm space as the others);
  • TTL_co2 : used to drive the flip mirrors for the DAS/CH actuators;
  • TCS_MAIN : Metatron node which uses all of the above.

TCS_MAIN node: it has two configuration files: the usual .ini is where the user should put the desired parameters in the usual way. The .set one is used only by the node itself to store the reference powers of the DAS actuators. List of current states:

  • INIT (idx = 0) : initialization state, nothing is done here but the following; when the node is started a new channel is pushed in the DAQ, named V1:DQ_META_TCS_CALI_ON; when this is 1, it means that the measurement is ongoing or the node is not in a standard state (more below) so that this can be seen by other HWS acquisition softwares to avoid any superposition;
  • DOWN (idx = 1) : standard state when not operational; nothing is done here, besides putting the DQ_META_TCS_CALI_ON channel to 0;
  • DAS_CALI_FAULT (idx = 2, unrequestable) : fault state, where the nodes automatically goes when there is some error or user misconfiguration; the state cannot be exited automatically (redirect = False) and an error message is visible on the interface; user intervention required;
  • DAS_CALI_INIT (idx = 9, unrequestable) : transient state, where the pre-conditions for the measurement are set: the target DAS and RING are read from configuration. Then, the current DAS powers are saved in the .set file, the DQ_META_TCS_CALI_ON flag is put to 1, the PyTCS loop for the chosen actuator is switched off and all the flip mirrors are closed; then, a long cooldown is waited; all of this can be done while the ITF is in the LOCKED_ARMS_IR state (integration has been prepared offline, not deployed yet);
  • DAS_CALI_START (idx = 10, requestable) : steady state, nothing is done here but the state is entered only after the cooldown time; once here, the arms will be unlocked;
  • DAS_CALI_SETUP (idx = 11, unrequestable) : transient state, here the desired actuator to be characterized is prepared: the desired actuator power is read from the configuration file and it is set via the PyTCS process, then its loop is enabled and the relevant flip mirror opened; then the node checks that the power is actually reached by checking the accuracy down to a configurable percentile tolerance; if this does not happen after a configurable time, the DAS_CALI_FAULT state is triggered; instead, upon success, a heat-up time is waited before going on;
  • DAS_CALI_READY (idx = 12, requestable) : steady state, nothing is done here but the state is entered only after the heat-up time;
  • DAS_CALI_ACQUIRE (idx = 13, unrequestable) : transient state, where the actual measurement is performed: first, the relevant HWS is turned on and the other one is disabled; then, the node builds the data path where it expects the several type of images/wavefronts to show up; then, it launches in sequence the three measurements (dark = 1 img; ref = N imgs; live = N wavefronts each from M imgs); each measurement is launched via the HWS process and it waits for the last image (or wavefront) to appear on disk before moving to the next; for each case, there is also a safety timer which triggers the DAS_CALI_FAULT state in case there has been some problem with the Python script it actually launches (or the MATLAB one launched by it downstream);
  • DAS_CALI_DONE (idx = 14, requestable) : steady state, nothing is done here but the state is entered only after all the measurements have been made;
  • DAS_CALI_RESTORE (idx = 15, unrequestable) : transient state where the standard configuration is restored: nothing is done on the HWS, meaning that the one used will be left on while the other one will be left disabled; the reference power of the characterized actuator will be read from the .set configuration file and set as setpoint on its PyTCS loop; then, the same checks of loop convergence vs time/accuracy will be made, with the DAS_CALI_FAULT state as fallback; while doing this, all the flip mirrors will be opened and a heat-up time will be waited; in this state we may try to relock the arms already;
  • DAS_CALI_COMPLETE (idx = 16, requestable) : steady state, nothing is done here besides putting the DQ_META_TCS_CALI_ON channel back to 0, but the state is entered only after everything has been restored.

Commissioning of the node: we tested almost everything (we tried the WI OUTer ring, INJ HWS with low power drifts and smaller times and number of acquisitions) and we made almost everything work; a few things still to be addressed:

  • all the images were acquired correctly, but the wavefronts were not computed: this is because the HWS process launches the hwsAna2021.py script with an absolute path; instead, such script then launches MATLAB passing a local path for other scripts, which therefore cannot be found; this has to be addressed in the hwsAna2021.py script itself;
  • the correct filename for the last wavefront needs to be fixed, as it has a variable number of trailing zeros depending on the number of wavefronts acquired.

Other issues:

  • due to a code error in the _RESTORE state, we made the PyTCS process to crash; due to the ongoing development this was not started and should not be started again unless further notice; the WI OUT DAS power has been restored by hand and it is consistent to what was saved in the reference file;
  • we found a issue about the node itself: I moved it from the VirgoOnlineTest to VirgoOnline and used the standard parameters; however, due to the presence of the /virgoData/Automation/TCS_MAIN.cfg file the standard parameters were overridden and it expected to talk with the FbmMainTest and FbmAlpTest servers instead of the unTest ones, making the node stuck; thanks to Alain and Nicolas we could kill the process and the renaming of such file to TCS_MAIN.bak.cfg prevented other issues;
  • the .ini and .set files still need to be added to svn (swmgr permissions required);
  • the Metatron node consistently crashes when a code LOAD is attempted, even when there is no change in the code itself; this was already found as an issue for the SQZ_FLT node and it is under investigation; my first, naive, guess, given the only thing they have in common and by which they differ from the other nodes, is that the presence of two different configuration files is creating somehow the issue, but this should be tested throughly as an hypothesis.

At the end of the activity the node has been stopped, the integration with ITF_LOCK is still to be done, and the PyTCS process should be left turned off. Node layout is attached.