From 8ccd00e45e3be4db28077a3fc36c915847219014 Mon Sep 17 00:00:00 2001
From: Hinko Kocevar <hinko.kocevar@esss.se>
Date: Wed, 13 Feb 2019 13:53:19 +0100
Subject: [PATCH] Update the FC OPI, stage1.

---
 .../lebt-010-pbi-fc-001/fc.bob                |  10 +-
 .../lebt-010-pbi-fc-001/fc_operator.bob       | 259 +++++++++++++++---
 2 files changed, 220 insertions(+), 49 deletions(-)

diff --git a/CONTROL-ROOM/COMMON/DEVICES/proton-beam-instrumentation/lebt-010-pbi-fc-001/fc.bob b/CONTROL-ROOM/COMMON/DEVICES/proton-beam-instrumentation/lebt-010-pbi-fc-001/fc.bob
index 8bbf8ca4..5cff8f79 100644
--- a/CONTROL-ROOM/COMMON/DEVICES/proton-beam-instrumentation/lebt-010-pbi-fc-001/fc.bob
+++ b/CONTROL-ROOM/COMMON/DEVICES/proton-beam-instrumentation/lebt-010-pbi-fc-001/fc.bob
@@ -24,8 +24,8 @@
     </macros>
     <x>9</x>
     <y>269</y>
-    <width>642</width>
-    <height>212</height>
+    <width>640</width>
+    <height>210</height>
     <resize>2</resize>
     <actions>
     </actions>
@@ -42,15 +42,15 @@
       <EVR_FRU>PBI-EVR-030</EVR_FRU>
       <HV_FRU>HV06</HV_FRU>
       <INSTANCE>PBI-FC-001</INSTANCE>
-      <LOCATION>LEBT-020</LOCATION>
+      <LOCATION>LEBT-010</LOCATION>
       <MCU_FRU>MCU08</MCU_FRU>
       <SYSTEM>$(LOCATION):$(INSTANCE)</SYSTEM>
       <TITLE>Faraday Cup - LEBT</TITLE>
     </macros>
     <x>9</x>
     <y>59</y>
-    <width>642</width>
-    <height>212</height>
+    <width>640</width>
+    <height>210</height>
     <resize>2</resize>
     <actions>
     </actions>
diff --git a/CONTROL-ROOM/COMMON/DEVICES/proton-beam-instrumentation/lebt-010-pbi-fc-001/fc_operator.bob b/CONTROL-ROOM/COMMON/DEVICES/proton-beam-instrumentation/lebt-010-pbi-fc-001/fc_operator.bob
index 047e76a7..ee488e47 100644
--- a/CONTROL-ROOM/COMMON/DEVICES/proton-beam-instrumentation/lebt-010-pbi-fc-001/fc_operator.bob
+++ b/CONTROL-ROOM/COMMON/DEVICES/proton-beam-instrumentation/lebt-010-pbi-fc-001/fc_operator.bob
@@ -659,7 +659,7 @@
       </widget>
       <widget type="led" version="2.0.0">
         <name>motionInsertedLED</name>
-        <pv_name>$(MCU)InsertedR</pv_name>
+        <pv_name>$(MCU)PositionR</pv_name>
         <x>500</x>
         <y>10</y>
         <off_color>
@@ -683,7 +683,7 @@
       </widget>
       <widget type="textupdate" version="2.0.0">
         <name>motionInsertedReadback</name>
-        <pv_name>$(MCU)InsertedR</pv_name>
+        <pv_name>$(MCU)PositionR</pv_name>
         <x>530</x>
         <y>10</y>
         <width>180</width>
@@ -974,6 +974,7 @@
             <font name="Default" family="Source Sans Pro" style="REGULAR" size="16.0">
             </font>
           </scale_font>
+          <visible>true</visible>
         </x_axis>
         <y_axes>
           <y_axis>
@@ -1274,6 +1275,7 @@
             <font name="Default" family="Source Sans Pro" style="REGULAR" size="16.0">
             </font>
           </scale_font>
+          <visible>true</visible>
         </x_axis>
         <y_axes>
           <y_axis>
@@ -1730,22 +1732,70 @@
           </border_color>
         </widget>
       </widget>
+      <widget type="label" version="2.0.0">
+        <name>Label_187</name>
+        <text>Conversion</text>
+        <x>1160</x>
+        <y>900</y>
+        <width>144</width>
+        <foreground_color>
+          <color red="0" green="0" blue="0">
+          </color>
+        </foreground_color>
+        <background_color>
+          <color red="255" green="255" blue="255">
+          </color>
+        </background_color>
+        <horizontal_alignment>1</horizontal_alignment>
+        <vertical_alignment>1</vertical_alignment>
+        <wrap_words>false</wrap_words>
+        <actions>
+        </actions>
+        <border_color>
+          <color red="0" green="128" blue="255">
+          </color>
+        </border_color>
+      </widget>
+      <widget type="led" version="2.0.0">
+        <name>LED_1</name>
+        <pv_name>$(FT1)ConvEnableR</pv_name>
+        <x>1358</x>
+        <y>902</y>
+        <width>16</width>
+        <height>16</height>
+        <off_color>
+          <color red="0" green="100" blue="0">
+          </color>
+        </off_color>
+        <on_color>
+          <color red="0" green="255" blue="0">
+          </color>
+        </on_color>
+        <foreground_color>
+          <color red="192" green="192" blue="192">
+          </color>
+        </foreground_color>
+        <line_color>
+          <color red="150" green="150" blue="150">
+          </color>
+        </line_color>
+        <actions>
+        </actions>
+      </widget>
       <widget type="action_button" version="3.0.0">
-        <name>beamCurrentMoreButton</name>
+        <name>Action Button_2</name>
         <actions>
-          <action type="open_display">
-            <file>fc_more.opi</file>
-            <macros>
-              <AOIn>AOI11-</AOIn>
-              <CHn>CH0-</CHn>
-              <STn>ST11-</STn>
-            </macros>
-            <target>tab</target>
-            <description>More ..</description>
+          <action type="write_pv">
+            <pv_name>$(pv_name)</pv_name>
+            <value>1</value>
+            <description>Enable</description>
           </action>
         </actions>
-        <x>1240</x>
-        <y>980</y>
+        <pv_name>$(FT1)ConvEnable</pv_name>
+        <x>1404</x>
+        <y>901</y>
+        <width>77</width>
+        <height>18</height>
         <foreground_color>
           <color red="0" green="0" blue="0">
           </color>
@@ -1754,24 +1804,21 @@
           <color red="240" green="240" blue="240">
           </color>
         </background_color>
-        <tooltip>$(actions)</tooltip>
       </widget>
       <widget type="action_button" version="3.0.0">
-        <name>beamCurrentSystemButton</name>
+        <name>Action Button_3</name>
         <actions>
-          <action type="open_display">
-            <file>fc_system.opi</file>
-            <macros>
-              <AOIn>AOI10-</AOIn>
-              <CHn>CH0-</CHn>
-              <STn>ST10-</STn>
-            </macros>
-            <target>tab</target>
-            <description>System</description>
+          <action type="write_pv">
+            <pv_name>$(pv_name)</pv_name>
+            <value>0</value>
+            <description>Disable</description>
           </action>
         </actions>
-        <x>1360</x>
-        <y>980</y>
+        <pv_name>$(FT1)ConvEnable</pv_name>
+        <x>1489</x>
+        <y>901</y>
+        <width>77</width>
+        <height>18</height>
         <foreground_color>
           <color red="0" green="0" blue="0">
           </color>
@@ -1780,34 +1827,158 @@
           <color red="240" green="240" blue="240">
           </color>
         </background_color>
-        <tooltip>$(actions)</tooltip>
       </widget>
-      <widget type="action_button" version="3.0.0">
-        <name>beamCurrentDebugButton</name>
+      <widget type="label" version="2.0.0">
+        <name>Label_186</name>
+        <text>Conversion offset</text>
+        <x>1150</x>
+        <y>975</y>
+        <width>144</width>
+        <foreground_color>
+          <color red="0" green="0" blue="0">
+          </color>
+        </foreground_color>
+        <background_color>
+          <color red="255" green="255" blue="255">
+          </color>
+        </background_color>
+        <horizontal_alignment>1</horizontal_alignment>
+        <vertical_alignment>1</vertical_alignment>
+        <wrap_words>false</wrap_words>
         <actions>
-          <action type="open_display">
-            <file>fc_more.opi</file>
-            <macros>
-              <AOIn>AOI10-</AOIn>
-              <CHn>CH0-</CHn>
-              <STn>ST10-</STn>
-            </macros>
-            <target>tab</target>
-            <description>Debug</description>
-          </action>
         </actions>
