diff --git a/base/uk.ac.stfc.isis.ibex.opis/resources/mercuryiTC/mercuryiTC.opi b/base/uk.ac.stfc.isis.ibex.opis/resources/mercuryiTC/mercuryiTC.opi
index 088e8f2ad6..5dabed7460 100644
--- a/base/uk.ac.stfc.isis.ibex.opis/resources/mercuryiTC/mercuryiTC.opi
+++ b/base/uk.ac.stfc.isis.ibex.opis/resources/mercuryiTC/mercuryiTC.opi
@@ -10,7 +10,7 @@
- 5.1.0.201707071649
+ 5.1.0
@@ -266,7 +266,19 @@ $(pv_value)
System
- 9
+
+
+
+ true
+
+ ISIS_TabTitle_NEW
+
+
+
+
+
+ Automatic Pressure Control
+ 10
true
Tabbed Container
@@ -960,7 +972,7 @@ $(pv_value)
true
true
- true
+ false
Grouping Container
791
d2963b:1723cd72607:-7c6d
@@ -1008,6 +1020,88 @@ $(pv_value)
0
+
+
+
+
+
+
+
+
+ 0
+ 1
+ true
+ false
+
+ Default
+
+
+
+
+ 502
+ false
+
+ true
+
+ Automatic Pressure Control
+
+
+ true
+ true
+ false
+
+
+ true
+
+ true
+ true
+ Grouping Container
+ 791
+ -2e77eee8:17ce60572b3:-7e5c
+ 1
+ 1
+
+
+
+
+
+
+
+
+ 0
+ 1
+ true
+
+ Default
+
+
+
+
+
+ 495
+
+ true
+ 7
+
+ Tab9
+ mercuryiTC_single_auto_pressure_control.opi
+ 3
+
+
+ true
+ true
+ false
+
+
+
+ true
+ Linking Container
+ 787
+ -2e77eee8:17ce60572b3:-7c92
+ 0
+ 0
+
+
diff --git a/base/uk.ac.stfc.isis.ibex.opis/resources/mercuryiTC/mercuryiTC_single_auto_pressure_control.opi b/base/uk.ac.stfc.isis.ibex.opis/resources/mercuryiTC/mercuryiTC_single_auto_pressure_control.opi
new file mode 100644
index 0000000000..6a25bc4833
--- /dev/null
+++ b/base/uk.ac.stfc.isis.ibex.opis/resources/mercuryiTC/mercuryiTC_single_auto_pressure_control.opi
@@ -0,0 +1,1312 @@
+
+
+
+
+ false
+ -1
+ -1
+
+ false
+
+
+
+ 5.1.0
+
+
+
+ 6
+ 600
+
+ true
+
+
+
+
+ true
+ true
+ true
+ true
+ true
+ Display
+ 800
+ -2e77eee8:17ce60572b3:-7527
+ -1
+ -1
+
+
+
+
+
+
+
+
+ 13
+ 1
+ true
+ false
+
+ ISIS_GroupBox_NEW
+
+
+
+
+ 163
+ false
+
+ true
+
+ Configuration
+
+
+ true
+ true
+ false
+
+
+ false
+
+ false
+ true
+ Grouping Container
+ 775
+ -2e77eee8:17ce60572b3:-6a91
+ 0
+ 0
+
+
+ false
+ false
+ false
+
+
+
+ false
+
+
+
+ 3
+ 1
+
+ true
+
+ ISIS_Value_NEW
+
+ false
+
+
+
+ 0
+ 19
+ 0
+ false
+ 1.7976931348623157E308
+ -1.7976931348623157E308
+ false
+ temp_cutoff_setpoint
+ 3
+ true
+
+
+ 0.0
+
+
+ true
+ true
+ false
+
+
+ 0
+ true
+
+ 0.0
+ $(pv_name)
+$(pv_value)
+ false
+ true
+ Text Input
+ 91
+ -2e77eee8:17ce60572b3:-6ed0
+ 313
+ 72
+
+
+
+ false
+
+
+
+
+
+
+ 0
+ 1
+ true
+
+ ISIS_Label_NEW
+
+
+
+
+ 20
+ 2
+ auto_pressure_enabled_label
+
+
+ true
+ true
+ false
+
+
+ false
+ Automatic pressure control enabled?
+
+ false
+ 1
+ true
+ Label
+ 277
+ true
+ -2e77eee8:17ce60572b3:-7514
+ 24
+ 12
+
+
+
+ false
+
+
+
+
+
+
+ 0
+ 1
+ true
+
+ ISIS_Label_NEW
+
+
+
+
+ 20
+ 2
+ temp_cutoff_label
+
+
+ true
+ true
+ false
+
+
+ false
+ Temperature operation divider point:
+
+ false
+ 1
+ true
+ Label
+ 277
+ true
+ -2e77eee8:17ce60572b3:-6ecf
+ 24
+ 72
+
+
+
+ false
+ false
+
+
+
+ -1
+ true
+
+
+
+ 0
+ 1
+ Are you sure you want to do this?
+ 0
+ true
+ true
+
+ Default
+
+ false
+
+
+
+ 27
+ false
+ auto_pressure_control_enabled
+
+
+
+ OFF
+
+
+
+ ON
+
+ 0
+
+
+ 0
+
+
+ true
+ true
+ true
+
+
+ false
+ 0
+ true
+ false
+ true
+ $(pv_name)
+$(pv_value)
+ true
+ Boolean Button
+ 56
+ -2e77eee8:17ce60572b3:-7513
+ 331
+ 8
+
+
+
+ false
+ false
+ false
+
+
+
+ false
+
+
+
+ 3
+ 1
+
+ true
+
+ ISIS_Value_NEW
+
+ false
+
+
+
+ 0
+ 19
+ 0
+ false
+ 1.7976931348623157E308
+ -1.7976931348623157E308
+ false
+ low_temp_constant_pressure
+ 3
+ true
+
+
+ 0.0
+
+
+ true
+ true
+ false
+
+
+ 0
+ true
+
+ 0.0
+ $(pv_name)
+$(pv_value)
+ false
+ true
+ Text Input
+ 91
+ -2e77eee8:17ce60572b3:-6458
+ 313
+ 42
+
+
+
+ false
+
+
+
+
+
+
+ 0
+ 1
+ true
+
+ ISIS_Label_NEW
+
+
+
+
+ 20
+ 2
+ temp_cutoff_label
+
+
+ true
+ true
+ false
+
+
+ false
+ Temperature operation:
+
+ false
+ 1
+ true
+ Label
+ 277
+ true
+ -2e77eee8:17ce60572b3:-6414
+ 24
+ 102
+
+
+
+ false
+
+
+
+
+
+
+ 0
+ 1
+ true
+
+ ISIS_Label_NEW
+
+
+
+
+ 20
+ 2
+ low_temp_constant_pressure_label
+
+
+ true
+ true
+ false
+
+
+ false
+ Delay after setting pressure:
+
+ false
+ 1
+ true
+ Label
+ 277
+ true
+ -2e77eee8:17ce60572b3:-6459
+ 24
+ 42
+
+
+
+ false
+ false
+ false
+
+
+
+ true
+
+
+
+ 0
+ 1
+ true
+
+ ISIS_Value_NEW
+
+ false
+
+
+
+ 0
+ 22
+ 0
+ high_temp_lookup_table_file
+ 3
+ true
+
+
+ 0.0
+
+
+ true
+ true
+ false
+
+
+ true
+ ######
+ $(pv_name)
+$(pv_value)
+ true
+ 1
+ true
+ Text Update
+ 91
+ false
+ -2e77eee8:17ce60572b3:-640c
+ 313
+ 101
+
+
+
+
+
+
+
+
+
+
+ 13
+ 1
+ true
+ false
+
+ ISIS_GroupBox_NEW
+
+
+
+
+ 103
+ false
+
+ true
+
+ Channel Values
+
+
+ true
+ true
+ false
+
+
+ false
+
+ false
+ true
+ Grouping Container
+ 775
+ -2e77eee8:17ce60572b3:-6a5d
+ 0
+ 336
+
+
+ false
+
+
+
+
+
+
+ 0
+ 1
+ true
+
+ ISIS_Label_NEW
+
+
+
+
+ 20
+ 2
+ pressure_label
+
+
+ true
+ true
+ false
+
+
+ false
+ Pressure:
+
+ false
+ 1
+ true
+ Label
+ 133
+ true
+ -2e77eee8:17ce60572b3:-6dd5
+ 329
+ 12
+
+
+
+ false
+ false
+ false
+
+
+
+ true
+
+
+
+ 0
+ 1
+ true
+
+ ISIS_Value_NEW
+
+ false
+
+
+
+ 0
+ 19
+ 0
+ pressure_text
+ 3
+ true
+
+
+ 0.0
+
+
+ true
+ true
+ false
+
+
+ true
+ ######
+ $(pv_name)
+$(pv_value)
+ false
+ 1
+ true
+ Text Update
+ 91
+ false
+ -2e77eee8:17ce60572b3:-6dd4
+ 474
+ 12
+
+
+
+ false
+
+
+
+
+
+
+ 0
+ 1
+ true
+
+ ISIS_Label_NEW
+
+
+
+
+ 20
+ 2
+ temp_sp_label
+
+
+ true
+ true
+ false
+
+
+ false
+ Temperature setpoint:
+
+ false
+ 1
+ true
+ Label
+ 133
+ true
+ -2e77eee8:17ce60572b3:-6dc5
+ 329
+ 42
+
+
+
+ false
+ false
+ false
+
+
+
+ true
+
+
+
+ 0
+ 1
+ true
+
+ ISIS_Value_NEW
+
+ false
+
+
+
+ 0
+ 19
+ 0
+ temp_sp_text
+ 3
+ true
+
+
+ 0.0
+
+
+ true
+ true
+ false
+
+
+ true
+ ######
+ $(pv_name)
+$(pv_value)
+ false
+ 1
+ true
+ Text Update
+ 91
+ false
+ -2e77eee8:17ce60572b3:-6dc4
+ 474
+ 42
+
+
+
+ false
+
+
+
+
+
+
+ 0
+ 1
+ true
+
+ ISIS_Label_NEW
+
+
+
+
+ 20
+ 2
+ pressure_card_label
+
+
+ true
+ true
+ false
+
+
+ false
+ Pressure card:
+
+ false
+ 1
+ true
+ Label
+ 133
+ true
+ -2e77eee8:17ce60572b3:-6678
+ 24
+ 12
+
+
+
+ false
+
+
+
+
+
+
+ 0
+ 1
+ true
+
+ ISIS_Label_NEW
+
+
+
+
+ 20
+ 2
+ temp_card_label
+
+
+ true
+ true
+ false
+
+
+ false
+ Temperature card:
+
+ false
+ 1
+ true
+ Label
+ 133
+ true
+ -2e77eee8:17ce60572b3:-6665
+ 24
+ 42
+
+
+
+ false
+ false
+ false
+
+
+
+ true
+
+
+
+ 0
+ 1
+ true
+
+ ISIS_Value_NEW
+
+ false
+
+
+
+ 0
+ 19
+ 0
+ pressure_text
+ 3
+ true
+
+
+ 0.0
+
+
+ true
+ true
+ false
+
+
+ true
+ ######
+ $(pv_name)
+$(pv_value)
+ false
+ 1
+ true
+ Text Update
+ 91
+ false
+ 592c2375:17cea5661e0:-7fd6
+ 162
+ 12
+
+
+
+ false
+ false
+ false
+
+
+
+ true
+
+
+
+ 0
+ 1
+ true
+
+ ISIS_Value_NEW
+
+ false
+
+
+
+ 0
+ 19
+ 0
+ temp_sp_text
+ 3
+ true
+
+
+ 0.0
+
+
+ true
+ true
+ false
+
+
+ true
+ ######
+ $(pv_name)
+$(pv_value)
+ false
+ 1
+ true
+ Text Update
+ 91
+ false
+ 592c2375:17cea5661e0:-7fd5
+ 162
+ 42
+
+
+
+
+
+
+
+
+
+
+ 13
+ 1
+ true
+ false
+
+ ISIS_GroupBox_NEW
+
+
+
+
+ 73
+ false
+
+ true
+
+ Low Temperature Operation
+
+
+ true
+ true
+ false
+
+
+ false
+
+ false
+ true
+ Grouping Container
+ 775
+ -2e77eee8:17ce60572b3:-6438
+ 0
+ 162
+
+
+ false
+
+
+
+
+
+
+ 0
+ 1
+ true
+
+ ISIS_Label_NEW
+
+
+
+
+ 20
+ 2
+ low_temp_constant_pressure_label
+
+
+ true
+ true
+ false
+
+
+ false
+ Low temperature operation constant pressure:
+
+ false
+ 1
+ true
+ Label
+ 277
+ true
+ -2e77eee8:17ce60572b3:-6ec3
+ 6
+ 12
+
+
+
+ false
+ false
+ false
+
+
+
+ false
+
+
+
+ 3
+ 1
+
+ true
+
+ ISIS_Value_NEW
+
+ false
+
+
+
+ 0
+ 19
+ 0
+ false
+ 1.7976931348623157E308
+ -1.7976931348623157E308
+ false
+ low_temp_constant_pressure
+ 3
+ true
+
+
+ 0.0
+
+
+ true
+ true
+ false
+
+
+ 0
+ true
+
+ 0.0
+ $(pv_name)
+$(pv_value)
+ false
+ true
+ Text Input
+ 91
+ -2e77eee8:17ce60572b3:-6ec4
+ 295
+ 12
+
+
+
+
+
+
+
+
+
+
+ 13
+ 1
+ true
+ false
+
+ ISIS_GroupBox_NEW
+
+
+
+
+ 103
+ false
+
+ true
+
+ High Temperature Operation
+
+
+ true
+ true
+ false
+
+
+ false
+
+ false
+ true
+ Grouping Container
+ 775
+ -2e77eee8:17ce60572b3:-641e
+ 0
+ 234
+
+
+ false
+
+
+
+
+
+
+ 0
+ 1
+ true
+
+ ISIS_Label_NEW
+
+
+
+
+ 20
+ 2
+ lookup_table_file_label
+
+
+ true
+ true
+ false
+
+
+ false
+ High temperature operation lookup table file:
+
+ false
+ 1
+ true
+ Label
+ 277
+ true
+ -2e77eee8:17ce60572b3:-6e6e
+ 12
+ 12
+
+
+
+ false
+ false
+ false
+
+
+
+ true
+
+
+
+ 0
+ 1
+ true
+
+ ISIS_Value_NEW
+
+ false
+
+
+
+ 0
+ 22
+ 0
+ high_temp_lookup_table_file
+ 3
+ true
+
+
+ 0.0
+
+
+ true
+ true
+ false
+
+
+ true
+ ######
+ $(pv_name)
+$(pv_value)
+ true
+ 1
+ true
+ Text Update
+ 91
+ false
+ -2e77eee8:17ce60572b3:-6e6f
+ 301
+ 11
+
+
+
+
+
+
+ true
+ Trim white space from requested value
+
+
+ false
+ false
+ false
+
+
+
+ false
+
+
+
+ 3
+ 1
+
+ true
+
+ ISIS_Value_NEW
+
+ false
+
+
+
+ 0
+ 20
+ 0
+ false
+ 1.7976931348623157E308
+ -1.7976931348623157E308
+ false
+ high_temp_lookup_table_file_set
+ 0
+ true
+
+
+ 0.0
+
+
+ true
+ true
+ false
+
+
+ 0
+ true
+
+ ######
+ $(pv_name)
+$(pv_value)
+ false
+ true
+ Text Input
+ 91
+ -2e77eee8:17ce60572b3:-6e70
+ 396
+ 12
+
+
+
+ false
+
+
+
+
+
+
+ 0
+ 1
+ true
+
+ ISIS_Label_NEW
+
+
+
+
+ 20
+ 2
+ lookup_table_dir_label
+
+
+ true
+ true
+ false
+
+
+ false
+ High temperature operation lookup table dir:
+
+ false
+ 1
+ true
+ Label
+ 277
+ true
+ -2e77eee8:17ce60572b3:-6e6d
+ 12
+ 39
+
+
+
+ false
+ false
+ false
+
+
+
+ false
+
+
+
+ 0
+ 1
+ true
+
+ ISIS_Value_NEW
+
+ false
+
+
+
+ 4
+ 31
+ 0
+ high_temp_lookup_table_dir
+ 3
+ false
+
+
+ 0.0
+
+
+ true
+ true
+ false
+
+
+ false
+ ######
+ $(pv_name)
+$(pv_value)
+ false
+ 0
+ true
+ Text Update
+ 186
+ true
+ -2e77eee8:17ce60572b3:-6e6c
+ 301
+ 39
+
+
+
\ No newline at end of file
diff --git a/base/uk.ac.stfc.isis.ibex.opis/resources/mercuryiTC/updateTabTargets.py b/base/uk.ac.stfc.isis.ibex.opis/resources/mercuryiTC/updateTabTargets.py
index ff0e5ab329..9111fd9ec1 100644
--- a/base/uk.ac.stfc.isis.ibex.opis/resources/mercuryiTC/updateTabTargets.py
+++ b/base/uk.ac.stfc.isis.ibex.opis/resources/mercuryiTC/updateTabTargets.py
@@ -1,4 +1,5 @@
def is_active_int_macro(value):
+ print(value)
if value is None or len(value) == 0:
return False # Empty macro
elif len(value) >= 3 and value[:2] == "$(" and value[-1] == ")":
@@ -27,29 +28,38 @@ def add_macro(widget, name, value):
widget.setPropertyValue("macros", macros)
reload_widget(widget)
-def populate_tabs(count, card_type, type_count, container, system_tab):
+def populate_tab(count, card_type, container, card_number, title_suffix):
+ if is_active_int_macro(card_number):
+ tab = display.getWidget("Tab"+str(count))
+ tab.setPropertyValue("opi_file", "mercuryiTC_single_" + card_type.lower() + ".opi")
+ add_macro(tab, "CARD_NUM", int(card_number))
+ container.setPropertyValue("tab_" + str(count) + "_title", card_type.title() + title_suffix)
+ return count + 1
+ else:
+ return count
+
+def populate_card_tabs(count, card_type, type_count, container):
for i in range(1, 1 + type_count):
- if system_tab:
- card_number = "1"
- else:
- card_number = get_macros().get(card_type.upper() + "_NUM" + str(i))
- if is_active_int_macro(card_number):
- tab = display.getWidget("Tab"+str(count))
- tab.setPropertyValue("opi_file", "mercuryiTC_single_" + card_type.lower() + ".opi")
- add_macro(tab, "CARD_NUM", int(card_number))
- title_suffix = "" if system_tab else " card " + str(card_number)
- container.setPropertyValue("tab_" + str(count) + "_title", card_type.title() + title_suffix)
- count += 1
+ card_number = get_macros().get(card_type.upper() + "_NUM" + str(i))
+ title_suffix = " card " + str(card_number)
+ count = populate_tab(count, card_type, container, card_number, title_suffix)
return count
+def populate_system_tab(count, container):
+ return populate_tab(count, "system", container, "1", "")
+
+def populate_auto_pressure_control_tab(count, container):
+ return populate_tab(count, "auto_pressure_control", container, "1", "")
+
def main():
count = 0
container = display.getWidget("TabContainer")
- count = populate_tabs(count, "temp", 4, container, False)
- count = populate_tabs(count, "level", 2, container, False)
- count = populate_tabs(count, "pressure", 2, container, False)
- count = populate_tabs(count, "system", 1, container, True)
+ count = populate_card_tabs(count, "temp", 4, container)
+ count = populate_card_tabs(count, "level", 2, container)
+ count = populate_card_tabs(count, "pressure", 2, container)
+ count = populate_system_tab(count, container)
+ count = populate_auto_pressure_control_tab(count, container)
if count > 0:
container.setPropertyValue("tab_count", count)
else: