From 662fd409c8687a37b6e127c76589fb6c994a8f2c Mon Sep 17 00:00:00 2001
From: Emilio Asensi <emilio.asensiconejero@esss.se>
Date: Mon, 8 Mar 2021 09:02:43 +0100
Subject: [PATCH] Adjusted state machine opi after C3S modifs

---
 .../TS2/ts2-cryomodule/TS2_modeSelector.bob   | 405 ++++++++++--------
 1 file changed, 218 insertions(+), 187 deletions(-)

diff --git a/NON-APPROVED/TS2/ts2-cryomodule/TS2_modeSelector.bob b/NON-APPROVED/TS2/ts2-cryomodule/TS2_modeSelector.bob
index 1fc39209..baaeec66 100644
--- a/NON-APPROVED/TS2/ts2-cryomodule/TS2_modeSelector.bob
+++ b/NON-APPROVED/TS2/ts2-cryomodule/TS2_modeSelector.bob
@@ -91,132 +91,92 @@ else:
     <y>310</y>
     <width>180</width>
     <height>100</height>
+    <off_label>Stand-by 80K</off_label>
     <off_color>
       <color name="LED-GREEN-OFF" red="90" green="110" blue="90">
       </color>
     </off_color>
+    <on_label>Stand-by 80K</on_label>
     <on_color>
       <color name="LED-GREEN-ON" red="70" green="255" blue="70">
       </color>
     </on_color>
+    <font>
+      <font family="Source Sans Pro" style="REGULAR" size="24.0">
+      </font>
+    </font>
     <square>true</square>
   </widget>
   <widget type="led" version="2.0.0">
     <name>Standby4K</name>
-    <pv_name>TS2-010:Cryo-Virt-MODSEL:OpMode_StandBy4K</pv_name>
+    <pv_name>TS2-010:Cryo-Virt-900:si_StandBy_4K</pv_name>
     <x>1270</x>
     <y>310</y>
     <width>180</width>
     <height>100</height>
+    <off_label>Stand-by 4K</off_label>
     <off_color>
       <color name="LED-GREEN-OFF" red="90" green="110" blue="90">
       </color>
     </off_color>
+    <on_label>Stand-by 4K</on_label>
     <on_color>
       <color name="LED-GREEN-ON" red="70" green="255" blue="70">
       </color>
     </on_color>
+    <font>
+      <font family="Source Sans Pro" style="REGULAR" size="24.0">
+      </font>
+    </font>
     <square>true</square>
   </widget>
   <widget type="led" version="2.0.0">
     <name>Standby2K</name>
-    <pv_name>TS2-010:Cryo-Virt-MODSEL:OpMode_StandBy2K</pv_name>
+    <pv_name>TS2-010:Cryo-Virt-900:si_StandBy_2K</pv_name>
     <x>1730</x>
     <y>310</y>
     <width>180</width>
     <height>100</height>
+    <off_label>Stand-by 2K</off_label>
     <off_color>
       <color name="LED-GREEN-OFF" red="90" green="110" blue="90">
       </color>
     </off_color>
+    <on_label>Stand-by 2K</on_label>
     <on_color>
       <color name="LED-GREEN-ON" red="70" green="255" blue="70">
       </color>
     </on_color>
+    <font>
+      <font family="Source Sans Pro" style="REGULAR" size="24.0">
+      </font>
+    </font>
     <square>true</square>
   </widget>
   <widget type="led" version="2.0.0">
     <name>Nom2K</name>
-    <pv_name>TS2-010:Cryo-Virt-MODSEL:OpMode_Nominal2K_RF</pv_name>
+    <pv_name>TS2-010:Cryo-Virt-900:si_NominalOperation</pv_name>
     <x>2350</x>
     <y>310</y>
     <width>180</width>
     <height>100</height>
+    <off_label>Nominal
+2K + RF</off_label>
     <off_color>
       <color name="LED-GREEN-OFF" red="90" green="110" blue="90">
       </color>
     </off_color>
+    <on_label>Nominal
+2K + RF</on_label>
     <on_color>
       <color name="LED-GREEN-ON" red="70" green="255" blue="70">
       </color>
     </on_color>
-    <square>true</square>
-  </widget>
-  <widget type="action_button" version="3.0.0">
-    <name>Standby4K</name>
-    <actions>
-      <action type="write_pv">
-        <pv_name>TS2-010:Cryo-Virt-MODSEL:Cmd_Stand_by_4K</pv_name>
-        <value>1</value>
-        <description>Stan-by at 4K</description>
-      </action>
-    </actions>
-    <text>Stand-by
-4K</text>
-    <x>1280</x>
-    <y>320</y>
-    <width>160</width>
-    <height>80</height>
-    <font>
-      <font family="Digital Readout Thick Upright Regular" style="REGULAR" size="21.0">
-      </font>
-    </font>
-    <tooltip>$(actions)</tooltip>
-    <show_confirm_dialog>true</show_confirm_dialog>
-  </widget>
-  <widget type="action_button" version="3.0.0">
-    <name>Standby2K</name>
-    <actions>
-      <action type="write_pv">
-        <pv_name>TS2-010:Cryo-Virt-MODSEL:Cmd_Stand_by_2K</pv_name>
-        <value>1</value>
-        <description>Stand-by at 2K</description>
-      </action>
-    </actions>
-    <text>Stand-by
-2K</text>
-    <x>1740</x>
-    <y>320</y>
-    <width>160</width>
-    <height>80</height>
     <font>
-      <font family="Digital Readout Thick Upright Regular" style="REGULAR" size="21.0">
-      </font>
-    </font>
-    <tooltip>$(actions)</tooltip>
-    <show_confirm_dialog>true</show_confirm_dialog>
-  </widget>
-  <widget type="action_button" version="3.0.0">
-    <name>2KRF</name>
-    <actions>
-      <action type="write_pv">
-        <pv_name>TS2-010:Cryo-Virt-MODSEL:Cmd_Nominal_2K_RF</pv_name>
-        <value>1</value>
-        <description>Nominal at 2K with RF operating</description>
-      </action>
-    </actions>
-    <text>Nominal
-2K + RF</text>
-    <x>2360</x>
-    <y>320</y>
-    <width>160</width>
-    <height>80</height>
-    <font>
-      <font family="Digital Readout Thick Upright Regular" style="REGULAR" size="21.0">
+      <font family="Source Sans Pro" style="REGULAR" size="24.0">
       </font>
     </font>
-    <tooltip>$(actions)</tooltip>
-    <show_confirm_dialog>true</show_confirm_dialog>
+    <square>true</square>
   </widget>
   <widget type="action_button" version="3.0.0">
     <name>WarmCond</name>
@@ -230,34 +190,12 @@ else:
     <pv_name>TS2-010:Cryo-Virt-900:cmd_WarmCond</pv_name>
     <text>Warm
 Conditioning</text>
-    <x>680</x>
-    <y>680</y>
-    <width>160</width>
-    <height>80</height>
+    <x>690</x>
+    <y>630</y>
+    <width>154</width>
+    <height>57</height>
     <font>
-      <font family="Digital Readout Thick Upright Regular" style="REGULAR" size="21.0">
-      </font>
-    </font>
-    <tooltip>$(actions)</tooltip>
-    <show_confirm_dialog>true</show_confirm_dialog>
-  </widget>
-  <widget type="action_button" version="3.0.0">
-    <name>Standby80K</name>
-    <actions>
-      <action type="write_pv">
-        <pv_name>TS2-010:Cryo-Virt-MODSEL:Cmd_Stand_by_80K</pv_name>
-        <value>1</value>
-        <description>Stand-by at 80K</description>
-      </action>
-    </actions>
-    <text>Stand-by
-80K</text>
-    <x>870</x>
-    <y>320</y>
-    <width>160</width>
-    <height>80</height>
-    <font>
-      <font family="Digital Readout Thick Upright Regular" style="REGULAR" size="21.0">
+      <font family="Digital Readout Thick Upright Regular" style="REGULAR" size="18.0">
       </font>
     </font>
     <tooltip>$(actions)</tooltip>
@@ -265,7 +203,6 @@ Conditioning</text>
   </widget>
   <widget type="textupdate" version="2.0.0">
     <name>State</name>
-    <pv_name>TS2-010:Cryo-Virt-MODSEL:OpMode_State</pv_name>
     <x>330</x>
     <y>20</y>
     <width>30</width>
@@ -278,7 +215,6 @@ Conditioning</text>
   </widget>
   <widget type="textupdate" version="2.0.0">
     <name>Mode</name>
-    <pv_name>TS2-010:Cryo-Virt-MODSEL:OpMode_Msg</pv_name>
     <x>430</x>
     <y>20</y>
     <width>280</width>
@@ -314,7 +250,6 @@ Conditioning</text>
   </widget>
   <widget type="textupdate" version="2.0.0">
     <name>EllapsedTime</name>
-    <pv_name>TS2-010:Cryo-Virt-MODSEL:EllapsedTimeInCurrentMode</pv_name>
     <x>950</x>
     <y>20</y>
     <width>140</width>
@@ -400,19 +335,15 @@ Vacuum</on_label>
   </widget>
   <widget type="led" version="2.0.0">
     <name>WUP80to300</name>
-    <pv_name>TS2-010:Cryo-Virt-MODSEL:OpMode_WarmUp80KTo300K</pv_name>
+    <pv_name>TS2-010:Cryo-Virt-900:si_WarmUp_80K_300K</pv_name>
     <x>680</x>
-    <y>210</y>
+    <y>200</y>
     <width>170</width>
-    <height>60</height>
-    <off_label>Warm-Up
-80K - 300K</off_label>
+    <height>80</height>
     <off_color>
       <color name="LED-ORANGE-OFF" red="110" green="105" blue="90">
       </color>
     </off_color>
-    <on_label>Warming UP
-80K - 300K</on_label>
     <on_color>
       <color name="LED-ORANGE-ON" red="255" green="175" blue="81">
       </color>
@@ -449,19 +380,15 @@ Vacuum</on_label>
   </widget>
   <widget type="led" version="2.0.0">
     <name>WUP300K</name>
-    <pv_name>TS2-010:Cryo-Virt-MODSEL:OpMode_WarmUpTo300K</pv_name>
+    <pv_name>TS2-010:Cryo-Virt-900:si_WarmUp_4K_300K</pv_name>
     <x>870</x>
-    <y>100</y>
+    <y>90</y>
     <width>170</width>
-    <height>60</height>
-    <off_label>Warming UP
-4K - 300K</off_label>
+    <height>80</height>
     <off_color>
       <color name="LED-ORANGE-OFF" red="110" green="105" blue="90">
       </color>
     </off_color>
-    <on_label>Warming UP
-4K - 300K</on_label>
     <on_color>
       <color name="LED-ORANGE-ON" red="255" green="175" blue="81">
       </color>
@@ -474,19 +401,15 @@ Vacuum</on_label>
   </widget>
   <widget type="led" version="2.0.0">
     <name>WUP80K</name>
-    <pv_name>TS2-010:Cryo-Virt-MODSEL:OpMode_WarmUpTo80K</pv_name>
+    <pv_name>TS2-010:Cryo-Virt-900:si_WarmUp_4K_80K</pv_name>
     <x>1070</x>
-    <y>210</y>
+    <y>200</y>
     <width>170</width>
-    <height>60</height>
-    <off_label>Warming UP
-4K - 80K</off_label>
+    <height>80</height>
     <off_color>
       <color name="LED-ORANGE-OFF" red="110" green="105" blue="90">
       </color>
     </off_color>
-    <on_label>Warming UP
-4K - 80K</on_label>
     <on_color>
       <color name="LED-ORANGE-ON" red="255" green="175" blue="81">
       </color>
@@ -499,19 +422,15 @@ Vacuum</on_label>
   </widget>
   <widget type="led" version="2.0.0">
     <name>WUP4K</name>
-    <pv_name>TS2-010:Cryo-Virt-MODSEL:OpMode_WarmUpTo4K</pv_name>
+    <pv_name>TS2-010:Cryo-Virt-900:si_WarmUp_2K_4K</pv_name>
     <x>1520</x>
-    <y>110</y>
+    <y>100</y>
     <width>170</width>
-    <height>60</height>
-    <off_label>Warming UP
-2K - 4K</off_label>
+    <height>80</height>
     <off_color>
       <color name="LED-ORANGE-OFF" red="110" green="105" blue="90">
       </color>
     </off_color>
-    <on_label>Warming UP
-2K - 4K</on_label>
     <on_color>
       <color name="LED-ORANGE-ON" red="255" green="175" blue="81">
       </color>
@@ -524,6 +443,7 @@ Vacuum</on_label>
   </widget>
   <widget type="led" version="2.0.0">
     <name>LED_10</name>
+    <pv_name>TS2-010:Cryo-Virt-CMRy:Opened</pv_name>
     <x>1900</x>
     <y>210</y>
     <width>170</width>
@@ -607,19 +527,15 @@ Vacuum</on_label>
   </widget>
   <widget type="led" version="2.0.0">
     <name>CD4K</name>
-    <pv_name>TS2-010:Cryo-Virt-MODSEL:OpMode_CoolDownTo4K</pv_name>
+    <pv_name>TS2-010:Cryo-Virt-900:si_CoolDown_300K_4K</pv_name>
     <x>870</x>
-    <y>520</y>
+    <y>510</y>
     <width>170</width>
-    <height>60</height>
-    <off_label>Cool-Down
-300K - 4K</off_label>
+    <height>80</height>
     <off_color>
       <color name="LED-BLUE-OFF" red="90" green="110" blue="110">
       </color>
     </off_color>
-    <on_label>Cool-Down
-300K - 4K</on_label>
     <on_color>
       <color name="LED-BLUE-ON" red="81" green="232" blue="255">
       </color>
@@ -632,19 +548,15 @@ Vacuum</on_label>
   </widget>
   <widget type="led" version="2.0.0">
     <name>CD80to4</name>
-    <pv_name>TS2-010:Cryo-Virt-MODSEL:OpMode_CoolDown80KTo4K</pv_name>
+    <pv_name>TS2-010:Cryo-Virt-900:si_CoolDown_80K_4K</pv_name>
     <x>1070</x>
-    <y>430</y>
+    <y>420</y>
     <width>170</width>
-    <height>60</height>
-    <off_label>Cool-Down
-80K - 4K</off_label>
+    <height>80</height>
     <off_color>
       <color name="LED-BLUE-OFF" red="90" green="110" blue="110">
       </color>
     </off_color>
-    <on_label>Cool-Down
-80K - 4K</on_label>
     <on_color>
       <color name="LED-BLUE-ON" red="81" green="232" blue="255">
       </color>
@@ -657,19 +569,15 @@ Vacuum</on_label>
   </widget>
   <widget type="led" version="2.0.0">
     <name>CD2K</name>
-    <pv_name>TS2-010:Cryo-Virt-MODSEL:OpMode_CoolDownTo2K</pv_name>
+    <pv_name>TS2-010:Cryo-Virt-900:si_CoolDown_4K_2K</pv_name>
     <x>1520</x>
-    <y>520</y>
+    <y>510</y>
     <width>170</width>
-    <height>60</height>
-    <off_label>Cool-Down
-4K - 2K</off_label>
+    <height>80</height>
     <off_color>
       <color name="LED-BLUE-OFF" red="90" green="110" blue="110">
       </color>
     </off_color>
-    <on_label>Cool-Down
-4K - 2K</on_label>
     <on_color>
       <color name="LED-BLUE-ON" red="81" green="232" blue="255">
       </color>
@@ -688,29 +596,6 @@ Vacuum</on_label>
     <width>210</width>
     <vertical_alignment>1</vertical_alignment>
   </widget>