-        <x>1470</x>
-        <y>980</y>
+        <border_color>
+          <color red="0" green="128" blue="255">
+          </color>
+        </border_color>
+      </widget>
+      <widget type="textentry" version="3.0.0">
+        <name>Text Input_10</name>
+        <pv_name>$(FT1)ConvOffset</pv_name>
+        <x>1305</x>
+        <y>976</y>
+        <width>150</width>
+        <height>22</height>
         <foreground_color>
           <color red="0" green="0" blue="0">
           </color>
         </foreground_color>
         <background_color>
-          <color red="240" green="240" blue="240">
+          <color red="255" green="255" blue="255">
           </color>
         </background_color>
-        <tooltip>$(actions)</tooltip>
+        <precision>9</precision>
+        <actions>
+        </actions>
+        <border_alarm_sensitive>false</border_alarm_sensitive>
+        <border_color>
+          <color red="0" green="128" blue="255">
+          </color>
+        </border_color>
       </widget>
     </widget>
   </widget>
+  <widget type="label" version="2.0.0">
+    <name>Label_185</name>
+    <text>Conversion factor</text>
+    <x>1940</x>
+    <y>1031</y>
+    <width>144</width>
+    <foreground_color>
+      <color red="0" green="0" blue="0">
+      </color>
+    </foreground_color>
+    <background_color>
+      <color red="255" green="255" blue="255">
+      </color>
+    </background_color>
+    <horizontal_alignment>1</horizontal_alignment>
+    <vertical_alignment>1</vertical_alignment>
+    <wrap_words>false</wrap_words>
+    <actions>
+    </actions>
+    <border_color>
+      <color red="0" green="128" blue="255">
+      </color>
+    </border_color>
+  </widget>
+  <widget type="textentry" version="3.0.0">
+    <name>Text Input_9</name>
+    <pv_name>$(FT1)ConvFactor</pv_name>
+    <x>2095</x>
+    <y>1031</y>
+    <width>150</width>
+    <height>22</height>
+    <foreground_color>
+      <color red="0" green="0" blue="0">
+      </color>
+    </foreground_color>
+    <background_color>
+      <color red="255" green="255" blue="255">
+      </color>
+    </background_color>
+    <precision>9</precision>
+    <actions>
+    </actions>
+    <border_alarm_sensitive>false</border_alarm_sensitive>
+    <enabled>false</enabled>
+    <border_color>
+      <color red="0" green="128" blue="255">
+      </color>
+    </border_color>
+  </widget>
+  <widget type="textupdate" version="2.0.0">
+    <name>Text Update_5</name>
+    <pv_name>$(FT1)ConvFactorR</pv_name>
+    <x>2257</x>
+    <y>1030</y>
+    <width>150</width>
+    <height>23</height>
+    <foreground_color>
+      <color red="0" green="0" blue="0">
+      </color>
+    </foreground_color>
+    <background_color>
+      <color red="255" green="255" blue="255">
+      </color>
+    </background_color>
+    <transparent>true</transparent>
+    <format>1</format>
+    <precision>9</precision>
+    <vertical_alignment>1</vertical_alignment>
+    <wrap_words>false</wrap_words>
+    <actions>
+    </actions>
+    <border_color>
+      <color red="0" green="128" blue="255">
+      </color>
+    </border_color>
+  </widget>
+  <widget type="textupdate" version="2.0.0">
+    <name>Text Update_6</name>
+    <pv_name>$(FT1)ConvOffsetR</pv_name>
+    <x>2257</x>
+    <y>1064</y>
+    <width>150</width>
+    <height>22</height>
+    <foreground_color>
+      <color red="0" green="0" blue="0">
+      </color>
+    </foreground_color>
+    <background_color>
+      <color red="255" green="255" blue="255">
+      </color>
+    </background_color>
+    <transparent>true</transparent>
+    <format>1</format>
+    <precision>9</precision>
+    <vertical_alignment>1</vertical_alignment>
+    <wrap_words>false</wrap_words>
+    <actions>
+    </actions>
+    <border_color>
+      <color red="0" green="128" blue="255">
+      </color>
+    </border_color>
+  </widget>
 </display>
-- 
GitLab