Skip to content

Commit

Permalink
Merge pull request #635 from ISISComputingGroup/Ticket2707_Add_IOC_SA…
Browse files Browse the repository at this point in the history
…MSM300_Release_4p2p0

Ticket2707 add ioc samsm300 release 4p2p0
  • Loading branch information
AdrianPotter authored Jan 29, 2018
2 parents 326ff5f + a23c9ba commit 5d54efb
Show file tree
Hide file tree
Showing 12 changed files with 2,292 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ public enum ComponentType {
/** Helium Level Gauge.*/
HE_LEVEL_GAUGE,
/** LET oscillating collimator. */
OSCILLATING_COLLIMATOR;
OSCILLATING_COLLIMATOR,
/** SM300 sample changer.*/
SM300_SAMPLE_CHANGER,
/** Motion setpoints.*/
MOTION_SET_POINTS;


private Target target;
Expand Down
51 changes: 42 additions & 9 deletions base/uk.ac.stfc.isis.ibex.opis/resources/opi_info.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<descriptions>
<opis>
<entry>
Expand Down Expand Up @@ -1196,7 +1196,7 @@
<entry>
<key>SKF MB350 Chopper</key>
<value>
<categories>
<categories>
<category>Choppers</category>
</categories>
<type>CHOPPER</type>
Expand All @@ -1212,16 +1212,13 @@
</entry>
<entry>
<key>HLG</key>
<categories>
<category>Gas handling systems</category>
</categories>
<value>
<categories>
<category>Cryogenics</category>
</categories>
<type>HE_LEVEL_GAUGE</type>
<path>hlg.opi</path>
<description>The OPI for the helium level guage.</description>
<description>The OPI for the helium level gauge.</description>
<macros>
<macro>
<name>HLG</name>
Expand All @@ -1232,10 +1229,10 @@
</entry>
<entry>
<key>OscillatingCollimator</key>
<categories>
<category>Miscellaneous motion control</category>
</categories>
<value>
<categories>
<category>Miscellaneous motion control</category>
</categories>
<type>OSCILLATING_COLLIMATOR</type>
<path>OscillatingCollimator/OscillatingCollimator.opi</path>
<description>The OPI for the LET oscillating collimator.</description>
Expand All @@ -1247,5 +1244,41 @@
</macros>
</value>
</entry>
<entry>
<key>Motion Set Point</key>
<value>
<categories>
<category>Miscellaneous motion control</category>
<category>Sample stacks and goniometers</category>
<category>Sample changers</category>
</categories>
<type>MOTION_SET_POINTS</type>
<path>stage/motion_setpoint.opi</path>
<description>The OPI for motion setpoints</description>
<macros>
<macro>
<name>MOTION_SET_POINT</name>
<description>The motion setpoint to display (e.g. LKUP:SAMPLE)</description>
</macro>
</macros>
</value>
</entry>
<entry>
<key>SM300 Sample Changer</key>
<value>
<categories>
<category>Sample changers</category>
</categories>
<type>SM300_SAMPLE_CHANGER</type>
<path>sample_stack/sm300sampos.opi</path>
<description>The OPI for the SM300 Sample changer</description>
<macros>
<macro>
<name>MOTION_SET_POINT</name>
<description>The prefix of the Motion set points being used(e.g. LKUP:SAMPLE)</description>
</macro>
</macros>
</value>
</entry>
</opis>
</descriptions>
204 changes: 204 additions & 0 deletions base/uk.ac.stfc.isis.ibex.opis/resources/sample_stack/sm300sampos.opi
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
<?xml version="1.0" encoding="UTF-8"?>
<display typeId="org.csstudio.opibuilder.Display" version="1.0">
<show_close_button>true</show_close_button>
<rules />
<wuid>450885f3:157944e4d4b:-797d</wuid>
<show_grid>true</show_grid>
<auto_zoom_to_fit_all>false</auto_zoom_to_fit_all>
<scripts />
<height>600</height>
<macros>
<include_parent_macros>true</include_parent_macros>
<PV_ROOT>$(P)$(REPLACE_WITH_IOC_NAME_MACRO)</PV_ROOT>
</macros>
<boy_version>3.1.4.201301231545</boy_version>
<show_edit_range>true</show_edit_range>
<widget_type>Display</widget_type>
<auto_scale_widgets>
<auto_scale_widgets>false</auto_scale_widgets>
<min_width>-1</min_width>
<min_height>-1</min_height>
</auto_scale_widgets>
<background_color>
<color name="ISIS_OPI_Background" red="240" green="240" blue="240" />
</background_color>
<width>800</width>
<x>-1</x>
<name>$(NAME)</name>
<grid_space>6</grid_space>
<show_ruler>true</show_ruler>
<y>-1</y>
<snap_to_geometry>true</snap_to_geometry>
<foreground_color>
<color name="ISIS_OPI_Foreground" red="192" green="192" blue="192" />
</foreground_color>
<actions hook="false" hook_all="false" />
<widget typeId="org.csstudio.opibuilder.widgets.linkingContainer" version="1.0">
<opi_file>../stage/motion_setpoint.opi</opi_file>
<border_style>0</border_style>
<tooltip></tooltip>
<rules />
<enabled>true</enabled>
<wuid>-4c24f7a9:157d349e44c:-7f89</wuid>
<auto_size>true</auto_size>
<scripts />
<height>464</height>
<border_width>1</border_width>
<scale_options>
<width_scalable>true</width_scalable>
<height_scalable>true</height_scalable>
<keep_wh_ratio>false</keep_wh_ratio>
</scale_options>
<macros>
<include_parent_macros>true</include_parent_macros>
</macros>
<visible>true</visible>
<group_name></group_name>
<border_color>
<color name="ISIS_GroupBox_Border_NEW" red="0" green="128" blue="255" />
</border_color>
<widget_type>Linking Container</widget_type>
<background_color>
<color red="240" green="240" blue="240" />
</background_color>
<zoom_to_fit>false</zoom_to_fit>
<width>416</width>
<x>6</x>
<name>Moition Setpoints</name>
<y>6</y>
<foreground_color>
<color name="ISIS_OPI_Foreground" red="192" green="192" blue="192" />
</foreground_color>
<actions hook="false" hook_all="false" />
<font>
<opifont.name fontName="Segoe UI" height="9" style="0">ISIS_GroupBox_NEW</opifont.name>
</font>
</widget>
<widget typeId="org.csstudio.opibuilder.widgets.groupingContainer" version="1.0">
<border_style>13</border_style>
<tooltip></tooltip>
<rules />
<enabled>true</enabled>
<wuid>-4805f29c:1579922e8d6:-7f64</wuid>
<transparent>false</transparent>
<lock_children>false</lock_children>
<scripts />
<height>103</height>
<border_width>1</border_width>
<scale_options>
<width_scalable>true</width_scalable>
<height_scalable>true</height_scalable>
<keep_wh_ratio>false</keep_wh_ratio>
</scale_options>
<macros>
<include_parent_macros>true</include_parent_macros>
</macros>
<visible>true</visible>
<border_color>
<color name="ISIS_GroupBox_Border_NEW" red="0" green="128" blue="255" />
</border_color>
<widget_type>Grouping Container</widget_type>
<background_color>
<color name="ISIS_OPI_Background" red="240" green="240" blue="240" />
</background_color>
<width>132</width>
<x>421</x>
<name>Actions</name>
<y>84</y>
<foreground_color>
<color name="ISIS_OPI_Foreground" red="192" green="192" blue="192" />
</foreground_color>
<actions hook="false" hook_all="false" />
<show_scrollbar>true</show_scrollbar>
<font>
<opifont.name fontName="Segoe UI" height="9" style="0">ISIS_GroupBox_NEW</opifont.name>
</font>
<widget typeId="org.csstudio.opibuilder.widgets.NativeButton" version="1.0">
<toggle_button>false</toggle_button>
<border_style>0</border_style>
<forecolor_alarm_sensitive>false</forecolor_alarm_sensitive>
<tooltip>$(pv_name)
$(pv_value)</tooltip>
<push_action_index>0</push_action_index>
<rules />
<enabled>true</enabled>
<wuid>-30237fc9:157958fdf6d:-7c14</wuid>
<pv_value />
<text>Initialise</text>
<scripts />
<border_alarm_sensitive>false</border_alarm_sensitive>
<height>28</height>
<border_width>1</border_width>
<scale_options>
<width_scalable>true</width_scalable>
<height_scalable>true</height_scalable>
<keep_wh_ratio>false</keep_wh_ratio>
</scale_options>
<image></image>
<visible>true</visible>
<pv_name>$(P)$(MOTION_SET_POINT):DEV:RESET_AND_HOME</pv_name>
<border_color>
<color name="ISIS_Border" red="0" green="0" blue="0" />
</border_color>
<widget_type>Button</widget_type>
<width>90</width>
<x>6</x>
<name>Button_1</name>
<y>7</y>
<foreground_color>
<color name="ISIS_Standard_Text" red="0" green="0" blue="0" />
</foreground_color>
<actions hook="false" hook_all="false">
<action type="WRITE_PV">
<pv_name>$(pv_name)</pv_name>
<value>1</value>
<timeout>10</timeout>
<description></description>
</action>
</actions>
<font>
<opifont.name fontName="Segoe UI" height="9" style="0">ISIS_Button_NEW</opifont.name>
</font>
</widget>
<widget typeId="org.csstudio.opibuilder.widgets.NativeButton" version="1.0">
<toggle_button>false</toggle_button>
<border_style>0</border_style>
<forecolor_alarm_sensitive>false</forecolor_alarm_sensitive>
<tooltip>$(pv_name)
$(pv_value)</tooltip>
<push_action_index>0</push_action_index>
<rules />
<enabled>true</enabled>
<wuid>1ee7c3b8:160e4984431:-7d19</wuid>
<pv_value />
<text>Disconnect</text>
<scripts />
<border_alarm_sensitive>false</border_alarm_sensitive>
<height>28</height>
<border_width>1</border_width>
<scale_options>
<width_scalable>true</width_scalable>
<height_scalable>true</height_scalable>
<keep_wh_ratio>false</keep_wh_ratio>
</scale_options>
<image></image>
<visible>true</visible>
<pv_name>$(P)$(MOTION_SET_POINT):DEV:DISCONNECT</pv_name>
<border_color>
<color name="ISIS_Border" red="0" green="0" blue="0" />
</border_color>
<widget_type>Button</widget_type>
<width>90</width>
<x>6</x>
<name>Button_1</name>
<y>42</y>
<foreground_color>
<color name="ISIS_Standard_Text" red="0" green="0" blue="0" />
</foreground_color>
<actions hook="false" hook_all="false" />
<font>
<opifont.name fontName="Segoe UI" height="9" style="0">ISIS_Button_NEW</opifont.name>
</font>
</widget>
</widget>
</display>
9 changes: 6 additions & 3 deletions base/uk.ac.stfc.isis.ibex.opis/resources/stage/listPosns.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@

targetPV = display.getWidget('SetPointText').getPV()
sourceBtn = display.getWidget('sourceBtn')
sourcePV = sourceBtn.getPV()

menu = display.getWidget('SetPosnBtn')

values = sourcePV.getValue().getData()
value = pvs[0].getValue()

if value is None:
values = ["No positions", "END"]
else:
values = value.getData()
#ConsoleUtil.writeInfo('count: ' + str(len(values)))

actionList = menu.getPropertyValue('actions').getActionsList()
Expand Down
Loading

0 comments on commit 5d54efb

Please sign in to comment.