diff --git a/base/uk.ac.stfc.isis.ibex.opis/resources/HV/HVChannelMonitorSummary.opi b/base/uk.ac.stfc.isis.ibex.opis/resources/HV/HVChannelMonitorSummary.opi index 51564dd58d..aebae1577d 100644 --- a/base/uk.ac.stfc.isis.ibex.opis/resources/HV/HVChannelMonitorSummary.opi +++ b/base/uk.ac.stfc.isis.ibex.opis/resources/HV/HVChannelMonitorSummary.opi @@ -1,307 +1,340 @@ + + true + + -ea76e2a:141ff5eac31:-7640 + true false + + 25 true - -ea76e2a:141ff5eac31:-7640 - 3.1.4.20130702 - - true - 42 - - true - true - - - - - - - Display - true - 512 - + 3.1.4.201301231545 true - 6 + Display false -1 -1 - - -1 + + + + 500 -1 - - true - true - 1 - true - 5b922a1a:14228c302d3:3c0e - false - 0.0 - - 31 - Channel Name + + 6 + true + -1 + true + + + + + + 0 false + $(pv_name) +$(pv_value) + + true + -1 + true + 2ada1da1:1425114fc7e:-405e + + + + + + false + 20 + ON + 1 true true - false + true - 0 - true - false - $(P)CAEN:$(SEL):name:fbk + true + $(P)CAEN:$(SEL):pwonoff:fbk + + + + LED + + + + false - + + false + 20 + 475 + Power On-Off + 0 + 5 - + - Text Update - true - ###### - false - 0 + + false - ISIS_Value + ISIS_Button - 139 + OFF + + 0 - - - 1 - - - - 0 - - 6 - false + false + 0 $(pv_name) $(pv_value) - 6 - - - true - true - 1 - true - 5b922a1a:14228c302d3:3c0d + 0 + + true + 4b5e83ab:16368e752d2:-7fb2 + true + false + ###### 0.0 - 31 - Status - false + true + true + 20 + 1 true true false - 0 - true - false + true $(P)CAEN:$(SEL):status + 1 + + + + true + Text Update + false + false + 0 - + + 95 + 105 + Status + 5 - + - Text Update - true - ###### - false - 0 + - ISIS_Value + ISIS_Value_NEW - 151 + + 0 - - - 1 - - - - 0 - - 6 - false + false + 0 $(pv_name) $(pv_value) - 159 - - - true - true - 1 - true - 5b922a1a:14228c302d3:3c0c + 0 + + true + 4b5e83ab:16368e752d2:-7faf + true + false + ###### 0.0 - 31 - Meas Volt - false + true + true + 20 + 1 true true false - 0 + true + $(P)CAEN:$(SEL):name:fbk + 1 + + + true - false - $(P)CAEN:$(SEL):vmon + Text Update + false + false + 0 - + + 100 + 5 + Channel Name + 5 - + - Text Update - true - ###### - false - 0 + - ISIS_Value + ISIS_Value_NEW - 59 + + 0 - - - 1 - - - - 0 - - 6 - false + false + 0 $(pv_name) $(pv_value) - 324 - - - true - true - 1 - true - 5b922a1a:14228c302d3:3c0b + 0 + + true + 4b5e83ab:16368e752d2:-7f9a + true + false + ###### 0.0 - 31 - Meas Curr - false + true + true + 20 + 1 true true false - 0 + true + $(P)CAEN:$(SEL):vmon + 1 + + + true - false - $(P)CAEN:$(SEL):imon + Text Update + false + false + 0 - + + 95 + 205 + Meas Volt + 5 - + - Text Update - true - ###### - false - 0 + - ISIS_Value + ISIS_Value_NEW - 61 + + 0 - - - 1 - - - - 0 - - 6 - false + false + 0 $(pv_name) $(pv_value) - 397 - - - false - true - 2ada1da1:1425114fc7e:-405e + 0 + + true + 4b5e83ab:16368e752d2:-7f8c + true + + false + ###### + 0.0 - true - - - - 31 - 0 - Power On-Off - false - false + true + true + 20 + 1 true true - true + false - - - - $(P)CAEN:$(SEL):pwonoff + true + $(P)CAEN:$(SEL):imon + 1 + + + + true + Text Update + false + false + 0 - + + 95 + 305 + Meas Curr + 5 - + - OFF - LED - true - false + - ISIS_Button + ISIS_Value_NEW - 31 + + + false 0 - true + false + $(pv_name) +$(pv_value) + 0 + true + -35af6de1:16382e97ace:-7fa8 - -1 + On/Off + + false + 20 1 - ON + + true + true + false + + + true + $(P)CAEN:$(SEL):pwonoff - + - + Button + 60 + 405 + OnOffButton + 5 + + + + - - from org.csstudio.opibuilder.scriptUtil import PVUtil - -toggle = widget.getValue() -pv = widget.getPV() - -if (toggle == 0): - pv.setValue(1) -else: - pv.setValue(0) - - true - Toggle the value of the PV + ../Common Scripts/onOff.py + + false + - 6 - $(pv_name) -$(pv_value) - 474 + + Default + \ No newline at end of file diff --git a/base/uk.ac.stfc.isis.ibex.opis/resources/HV/HVChannelMonitorWithOnOff.opi b/base/uk.ac.stfc.isis.ibex.opis/resources/HV/HVChannelMonitorWithOnOff.opi deleted file mode 100644 index be6779d84f..0000000000 --- a/base/uk.ac.stfc.isis.ibex.opis/resources/HV/HVChannelMonitorWithOnOff.opi +++ /dev/null @@ -1,348 +0,0 @@ - - - false - - true - - -ea76e2a:141ff5eac31:-7640 - 3.1.4.20130702 - - true - 42 - - true - true - - - - - - - Display - true - 512 - - true - 6 - - false - -1 - -1 - - - -1 - -1 - - true - true - 1 - true - 5b922a1a:14228c302d3:3c0e - false - 0.0 - - 31 - Channel Name - false - - true - true - false - - 0 - true - false - - - - - - - - Text Update - true - ###### - false - 0 - - ISIS_Value - - 139 - 0 - - - - "$(PV_ROOT):"+pvStr0+":"+pvInt1+":$(CHANNUM):name:fbk" - - $(PV_ROOT):crates - loc://CAEN:SLOT - - - - 1 - - - - 0 - - 6 - false - $(pv_name) -$(pv_value) - 6 - - - true - true - 1 - true - 5b922a1a:14228c302d3:3c0d - false - 0.0 - - 31 - Status - false - - true - true - false - - 0 - true - false - - - - - - - - Text Update - true - ###### - false - 0 - - ISIS_Value - - 151 - 0 - - - - "$(PV_ROOT):"+pvStr0+":"+pvInt1+":$(CHANNUM):status" - - $(PV_ROOT):crates - loc://CAEN:SLOT - - - - 1 - - - - 0 - - 6 - false - $(pv_name) -$(pv_value) - 159 - - - true - true - 1 - true - 5b922a1a:14228c302d3:3c0c - false - 0.0 - - 31 - Meas Volt - false - - true - true - false - - 0 - true - false - - - - - - - - Text Update - true - ###### - false - 0 - - ISIS_Value - - 59 - 0 - - - - "$(PV_ROOT):"+pvStr0+":"+pvInt1+":$(CHANNUM):vmon" - - $(PV_ROOT):crates - loc://CAEN:SLOT - - - - 1 - - - - 0 - - 6 - false - $(pv_name) -$(pv_value) - 324 - - - true - true - 1 - true - 5b922a1a:14228c302d3:3c0b - false - 0.0 - - 31 - Meas Curr - false - - true - true - false - - 0 - true - false - - - - - - - - Text Update - true - ###### - false - 0 - - ISIS_Value - - 61 - 0 - - - - "$(PV_ROOT):"+pvStr0+":"+pvInt1+":$(CHANNUM):imon" - - $(PV_ROOT):crates - loc://CAEN:SLOT - - - - 1 - - - - 0 - - 6 - false - $(pv_name) -$(pv_value) - 397 - - - false - true - 2ada1da1:1425114fc7e:-405e - - true - - - - 31 - 0 - On-Off $(CHANNUM) - false - false - - true - true - true - - - - - - - - - - - - OFF - LED - true - false - - ISIS_Button - - 31 - 0 - true - - - - "$(PV_ROOT):"+pvStr0+":"+pvInt1+":$(CHANNUM):pwonoff" - - $(PV_ROOT):crates - loc://CAEN:SLOT - - - - -1 - 1 - ON - - - - - - - from org.csstudio.opibuilder.scriptUtil import PVUtil - -toggle = widget.getValue() -pv = widget.getPV() - -if (toggle == 0): - pv.setValue(1) -else: - pv.setValue(0) - - true - Toggle the value of the PV - - - 6 - $(pv_name) -$(pv_value) - 474 - - \ No newline at end of file diff --git a/base/uk.ac.stfc.isis.ibex.opis/resources/HV/HVChannelSummaryMaintenance.opi b/base/uk.ac.stfc.isis.ibex.opis/resources/HV/HVChannelSummaryMaintenance.opi index aaf7d84234..34036e85f9 100644 --- a/base/uk.ac.stfc.isis.ibex.opis/resources/HV/HVChannelSummaryMaintenance.opi +++ b/base/uk.ac.stfc.isis.ibex.opis/resources/HV/HVChannelSummaryMaintenance.opi @@ -1,135 +1,136 @@ + - false - - true - - -ea76e2a:141ff5eac31:-7640 - 3.1.4.20130702 - - true - 42 - - true - true - - - - - - - Display true - 200 - + false $(TEST) + -ea76e2a:141ff5eac31:-7640 + true + false + + 25 + + true + + 3.1.4.201301231545 true - 6 + Display false -1 -1 - - -1 + + + + 200 -1 - - true - true - 1 - true - 5b922a1a:14228c302d3:3c0e - false - 0.0 - - 31 - Channel Name - false - - true - true - false - - 0 - true - false - $(P)CAEN:$(SEL):name:fbk - - - - - - - Text Update - true - ###### - false - 0 - - ISIS_Value - - 139 + + 6 + true + -1 + true + + + + + 0 - - - 1 - - - - 0 - - 6 - false + false $(pv_name) $(pv_value) - 6 - - - true - true + + -1 + true -2dfa4620:143b9cec1c1:-7305 + true - 19 - Include - false + true + 20 + 1 true false false - + true + + + + + + Check Box + false - + + 20 + 175 + Include + 6 - + - Check Box - true - false + ISIS_Label_Small - 17 + + 0 - \ No newline at end of file diff --git a/base/uk.ac.stfc.isis.ibex.opis/resources/HV/HVMaintainSummary.opi b/base/uk.ac.stfc.isis.ibex.opis/resources/HV/HVMaintainSummary.opi index 05d06c9fa8..fd7dd0f7a8 100644 --- a/base/uk.ac.stfc.isis.ibex.opis/resources/HV/HVMaintainSummary.opi +++ b/base/uk.ac.stfc.isis.ibex.opis/resources/HV/HVMaintainSummary.opi @@ -1,466 +1,567 @@ + true + + 70801c61:143b569e151:6e33 + true false + + 600 true - 70801c61:143b569e151:6e33 3.1.4.201301231545 - - true - 400 - - true - true - - - - - - - Display - true - 500 - true - 6 + Display false -1 -1 - - -1 + + + + 800 -1 + + 6 + true + -1 + true + + + + - true - 1 - 70801c61:143b569e151:6e4a - true + 0 + + 0 + + true + 4b5e83ab:16368e752d2:-7496 + false + false + CAEN Summary Maintenance - 112 - Label + 37 + 1 true true false - false - false - - - - - - - Label - true - CAEN Summary - Maintenance - - ISIS_Title - - 368 - 0 - - 1 + true + 1 - 1 - - 0 + Label true - - 66 - - - false - true - 70801c61:143b569e151:6f36 - - - loc://CAEN:CHANLIST:UPDATE - $(P)CAEN:crates.ZRST - $(P)CAEN:crates.ONST - $(P)CAEN:crates.TWST - $(P)CAEN:crates.THST - $(P)CAEN:crates.FRST - $(P)CAEN:crates.FVST - $(P)CAEN:crates.SXST - $(P)CAEN:crates.SVST - $(P)CAEN:crates.EIST - $(P)CAEN:crates.NIST - $(P)CAEN:crates.TEST - $(P)CAEN:crates.ELST - $(P)CAEN:crates.TVST - $(P)CAEN:crates.TTST - $(P)CAEN:crates.FTST - $(P)CAEN:crates.FFST - - - 43 - Action Button - false - - true - true - false - - - + + 787 + 6 + Label + 6 - Action Button - true - Update list of channels to summarise - false + + false - ISIS_Label_Small + ISIS_Header1_NEW - 235 + + 0 - 0 - + + 0 - - false - 1 - - - - 120 - - - loc://CAEN:CHANLIST:UPDATE - 1 - 10 - - - - $(pv_name) -$(pv_value) - 258 - - - true - false - 1 - true - 70801c61:143b569e151:6f4e + true + 4b5e83ab:16368e752d2:-7495 + false false - 0.0 + $(NAME) - 28 - chanlist - false + 37 + 1 true true false - 0 - true - false - $(P)CAEN:CHANLIST + true + 1 + + + + Label + true - + + 787 + 6 + Label_2 + 42 - Text Update - true - ###### - false - 0 + + false - ISIS_Label_Small + ISIS_Header2_NEW - 223 - 0 - - - 1 - - - - 0 - - 270 - false - $(pv_name) -$(pv_value) - 264 - - true - - true - 70801c61:143b569e151:7028 - - 271 - group - - true - true - false - - false - true - - - - - - - true - Grouping Container - - ISIS_Label_Small - - 223 - 0 + 13 + + true + 4b5e83ab:16368e752d2:-7494 + false false + + 91 1 - - - - 120 - - 12 - - - - true - false - 1 - true - 70801c61:143b569e151:70a0 - false - 0.0 - - - $(P)CAEN:crates - $(P)CAEN:CHANLIST - $(P)CAEN:crates.ZRST - $(P)CAEN:crates.ONST - $(P)CAEN:crates.TWST - $(P)CAEN:crates.THST - $(P)CAEN:crates.FRST - $(P)CAEN:crates.FVST - $(P)CAEN:crates.SXST - $(P)CAEN:crates.SVST - $(P)CAEN:crates.EIST - $(P)CAEN:crates.NIST - $(P)CAEN:crates.TEST - $(P)CAEN:crates.ELST - $(P)CAEN:crates.TVST - $(P)CAEN:crates.TTST - $(P)CAEN:crates.FTST - $(P)CAEN:crates.FFST - - - 37 - crates - false true true false - 0 - true - false - $(P)CAEN:crates - - - - - - - Text Update - true - ###### - false - 0 - - ISIS_Label_Small - - 133 - 0 - - - 1 + + true + + true - + - 0 - - 360 - false - $(pv_name) -$(pv_value) - 288 - - - true - false - 1 - true - -2dfa4620:143ba6ad561:3626 - false - 0.0 - - 31 - test - false - - true - true - false - - 0 - true - false - + Grouping Container - + + 256 + 255 + Controls + 78 - + - Text Update - true - ###### - false - 0 + + true - ISIS_Label_Small + ISIS_GroupBox_NEW - 229 - 0 - - - 1 - - - - 0 - - 228 - false - $(pv_name) + + false + 0 + false + $(pv_name) +$(pv_value) + 0 + + true + 4b5e83ab:16368e752d2:-7c56 + + Update list of channels to summarise + + + loc://CAEN:CHANLIST:UPDATE(0) + $(P)CAEN:crates.ZRST + $(P)CAEN:crates.ONST + $(P)CAEN:crates.TWST + $(P)CAEN:crates.THST + $(P)CAEN:crates.FRST + $(P)CAEN:crates.FVST + $(P)CAEN:crates.SXST + $(P)CAEN:crates.SVST + $(P)CAEN:crates.EIST + $(P)CAEN:crates.NIST + $(P)CAEN:crates.TEST + $(P)CAEN:crates.ELST + $(P)CAEN:crates.TVST + $(P)CAEN:crates.TTST + $(P)CAEN:crates.FTST + $(P)CAEN:crates.FFST + + + false + 25 + 1 + + true + true + false + + + true + + + + + Button + 218 + 3 + Open Maintenance Screen + 3 + + + + + + loc://CAEN:CHANLIST:UPDATE + 1 + 10 + + + + + Default + + + + false + 0 + false + $(pv_name) $(pv_value) - 258 + 0 + + true + 4b5e83ab:16368e752d2:-7476 + + Return to summary display + + false + 25 + 1 + + true + true + false + + + true + + + + + Button + 218 + 3 + Open Maintenance Screen + 36 + + + + + + HVMonitorSummaryDisplay.opi + + true + + 1 + + + + + Default + + - - true - false - 1 - true - -15f0cf8b:143d334d8b9:-67fc - false - 0.0 + + 13 + + + true + 4b5e83ab:16368e752d2:-7493 + false + false - 37 - update - false + 517 + 1 true true false - 0 - true - false - $(P)CAEN:CHANLIST:UPDATE + + true + + true + + + + Grouping Container - + + 250 + 6 + Summary + 78 - + - Text Update - true - ###### - false - 0 + + true - ISIS_Label_Small + ISIS_GroupBox_NEW - 199 - 0 - - - 1 - - - - 0 - - 306 - false - $(pv_name) -$(pv_value) - 276 + + 0 + + + true + 4b5e83ab:16368e752d2:-742e + false + false + + 479 + 1 + + true + true + false + + + true + + true + + + + Grouping Container + + + + 220 + 0 + group + 2 + + + + + true + + ISIS_Label_Small + + - - false - true - -57130f77:149189e0291:-672d + + 13 + + + true + 4b5e83ab:16368e752d2:-732c + false + false - 43 - Action Button_1 - false + 97 + 1 true true false - + + true + + false + + + + Grouping Container + 256 + 255 + Background tasks + 168 - + - Action Button - true - Return to Summary Display - false + + true - ISIS_Label_Small + ISIS_GroupBox_NEW - 235 - 0 - 0 - - - - false - 1 - - - - 174 - - - HVMonitorSummaryDisplay.opi - - true - - 1 - - - - $(pv_name) + + 0 + false + 0 + $(pv_name) +$(pv_value) + 0 + + true + 4b5e83ab:16368e752d2:-742f + false + + false + ###### + 0.0 + + true + true + 20 + 1 + + true + true + false + + false + $(P)CAEN:CHANLIST + 1 + + + + true + Text Update + false + false + 0 + + + + 223 + 0 + chanlist + 0 + + + + + + ISIS_Label_NEW + + + + 0 + false + 0 + $(pv_name) +$(pv_value) + 0 + + true + 4b5e83ab:16368e752d2:-742b + false + + false + ###### + 0.0 + + true + true + 20 + 1 + + true + true + false + + false + $(P)CAEN:CHANLIST:UPDATE + 1 + + + + true + Text Update + false + false + 0 + + + + 223 + 0 + update + 20 + + + + + + ISIS_Label_NEW + + + + 0 + false + 0 + $(pv_name) $(pv_value) - 258 + 0 + + true + 4b5e83ab:16368e752d2:-742d + false + + false + ###### + 0.0 + + + $(P)CAEN:crates + $(P)CAEN:CHANLIST + $(P)CAEN:crates.ZRST + $(P)CAEN:crates.ONST + $(P)CAEN:crates.TWST + $(P)CAEN:crates.THST + $(P)CAEN:crates.FRST + $(P)CAEN:crates.FVST + $(P)CAEN:crates.SXST + $(P)CAEN:crates.SVST + $(P)CAEN:crates.EIST + $(P)CAEN:crates.NIST + $(P)CAEN:crates.TEST + $(P)CAEN:crates.ELST + $(P)CAEN:crates.TVST + $(P)CAEN:crates.TTST + $(P)CAEN:crates.FTST + $(P)CAEN:crates.FFST + + + true + true + 20 + 1 + + true + true + false + + false + $(P)CAEN:crates + 1 + + + + true + Text Update + false + false + 0 + + + + 223 + 0 + crates + 40 + + + + + + ISIS_Label_NEW + + \ No newline at end of file diff --git a/base/uk.ac.stfc.isis.ibex.opis/resources/HV/HVMonitorSummaryDisplay.opi b/base/uk.ac.stfc.isis.ibex.opis/resources/HV/HVMonitorSummaryDisplay.opi index fd160352a4..93899a53a7 100644 --- a/base/uk.ac.stfc.isis.ibex.opis/resources/HV/HVMonitorSummaryDisplay.opi +++ b/base/uk.ac.stfc.isis.ibex.opis/resources/HV/HVMonitorSummaryDisplay.opi @@ -1,697 +1,802 @@ + true + + 5b922a1a:14228c302d3:40e5 + true false + + 600 true - 5b922a1a:14228c302d3:40e5 3.1.4.201301231545 - - true - 410 - - true - true - - - - - - - Display - true - 552 - true - 6 + Display false -1 -1 - - -1 + + + + 800 -1 + + 6 + true + -1 + true + + + + - true - 1 - 5b922a1a:14228c302d3:5504 - false - - 31 - Summary Status Label - - true - true - false - - false - false - - - - - - - Label - true - Summary Status - - ISIS_Label_Small - - 61 0 - - 1 - - - - 1 - - 69 - true - 144 - - - false - true - 5b922a1a:14228c302d3:54fc - - false - - - - 25 - 0 - All Channels on Card Summary - false - false - - true - true - true - - - - - $(P)CAEN:CHANLIST:ERRORSTAT - - - - - - - OFF - LED + 0 + true - false - - ISIS_Button - - 25 - 0 - true - - - - - - - - - - - - - $(P)CAEN:CHANLIST:ERRORSTAT - - - - -1 - 1 - ON - - - - - 72 - $(pv_name) -$(pv_value) - 210 - - - true - 1 - 5b922a1a:14228c302d3:550c + 4b5e83ab:16368e752d2:-7e43 + false false + CAEN Summary Display - 31 - All Channels Power Label + 37 + 1 true true false - false - false - - - - - - - Label - true - All Channels on Card On/Off - - ISIS_Label_Small - - 85 - 0 - - 1 + true + 1 - 1 - - 69 + Label true - - 264 - - - false - true - 70801c61:143b029213c:-7685 - - false - - - - 25 - 0 - All On-Off - false - false - - true - true - true - - - - - $(P)CAEN:CHANLIST:PWONOFF - + + 787 + 6 + Label_1 + 6 - OFF - LED - true - false - - ISIS_Button - - 25 - 0 - true - - - - - - - - - - - - - $(P)CAEN:CHANLIST:PWONOFF - - - - -1 - 1 - ON - - - - 72 - $(pv_name) -$(pv_value) - 354 - - - true - 1 - 5b922a1a:14228c302d3:4547 - false - - 31 - Name Label Tab 0 - - true - true - false - - false false - - - - - - - Label - true - Channel Name - ISIS_Label_Small + ISIS_Header1_NEW - 103 - 0 - - 1 - - - - 1 - - 108 - true - - 6 - true - 1 - 5b922a1a:14228c302d3:4573 - false - - 31 - Status Label Tab 0 - - true - true - false - - false - false - - - - - - - Label - true - Status - - ISIS_Label_Small - - 103 0 - - 1 - - - - 1 - - 108 - true - 132 - - - true - 1 - 5b922a1a:14228c302d3:4577 + 0 + + true + 4b5e83ab:16368e752d2:-7e42 + false false + $(NAME) - 31 - Measured Voltage Label Tab 0 + 37 + 1 true true false - false - false - - - - - - - Label - true - Measured Voltage - - ISIS_Label_Small - - 67 - 0 - - 1 - - - - 1 - - 108 - true - - 342 - - true 1 - 5b922a1a:14228c302d3:457b - false - - 31 - Measured Current Label Tab 0 - - true - true - false - - false - false - - - - - - - Label - true - Measured Current - - ISIS_Label_Small - - 67 - 0 - - 1 - 1 - - 108 + Label true - - 405 - - - true - 1 - 5b922a1a:14228c302d3:457f - false - - 31 - Power Label Tab 0 - - true - true - false - - false - false + 787 + 6 + Label_2 + 42 - Label - true - Power -On/Off - - ISIS_Label_Small - - 49 - 0 - - 1 - - - - 1 - 108 - true - - 480 - - - true - 1 - 70801c61:143b029213c:-75a7 - true - - 56 - Label - - true - true - false - - false false - - - - - - - Label - true - CAEN Summary Display - ISIS_Title + ISIS_Header2_NEW - 552 - 0 + + + 13 + + true + 4b5e83ab:16368e752d2:-7d94 + false + false + + 61 1 - - - - 1 - - 0 - true - - 0 - - - true - false - 1 - true - 70801c61:143b029213c:-6311 - false - 0.0 - - - $(P)CAEN:CHANLIST - - - 28 - chanlist - false true true false - 0 - true - false - $(P)CAEN:CHANLIST - - - - - - - Text Update - true - ###### - false - 0 - - ISIS_Label_Small - - 61 - 0 - - - 1 - - - - 0 - - 71 - false - $(pv_name) -$(pv_value) - 6 - - true true - 70801c61:143b513fca4:2b08 - - 247 - group - - true - true - false - - false - true - - - + + + + Grouping Container - true - Grouping Container + 540 + 6 + Status + 78 + + + + + true - ISIS_Label_Small + ISIS_GroupBox_NEW - 523 - 0 + + 0 + + 2 + + true + 4b5e83ab:16368e752d2:-7ceb + false + false + Summary status: + + 20 + 1 + + true + true + false + + true + 1 + + + + Label + true + + + + 97 + 0 + Summary Status Label + 6 + + + + + false + + ISIS_Label_NEW + + + + 0 + false + $(pv_name) +$(pv_value) + + + + + + + + + + + + + $(P)CAEN:CHANLIST:ERRORSTAT + + + true + -1 + true + 4b5e83ab:16368e752d2:-7cd4 + + + + + + false + 25 + ON + 1 + + true + true + true + + true + $(P)CAEN:CHANLIST:ERRORSTAT + + + + LED + + + + false + + + + false + 25 + 102 + All Channels on Card Summary + 0 + 3 + + + + + false + + ISIS_Button + + OFF + + + 0 + + 2 + + true + 4b5e83ab:16368e752d2:-7cca + false + false + All channels on card on: + + 20 + 1 + + true + true + false + + true + 1 + + + + Label + true + + + + 193 + 126 + Summary Status Label_1 + 6 + + + + + false + + ISIS_Label_NEW + + + + 0 + false + $(pv_name) +$(pv_value) + + + + + + + + + + + + + $(P)CAEN:CHANLIST:PWONOFF + + + true + -1 + true + 70801c61:143b029213c:-7685 + + + + + + false + 25 + ON + 1 + + true + true + true + + true + $(P)CAEN:CHANLIST:PWONOFF + + + + LED + + + + false + + + + false + 25 + 324 + All On-Off + 0 + 3 + + + + + false + + ISIS_Button + + OFF + + + false + 0 + false + $(pv_name) +$(pv_value) + 0 + + true + 4b5e83ab:16368e752d2:-7c56 + + Maintain list + + false + 25 + 1 + + true + true + false + + + true + + + + + Button + 116 + 390 + Open Maintenance Screen + 3 + + + + + + HVMaintainSummary.opi + + true + + 1 + + + + + Default + + + + + 13 + + true + 4b5e83ab:16368e752d2:-7b49 + false false - 1 - - - - 150 - - 14 - - - - false - true - -15f0cf8b:143d334d8b9:-5d0a - 28 - Open Maintenance Screen - false + 457 + 1 true true false - + + true + + true + + + + Grouping Container - + + 540 + 6 + Summary + 138 - + - Action Button - true - Maintain List - false + + true - ISIS_Button + ISIS_GroupBox_NEW - 132 - 0 - 0 - - - - false - 1 - - - - 69 - - - HVMaintainSummary.opi - - true - - 1 - - - - $(pv_name) -$(pv_value) - 405 + + 0 + + + true + 70801c61:143b513fca4:2b08 + false + false + + 390 + 1 + + true + true + false + + + true + + true + + + + Grouping Container + + + + 500 + 5 + group + 30 + + + + + true + + ISIS_Label_Small + + + + 0 + + 0 + + true + 5b922a1a:14228c302d3:457b + false + false + Current: + + 20 + 1 + + true + true + false + + true + 1 + + + + Label + true + + + + 100 + 305 + Measured Current Label Tab 0 + 6 + + + + + false + + ISIS_Label_NEW + + + + 0 + + 0 + + true + 5b922a1a:14228c302d3:457f + false + false + Power: + + 20 + 1 + + true + true + false + + true + 1 + + + + Label + true + + + + 50 + 405 + Power Label Tab 0 + 6 + + + + + false + + ISIS_Label_NEW + + + + 0 + + 0 + + true + 5b922a1a:14228c302d3:4573 + false + false + Status: + + 20 + 1 + + true + true + false + + true + 1 + + + + Label + true + + + + 100 + 105 + Status Label Tab 0 + 6 + + + + + false + + ISIS_Label_NEW + + + + 0 + + 0 + + true + 5b922a1a:14228c302d3:4547 + false + false + Channel name: + + 20 + 1 + + true + true + false + + true + 1 + + + + Label + true + + + + 100 + 5 + Name Label Tab 0 + 6 + + + + + false + + ISIS_Label_NEW + + + + 0 + + 0 + + true + 5b922a1a:14228c302d3:4577 + false + false + Voltage: + + 20 + 1 + + true + true + false + + true + 1 + + + + Label + true + + + + 100 + 205 + Measured Voltage Label Tab 0 + 6 + + + + + false + + ISIS_Label_NEW + + - - true - false - 1 - true - -6139129e:14937ebadad:-7cbd - false - 0.0 + + 13 + + + true + 4b5e83ab:16368e752d2:-7244 + false + false - 20 - test - false + 61 + 1 true true false - 0 - true - false - + + true + + false + + + + Grouping Container - + + 254 + 545 + Background tasks + 78 - + - Text Update - true - ###### - false - 0 + + true - Default + ISIS_GroupBox_NEW - 61 - 0 - - - 1 - - - - 0 - - 73 - false - $(pv_name) + + 0 + false + 0 + $(pv_name) $(pv_value) - 72 + 0 + + true + 4b5e83ab:16368e752d2:-7262 + true + + false + ###### + 0.0 + + + $(P)CAEN:CHANLIST + + + true + true + 20 + 1 + + true + true + false + + false + $(P)CAEN:CHANLIST + 1 + + + + true + Text Update + false + false + 0 + + + + 25 + 0 + chanlist + 6 + + + + + + ISIS_Value_NEW + + \ No newline at end of file diff --git a/base/uk.ac.stfc.isis.ibex.opis/resources/HV/HVMonitorwithOnOff.opi b/base/uk.ac.stfc.isis.ibex.opis/resources/HV/HVMonitorwithOnOff.opi deleted file mode 100644 index 7e62538e06..0000000000 --- a/base/uk.ac.stfc.isis.ibex.opis/resources/HV/HVMonitorwithOnOff.opi +++ /dev/null @@ -1,2288 +0,0 @@ - - false - - true - TBC - $(P)CAEN - - 5b922a1a:14228c302d3:40e5 - 3.1.4.20130702 - - true - 410 - - true - true - - - - - - - Display - true - 534 - - true - 6 - - false - -1 - -1 - - - -1 - -1 - - - true - - true - 10 - 0 - Channels 8-15 - 0 - 5b922a1a:14228c302d3:43b6 - - - ISIS_Label_Small - - - - - - - - - - - - true - - - - - 54 - 6 - true - - true - 349 - true - - ISIS_Label_Small - - - - - Channels 0-7 - - - - Tabbed Container - true - 523 - - - - 1 - Cards - - true - true - false - - - - ISIS_Label_Small - - - Channels 16-23 - - - - - - - 3 - - - - true - - true - 5b922a1a:14228c302d3:43b7 - - 320 - Channels 0-7 - - true - true - false - - true - true - - - - - - - Grouping Container - true - - ISIS_Label_Small - - 521 - 0 - - false - 1 - - - - - 1 - - 1 - - true - 1 - 5b922a1a:14228c302d3:4547 - false - - 31 - Name Label Tab 0 - - true - true - false - - false - false - - - - - - - Label - true - Channel Name - - ISIS_Label_Small - - 103 - 0 - - 1 - - - - 1 - - 6 - true - - 6 - - - true - 1 - 5b922a1a:14228c302d3:4573 - false - - 31 - Status Label Tab 0 - - true - true - false - - false - false - - - - - - - Label - true - Status - - ISIS_Label_Small - - 103 - 0 - - 1 - - - - 1 - - 6 - true - - 120 - - - true - 1 - 5b922a1a:14228c302d3:4577 - false - - 31 - Measured Voltage Label Tab 0 - - true - true - false - - false - false - - - - - - - Label - true - Measured Voltage - - ISIS_Label_Small - - 103 - 0 - - 1 - - - - 1 - - 6 - true - - 240 - - - true - 1 - 5b922a1a:14228c302d3:457b - false - - 31 - Measured Current Label Tab 0 - - true - true - false - - false - false - - - - - - - Label - true - Measured Current - - ISIS_Label_Small - - 103 - 0 - - 1 - - - - 1 - - 6 - true - - 360 - - - true - 1 - 5b922a1a:14228c302d3:457f - false - - 31 - Power Label Tab 0 - - true - true - false - - false - false - - - - - - - Label - true - Power -On/Off - - ISIS_Label_Small - - 49 - 0 - - 1 - - - - 1 - - 6 - true - - 468 - - - - true - 0 - - true - 5b922a1a:14228c302d3:43dc - true - - false - 34 - Link to OPI for Channel 0 - - true - true - false - - HVChannelMonitorWithOnOff.opi - - - - - - - - Linking Container - true - - ISIS_Label_Small - - 502 - 3 - - - - HVChannelMonitorWithOnOff.opi - - $(PV_ROOT):crates - loc://CAEN:SLOT - - - 1 - - - - - 42 - - 6 - - - - true - 1 - - true - 5b922a1a:14228c302d3:43e3 - true - - false - 34 - Link to OPI for Channel 1 - - true - true - false - - HVChannelMonitorWithOnOff.opi - - - - - - - - Linking Container - true - - ISIS_Label_Small - - 502 - 3 - - 1 - - - - - 76 - - 6 - - - - true - 2 - - true - 5b922a1a:14228c302d3:440d - true - - false - 34 - Link to OPI for Channel 2 - - true - true - false - - HVChannelMonitorWithOnOff.opi - - - - - - - - Linking Container - true - - ISIS_Label_Small - - 502 - 3 - - 1 - - - - - 110 - - 6 - - - - true - 3 - - true - 5b922a1a:14228c302d3:4406 - true - - false - 34 - Link to OPI for Channel 3 - - true - true - false - - HVChannelMonitorWithOnOff.opi - - - - - - - - Linking Container - true - - ISIS_Label_Small - - 502 - 3 - - 1 - - - - - 144 - - 6 - - - - true - 4 - - true - 5b922a1a:14228c302d3:43ff - true - - false - 34 - Link to OPI for Channel 4 - - true - true - false - - HVChannelMonitorWithOnOff.opi - - - - - - - - Linking Container - true - - ISIS_Label_Small - - 502 - 3 - - 1 - - - - - 178 - - 6 - - - - true - 5 - - true - 5b922a1a:14228c302d3:43f8 - true - - false - 34 - Link to OPI for Channel 5 - - true - true - false - - HVChannelMonitorWithOnOff.opi - - - - - - - - Linking Container - true - - ISIS_Label_Small - - 502 - 3 - - 1 - - - - - 212 - - 6 - - - - true - 6 - - true - 5b922a1a:14228c302d3:43f1 - true - - false - 34 - Link to OPI for Channel 6 - - true - true - false - - HVChannelMonitorWithOnOff.opi - - - - - - - - Linking Container - true - - ISIS_Label_Small - - 502 - 3 - - 1 - - - - - 246 - - 6 - - - - true - 7 - - true - 5b922a1a:14228c302d3:43ea - true - - false - 34 - Link to OPI for Channel 7 - - true - true - false - - HVChannelMonitorWithOnOff.opi - - - - - - - - Linking Container - true - - ISIS_Label_Small - - 502 - 3 - - 1 - - - - - 280 - - 6 - - - - - true - - false - 5b922a1a:14228c302d3:45bf - - 320 - Channels 8-15 - - true - true - false - - true - true - - - - - - - Grouping Container - true - - ISIS_Label_Small - - 521 - 0 - - false - 1 - - - - - 1 - - 1 - - true - 1 - 5b922a1a:14228c302d3:45db - false - - 31 - Name Label Tab 1 - - true - true - false - - false - false - - - - - - - Label - true - Channel Name - - ISIS_Label_Small - - 103 - 0 - - 1 - - - - 1 - - 6 - true - - 6 - - - true - 1 - 5b922a1a:14228c302d3:45dc - false - - 31 - Status Label Tab 1 - - true - true - false - - false - false - - - - - - - Label - true - Status - - ISIS_Label_Small - - 103 - 0 - - 1 - - - - 1 - - 6 - true - - 120 - - - true - 1 - 5b922a1a:14228c302d3:45dd - false - - 31 - Measured Voltage Label Tab 1 - - true - true - false - - false - false - - - - - - - Label - true - Measured Voltage - - ISIS_Label_Small - - 103 - 0 - - 1 - - - - 1 - - 6 - true - - 240 - - - true - 1 - 5b922a1a:14228c302d3:45de - false - - 31 - Measured Current Label Tab 1 - - true - true - false - - false - false - - - - - - - Label - true - Measured Current - - ISIS_Label_Small - - 103 - 0 - - 1 - - - - 1 - - 6 - true - - 360 - - - true - 1 - 5b922a1a:14228c302d3:45df - false - - 31 - Power Label Tab 1 - - true - true - false - - false - false - - - - - - - Label - true - Power -On/Off - - ISIS_Label_Small - - 49 - 0 - - 1 - - - - 1 - - 6 - true - - 468 - - - - true - 8 - - true - 5b922a1a:14228c302d3:45e0 - true - - false - 34 - Link to OPI for Channel 8 - - true - true - false - - HVChannelMonitorWithOnOff.opi - - - - - - - - Linking Container - true - - ISIS_Label_Small - - 502 - 3 - - 1 - - - - - 42 - - 6 - - - - true - 9 - - true - 5b922a1a:14228c302d3:45e7 - true - - false - 34 - Link to OPI for Channel 9 - - true - true - false - - HVChannelMonitorWithOnOff.opi - - - - - - - - Linking Container - true - - ISIS_Label_Small - - 502 - 3 - - 1 - - - - - 76 - - 6 - - - - true - 10 - - true - 5b922a1a:14228c302d3:45ee - true - - false - 34 - Link to OPI for Channel 10 - - true - true - false - - HVChannelMonitorWithOnOff.opi - - - - - - - - Linking Container - true - - ISIS_Label_Small - - 502 - 3 - - 1 - - - - - 110 - - 6 - - - - true - 11 - - true - 5b922a1a:14228c302d3:45f5 - true - - false - 34 - Link to OPI for Channel 11 - - true - true - false - - HVChannelMonitorWithOnOff.opi - - - - - - - - Linking Container - true - - ISIS_Label_Small - - 502 - 3 - - 1 - - - - - 144 - - 6 - - - - true - 12 - - true - 5b922a1a:14228c302d3:45fc - true - - false - 34 - Link to OPI for Channel 12 - - true - true - false - - HVChannelMonitorWithOnOff.opi - - - - - - - - Linking Container - true - - ISIS_Label_Small - - 502 - 3 - - 1 - - - - - 178 - - 6 - - - - true - 13 - - true - 5b922a1a:14228c302d3:4603 - true - - false - 34 - Link to OPI for Channel 13 - - true - true - false - - HVChannelMonitorWithOnOff.opi - - - - - - - - Linking Container - true - - ISIS_Label_Small - - 502 - 3 - - 1 - - - - - 212 - - 6 - - - - true - 14 - - true - 5b922a1a:14228c302d3:460a - true - - false - 34 - Link to OPI for Channel 14 - - true - true - false - - HVChannelMonitorWithOnOff.opi - - - - - - - - Linking Container - true - - ISIS_Label_Small - - 502 - 3 - - 1 - - - - - 246 - - 6 - - - - true - 15 - - true - 5b922a1a:14228c302d3:4611 - true - - false - 34 - Link to OPI for Channel 15 - - true - true - false - - HVChannelMonitorWithOnOff.opi - - - - - - - - Linking Container - true - - ISIS_Label_Small - - 502 - 3 - - 1 - - - - - 280 - - 6 - - - - - true - - false - 5b922a1a:14228c302d3:45af - - 320 - Channels 16-23 - - true - true - false - - true - true - - - - - - - Grouping Container - true - - ISIS_Label_Small - - 521 - 0 - - false - 1 - - - - - 1 - - 1 - - true - 1 - 5b922a1a:14228c302d3:48f7 - false - - 31 - Name Label Tab 2 - - true - true - false - - false - false - - - - - - - Label - true - Channel Name - - ISIS_Label_Small - - 103 - 0 - - 1 - - - - 1 - - 6 - true - - 6 - - - true - 1 - 5b922a1a:14228c302d3:48f8 - false - - 31 - Status Label Tab 2 - - true - true - false - - false - false - - - - - - - Label - true - Status - - ISIS_Label_Small - - 103 - 0 - - 1 - - - - 1 - - 6 - true - - 120 - - - true - 1 - 5b922a1a:14228c302d3:48f9 - false - - 31 - Measured Voltage Label Tab 2 - - true - true - false - - false - false - - - - - - - Label - true - Measured Voltage - - ISIS_Label_Small - - 103 - 0 - - 1 - - - - 1 - - 6 - true - - 240 - - - true - 1 - 5b922a1a:14228c302d3:48fa - false - - 31 - Measured Current Label Tab 2 - - true - true - false - - false - false - - - - - - - Label - true - Measured Current - - ISIS_Label_Small - - 103 - 0 - - 1 - - - - 1 - - 6 - true - - 360 - - - true - 1 - 5b922a1a:14228c302d3:48fb - false - - 31 - Power Label Tab 2 - - true - true - false - - false - false - - - - - - - Label - true - Power -On/Off - - ISIS_Label_Small - - 49 - 0 - - 1 - - - - 1 - - 6 - true - - 468 - - - - true - 16 - - true - 5b922a1a:14228c302d3:48fc - true - - false - 34 - Link to OPI for Channel 16 - - true - true - false - - HVChannelMonitorWithOnOff.opi - - - - - - - - Linking Container - true - - ISIS_Label_Small - - 502 - 3 - - 1 - - - - - 42 - - 6 - - - - true - 17 - - true - 5b922a1a:14228c302d3:4903 - true - - false - 34 - Link to OPI for Channel 17 - - true - true - false - - HVChannelMonitorWithOnOff.opi - - - - - - - - Linking Container - true - - ISIS_Label_Small - - 502 - 3 - - 1 - - - - - 76 - - 6 - - - - true - 18 - - true - 5b922a1a:14228c302d3:490a - true - - false - 34 - Link to OPI for Channel 18 - - true - true - false - - HVChannelMonitorWithOnOff.opi - - - - - - - - Linking Container - true - - ISIS_Label_Small - - 502 - 3 - - 1 - - - - - 110 - - 6 - - - - true - 19 - - true - 5b922a1a:14228c302d3:4911 - true - - false - 34 - Link to OPI for Channel 19 - - true - true - false - - HVChannelMonitorWithOnOff.opi - - - - - - - - Linking Container - true - - ISIS_Label_Small - - 502 - 3 - - 1 - - - - - 144 - - 6 - - - - true - 20 - - true - 5b922a1a:14228c302d3:4918 - true - - false - 34 - Link to OPI for Channel 20 - - true - true - false - - HVChannelMonitorWithOnOff.opi - - - - - - - - Linking Container - true - - ISIS_Label_Small - - 502 - 3 - - 1 - - - - - 178 - - 6 - - - - true - 21 - - true - 5b922a1a:14228c302d3:491f - true - - false - 34 - Link to OPI for Channel 21 - - true - true - false - - HVChannelMonitorWithOnOff.opi - - - - - - - - Linking Container - true - - ISIS_Label_Small - - 502 - 3 - - 1 - - - - - 212 - - 6 - - - - true - 22 - - true - 5b922a1a:14228c302d3:4926 - true - - false - 34 - Link to OPI for Channel 22 - - true - true - false - - HVChannelMonitorWithOnOff.opi - - - - - - - - Linking Container - true - - ISIS_Label_Small - - 502 - 3 - - 1 - - - - - 246 - - 6 - - - - true - 23 - - true - 5b922a1a:14228c302d3:492d - true - - false - 34 - Link to OPI for Channel 23 - - true - true - false - - HVChannelMonitorWithOnOff.opi - - - - - - - - Linking Container - true - - ISIS_Label_Small - - 502 - 3 - - 1 - - - - - 280 - - 6 - - - - - true - 1 - 5b922a1a:14228c302d3:5504 - false - - 31 - Summary Status Label - - true - true - false - - false - false - - - - - - - Label - true - Summary Status - - ISIS_Label_Small - - 61 - 0 - - 1 - - - - 1 - - 45 - true - - 276 - - - false - true - 5b922a1a:14228c302d3:54fc - - false - - - - 25 - 0 - All Channels on Card Summary - false - false - - true - true - true - - - - - - - - - - - - OFF - LED - true - false - - ISIS_Button - - 25 - 0 - true - - - - "$(PV_ROOT):"+pvStr0+":status" - - $(PV_ROOT):crates - - - - - - - - - - - - - $(pv_name) - - - - -1 - 1 - ON - - - - - 48 - $(pv_name) -$(pv_value) - 342 - - - true - 1 - 5b922a1a:14228c302d3:550c - false - - 31 - All Channels Power Label - - true - true - false - - false - false - - - - - - - Label - true - Turn All Channels on Card On/Off - - ISIS_Label_Small - - 103 - 0 - - 1 - - - - 1 - - 45 - true - - 378 - - - false - true - 5b922a1a:14228c302d3:54b5 - - - - - - 25 - false - 0 - All On-Off - false - false - - true - true - true - - - - - - - - - - - - OFF - 0 - Boolean Button - true - false - - ISIS_Button - - 25 - 0 - 0 - Are you sure you want to do this? - true - - - - "$(PV_ROOT):"+pvStr0+":pwonoff" - - $(PV_ROOT):crates - - - - - - - - - - - - - $(pv_name) - - - - -1 - true - 0 - 1 - ON - true - - - - 48 - - $(pv_name) -$(pv_value) - 486 - - - true - 1 - 2ada1da1:1425114fc7e:-6f93 - false - - 31 - Select Crates Label - - true - true - false - - false - false - - - - - - - Label - true - Select Crate to display - - ISIS_Label_Small - - 137 - 0 - - 1 - - - - 1 - - 6 - true - - 6 - - - true - true - 2ada1da1:1425114fc7e:-6f92 - - 27 - Crate to Display - false - - true - false - false - - $(PV_ROOT):crates - - - - - - - Combo - true - false - - ISIS_Label_Small - - 163 - 0 - - - 1 - - - - true - - 8 - $(pv_name) -$(pv_value) - 155 - - - true - 1 - 2ada1da1:1425114fc7e:-6f87 - false - - 31 - Select Card Label - - true - true - false - - false - false - - - - - - - Label - true - Select Card to display - - ISIS_Label_Small - - 137 - 0 - - 1 - - - - 1 - - 6 - true - - 330 - - - true - true - 2ada1da1:1425114fc7e:-5a63 - - 27 - Card to Display - false - - true - false - false - - loc://CAEN:SLOT - - - - - - - Combo - true - false - - ISIS_Label_Small - - 48 - 0 - - - - pv0 - - loc://CAEN:SLOT - - - - - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - - 1 - - - - false - - 8 - $(pv_name) -$(pv_value) - 480 - - \ No newline at end of file diff --git a/base/uk.ac.stfc.isis.ibex.opis/resources/HV/Scripts/ChannelUtilities.py b/base/uk.ac.stfc.isis.ibex.opis/resources/HV/Scripts/ChannelUtilities.py new file mode 100644 index 0000000000..a0142025f4 --- /dev/null +++ b/base/uk.ac.stfc.isis.ibex.opis/resources/HV/Scripts/ChannelUtilities.py @@ -0,0 +1,138 @@ +from org.csstudio.opibuilder.scriptUtil import PVUtil +from org.csstudio.opibuilder.scriptUtil import ConsoleUtil + + +def get_available_channels(crate_name_pvs, this_display, + get_string_from_pv=PVUtil.getString, log=ConsoleUtil.writeError): + """ + Generator for the available Caen channels + + Args: + crate_name_pvs: The PVs containing the names of the crates + this_display: The display that contains the macros for the maximum number of crates, slots and channels + get_string_from_pv: Method used to get strings from PVs + log: Method to send strings to the logs + + Yields: + A tuple of crate (string), slot (int), channel (int) + """ + for crate_name_pv in crate_name_pvs: + try: + crate = get_string_from_pv(crate_name_pv) + except Exception, e: + log("Unable to get crate name for PV: " + crate_name_pv + " , error: " + str(e)) + continue + + if len(crate) == 0: + continue + + for slot in range(get_max_slots(this_display)): + for channel in range(get_max_channels(this_display)): + yield crate, slot, channel + + +def get_summary_channels(channel_list_pv, get_string_from_pv=PVUtil.getString, log=ConsoleUtil.writeError): + """ + Gets the list of channels from the HVCaen. + + Args: + channel_list_pv: The PV containing the list of channels. + get_string_from_pv: Function for extracting a string from a named PV + log: Function accepting a string that is written to a log + + Returns: + A list of available channels, or an empty list if getting the channels fails. + """ + + def channel_formatter(channel): + formatted_channel = channel.replace(" ", "") + if formatted_channel.endswith(','): + formatted_channel = formatted_channel[:-1] + return formatted_channel + + channels = list() + try: + if channel_list_pv.getValue().getData().size() > 0: # default method throws uncaught java exception if empty + channels = [channel_formatter(chan) for chan in get_string_from_pv(channel_list_pv).split(' ')] + except Exception, e: # Jython slightly different to standard Python + log("Unable to get channel list for HVCaen: " + str(e)) # Jython str has no 'format' + return channels + +def _get_max(this_display, macro, default_value, upper_limit=None): + """ + + Args: + this_display: The display. The returned value should be available via a macro. + macro: The macro containing the value + default_value: The value to use if the macro isn't specified + upper_limit: The absolute maximum value the property can take + log: Where to send messages + + Returns: + The value of the macro + """ + max_value = this_display.getPropertyValue("macros").getMacrosMap().get(macro) + + try: + max_value = int(max_value) + except TypeError: + max_value = default_value + + if max_value is None: + max_value = default_value + + if upper_limit is not None: + max_value = min(max_value, upper_limit) + + return max_value + + +def get_max_crates(this_display): + """ + The absolute maximum value is 15, determined by the limitations of EPICS MMBO records. + + Args: + this_display: The display. The returned value should be available via a macro. + + Returns: + The maximum number of crates supported by the OPI + """ + return _get_max(this_display, "MAX_CRATES", 2, 15) + + +def get_max_slots(this_display): + """ + Args: + this_display: The display. The returned value should be available via a macro. + + Returns: + The maximum number of slots supported by the OPI + """ + return _get_max(this_display, "MAX_SLOTS", 5) + + +def get_max_channels(this_display): + """ + Args: + this_display: The display. The returned value should be available via a macro. + + Returns: + The maximum number of channels supported by the OPI + """ + return _get_max(this_display, "MAX_CHANNELS", 25) + + +def get_channel_pv_name(crate, slot, channel): + """ + Gets the PV name for a given channel + + Args: + crate: The name of the crate + slot: The slot number + channel: The channel number + + Returns: + The PV name for accessing the given channel + """ + return crate + ":" + str(slot) + ":" + str(channel) + \ No newline at end of file diff --git a/base/uk.ac.stfc.isis.ibex.opis/resources/HV/Scripts/DisplayChannels.js b/base/uk.ac.stfc.isis.ibex.opis/resources/HV/Scripts/DisplayChannels.js deleted file mode 100644 index dd92f9df97..0000000000 --- a/base/uk.ac.stfc.isis.ibex.opis/resources/HV/Scripts/DisplayChannels.js +++ /dev/null @@ -1,81 +0,0 @@ -importPackage(Packages.org.csstudio.opibuilder.scriptUtil); - -// PVs -// pv[0] = $(P)CAEN:crates, triggered -// pv[1] = $(P)CAEN:CHANLIST, triggered -// pv[2] = $(P)CAEN:crates.ZRST -// pv[3] = $(P)CAEN:crates.ONST -// pv[4] = $(P)CAEN:crates.TWST -// pv[5] = $(P)CAEN:crates.THST -// pv[6] = $(P)CAEN:crates.FRST -// pv[7] = $(P)CAEN:crates.FVST -// pv[8] = $(P)CAEN:crates.SXST -// pv[9] = $(P)CAEN:crates.SVST -// pv[10] = $(P)CAEN:crates.EIST -// pv[11] = $(P)CAEN:crates.NIST -// pv[12] = $(P)CAEN:crates.TEST -// pv[13] = $(P)CAEN:crates.ELST -// pv[14] = $(P)CAEN:crates.TVST -// pv[15] = $(P)CAEN:crates.TTST -// pv[16] = $(P)CAEN:crates.FTST -// pv[17] = $(P)CAEN:crates.FFST - -// Get and clear the group container prior to display -var group = display.getWidget('group'); -group.removeAllChildren(); - -// Get the list of entries in the channel list -try{ - var fullchanlist = PVUtil.getString(pvs[1]); -} -catch(err){ - var fullchanlist = ""; -} -// Split the chanlist into an array -fullchanlist = fullchanlist.split(' '); -var chanlist = []; -var testval = ''; - -// format the chanlist array for searching -for (i=0; i < fullchanlist.length; i++){ - var chan = fullchanlist[i].replace(" ",""); - if (chan.slice(-1)==','){ - chan = chan.replace(",",""); - } - chanlist[chanlist.length] = chan; -} - -// Values to control the search length for all channels (must match the values in UpdateChannels) -var maxcrate = 2; -var maxslot = 5; -var maxchan = 10; - -// Loop through and generate an OPI linked to each channel displaying the name for inclusion in the chan list -for (z=0; z < maxcrate; z++){ - var cratename = pvs[2+z]; - if (cratename != "") { - var crate = PVUtil.getString(cratename); - for (x=0; x < maxslot; x++){ - for (y=0; y < maxchan; y++){ - var avail = crate + ':' + x + ':' + y; - var target = WidgetUtil.createWidgetModel("org.csstudio.opibuilder.widgets.linkingContainer"); - target.setPropertyValue('opi_file', "HVChannelSummaryMaintenance.opi"); - target.setPropertyValue('auto_size','true'); - target.setPropertyValue('zoom_to_fit','false'); - target.setPropertyValue('border_style',0); - target.setPropertyValue('name',avail); - target.addMacro('SEL',avail); - group.addChildToBottom(target); - container = display.getWidget(avail); - // Check if the channel is in in the list, and check the bos if it is - for(i=0; iHV/HVMonitorSummaryDisplay.opi Summary display for Caens (maintenance of list via the button on this OPI). No properties required. + + MAX_CRATES + The maximum number of crates to display (default: 2, max: 15) + + + MAX_SLOTS + The maximum number of slots to display per crate (default: 5) + + + MAX_CHANNELS + The maximum number of channels per slot per crate to display (default: 25) +