-  <widget type="action_button" version="3.0.0">
-    <name>ConfigScreen_Button</name>
-    <actions>
-      <action type="open_display">
-        <file>TS2_modeConfiguration.bob</file>
-        <macros>
-          <PLCName>TS2-010CRM:Cryo-PLC-001</PLCName>
-        </macros>
-        <target>window</target>
-        <description>Open Display</description>
-      </action>
-    </actions>
-    <text>Configuration</text>
-    <x>2360</x>
-    <y>10</y>
-    <width>178</width>
-    <font>
-      <font family="Source Sans Pro" style="BOLD" size="16.0">
-      </font>
-    </font>
-    <tooltip></tooltip>
-    <confirm_message></confirm_message>
-  </widget>
   <widget type="textupdate" version="2.0.0">
     <name>Text Update</name>
     <pv_name>TS2-010RFC:RFS01:FIM-110:INTS-RB</pv_name>
@@ -869,14 +754,6 @@ Vacuum</on_label>
     <width>40</width>
     <horizontal_alignment>1</horizontal_alignment>
   </widget>
-  <widget type="embedded" version="2.0.0">
-    <name>Transitions</name>
-    <file>Transitions/transitions.bob</file>
-    <x>40</x>
-    <y>430</y>
-    <width>530</width>
-    <height>400</height>
-  </widget>
   <widget type="action_button" version="3.0.0">
     <name>ColdCond</name>
     <actions>
@@ -889,12 +766,12 @@ Vacuum</on_label>
     <pv_name>TS2-010:Cryo-Virt-900:cmd_ColdCond</pv_name>
     <text>Cold
 Conditioning</text>
-    <x>870</x>
-    <y>680</y>
-    <width>160</width>
-    <height>80</height>
+    <x>880</x>
+    <y>630</y>
+    <width>154</width>
+    <height>57</height>
     <font>
-      <font family="Digital Readout Thick Upright Regular" style="REGULAR" size="21.0">
+      <font family="Digital Readout Thick Upright Regular" style="REGULAR" size="18.0">
       </font>
     </font>
     <tooltip>$(actions)</tooltip>
@@ -911,12 +788,166 @@ Conditioning</text>
     </actions>
     <pv_name>TS2-010:Cryo-Virt-900:cmd_Stop</pv_name>
     <text>STOP</text>
-    <x>1060</x>
-    <y>680</y>
-    <width>160</width>
-    <height>80</height>
+    <x>1070</x>
+    <y>630</y>
+    <width>154</width>
+    <height>57</height>
+    <font>
+      <font family="Digital Readout Thick Upright Regular" style="REGULAR" size="18.0">
+      </font>
+    </font>
+    <tooltip>$(actions)</tooltip>
+    <show_confirm_dialog>true</show_confirm_dialog>
+  </widget>
+  <widget type="action_button" version="3.0.0">
+    <name>CD300K4K</name>
+    <actions>
+      <action type="write_pv">
+        <pv_name>TS2-010:Cryo-Virt-900:cmd_CoolDown_300K_4K</pv_name>
+        <value>1</value>
+        <description>CoolDown_300K_4K</description>
+      </action>
+    </actions>
+    <text>Cool-Down
+300K - 4K</text>
+    <x>880</x>
+    <y>520</y>
+    <width>150</width>
+    <height>60</height>
+    <font>
+      <font family="Digital Readout Thick Upright Regular" style="REGULAR" size="18.0">
+      </font>
+    </font>
+    <tooltip>$(actions)</tooltip>
+    <show_confirm_dialog>true</show_confirm_dialog>
+  </widget>
+  <widget type="action_button" version="3.0.0">
+    <name>CD80K4K</name>
+    <actions>
+      <action type="write_pv">
+        <pv_name>TS2-010:Cryo-Virt-900:cmd_CoolDown_80K_4K</pv_name>
+        <value>1</value>
+        <description>CoolDown_80K_4K</description>
+      </action>
+    </actions>
+    <text>Cool-Down
+80K - 4K</text>
+    <x>1080</x>
+    <y>430</y>
+    <width>150</width>
+    <height>60</height>
+    <font>
+      <font family="Digital Readout Thick Upright Regular" style="REGULAR" size="18.0">
+      </font>
+    </font>
+    <tooltip>$(actions)</tooltip>
+    <show_confirm_dialog>true</show_confirm_dialog>
+  </widget>
+  <widget type="action_button" version="3.0.0">
+    <name>CD4K2K</name>
+    <actions>
+      <action type="write_pv">
+        <pv_name>TS2-010:Cryo-Virt-900:cmd_CoolDown_4K_2K</pv_name>
+        <value>1</value>
+        <description>CoolDown_4K_2K</description>
+      </action>
+    </actions>
+    <text>Cool-Down
+4K - 2K</text>
+    <x>1530</x>
+    <y>520</y>
+    <width>150</width>
+    <height>60</height>
+    <font>
+      <font family="Digital Readout Thick Upright Regular" style="REGULAR" size="18.0">
+      </font>
+    </font>
+    <tooltip>$(actions)</tooltip>
+    <show_confirm_dialog>true</show_confirm_dialog>
+  </widget>
+  <widget type="action_button" version="3.0.0">
+    <name>WU2K4K</name>
+    <actions>
+      <action type="write_pv">
+        <pv_name>TS2-010:Cryo-Virt-900:cmd_WarmUp_2K_4K</pv_name>
+        <value>1</value>
+        <description>WarmUp_2K_4K</description>
+      </action>
+    </actions>
+    <text>Warm-Up
+2K - 4K</text>
+    <x>1530</x>
+    <y>110</y>
+    <width>150</width>
+    <height>60</height>
+    <font>
+      <font family="Digital Readout Thick Upright Regular" style="REGULAR" size="18.0">
+      </font>
+    </font>
+    <tooltip>$(actions)</tooltip>
+    <show_confirm_dialog>true</show_confirm_dialog>
+  </widget>
+  <widget type="action_button" version="3.0.0">
+    <name>WU4K80K</name>
+    <actions>
+      <action type="write_pv">
+        <pv_name>TS2-010:Cryo-Virt-900:cmd_WarmUp_4K_80K</pv_name>
+        <value>1</value>
+        <description>WarmUp_4K_80K</description>
+      </action>
+    </actions>
+    <text>Warm-Up
+4K - 80K</text>
+    <x>1080</x>
+    <y>210</y>
+    <width>150</width>
+    <height>60</height>
+    <font>
+      <font family="Digital Readout Thick Upright Regular" style="REGULAR" size="18.0">
+      </font>
+    </font>
+    <tooltip>$(actions)</tooltip>
+    <show_confirm_dialog>true</show_confirm_dialog>
+  </widget>
+  <widget type="action_button" version="3.0.0">
+    <name>WU4K300K</name>
+    <actions>
+      <action type="write_pv">
+        <pv_name>TS2-010:Cryo-Virt-900:cmd_WarmUp_4K_300K</pv_name>
+        <value>1</value>
+        <description>WarmUp_4K_300K</description>
+      </action>
+    </actions>
+    <text>Warm-Up
+4K - 300K</text>
+    <x>880</x>
+    <y>100</y>
+    <width>150</width>
+    <height>60</height>
+    <font>
+      <font family="Digital Readout Thick Upright Regular" style="REGULAR" size="18.0">
+      </font>
+    </font>
+    <tooltip>$(actions)</tooltip>
+    <show_confirm_dialog>true</show_confirm_dialog>
+  </widget>
+  <widget type="action_button" version="3.0.0">
+    <name>WU80K300K</name>
+    <actions>
+      <action type="write_pv">
+        <pv_name>TS2-010:Cryo-Virt-900:cmd_WarmUp_80K_300K</pv_name>
+        <value>1</value>
+        <description>WarmUp_80K_300K</description>
+      </action>
+    </actions>
+    <text>Warm-Up
+80K - 300K</text>
+    <x>690</x>
+    <y>210</y>
+    <width>150</width>
+    <height>60</height>
     <font>
-      <font family="Digital Readout Thick Upright Regular" style="REGULAR" size="21.0">
+      <font family="Digital Readout Thick Upright Regular" style="REGULAR" size="18.0">
       </font>
     </font>
     <tooltip>$(actions)</tooltip>
-- 
GitLab