From f368ea11b376d0ab30e1a5d8c3a5989008d94357 Mon Sep 17 00:00:00 2001 From: Emilio Asensi <emilio.asensiconejero@esss.se> Date: Tue, 28 Apr 2020 14:53:16 +0200 Subject: [PATCH] HW Interlock BlockIcon and Faceplate --- .../HW_INTLCK_BlockIcon_Compact.bob | 81 +++ .../DigitalMeasure/HW_INTLCK_Faceplate.bob | 474 ++++++++++++++++++ .../HW_INTLCK_Faceplate_Trend.plt | 110 ++++ .../TS2/ts2-cryomodule/interlocks.bob | 25 +- 4 files changed, 680 insertions(+), 10 deletions(-) create mode 100644 NON-APPROVED/ICS_OPI_LIBRARY/DeviceTypes/DigitalMeasure/HW_INTLCK_BlockIcon_Compact.bob create mode 100644 NON-APPROVED/ICS_OPI_LIBRARY/DeviceTypes/DigitalMeasure/HW_INTLCK_Faceplate.bob create mode 100644 NON-APPROVED/ICS_OPI_LIBRARY/DeviceTypes/DigitalMeasure/HW_INTLCK_Faceplate_Trend.plt diff --git a/NON-APPROVED/ICS_OPI_LIBRARY/DeviceTypes/DigitalMeasure/HW_INTLCK_BlockIcon_Compact.bob b/NON-APPROVED/ICS_OPI_LIBRARY/DeviceTypes/DigitalMeasure/HW_INTLCK_BlockIcon_Compact.bob new file mode 100644 index 00000000..89c93419 --- /dev/null +++ b/NON-APPROVED/ICS_OPI_LIBRARY/DeviceTypes/DigitalMeasure/HW_INTLCK_BlockIcon_Compact.bob @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8"?> +<display version="2.0.0"> + <name>HW_INTLCK_BlockIcon_Compact</name> + <width>50</width> + <height>32</height> + <widget type="label" version="2.0.0"> + <name>WID_AUTMANIcon</name> + <text>A</text> + <x>20</x> + <width>30</width> + <height>30</height> + <font> + <font family="Source Sans Pro" style="BOLD" size="20.0"> + </font> + </font> + <horizontal_alignment>1</horizontal_alignment> + <rules> + <rule name="TextRule" prop_id="text" out_exp="false"> + <exp bool_exp="pv0 == true"> + <value>A</value> + </exp> + <exp bool_exp="pv1 == true"> + <value>M</value> + </exp> + <pv_name>${WIDSecSub}:${WIDDis}-${WIDDev}-${WIDIndex}:OpMode_Auto</pv_name> + <pv_name>${WIDSecSub}:${WIDDis}-${WIDDev}-${WIDIndex}:OpMode_Manual</pv_name> + </rule> + </rules> + <tooltip>Opmode indicator</tooltip> + </widget> + <widget type="led" version="2.0.0"> + <name>LED</name> + <pv_name>${WIDSecSub}:${WIDDis}-${WIDDev}-${WIDIndex}:Closed</pv_name> + <y>10</y> + <off_color> + <color name="ERROR" red="252" green="13" blue="27"> + </color> + </off_color> + </widget> + <widget type="action_button" version="3.0.0"> + <name>WID_OpenFaceplate</name> + <actions> + <action type="execute"> + <script file="EmbeddedJs"> + <text><![CDATA[/* Embedded javascript */ +/* Author: Miklos Boros*/ +/* Function: check if locking is allowed is yes then generate the LockID, after that it opens the Faceplate*/ + + +PVUtil = org.csstudio.display.builder.runtime.script.PVUtil; +logger = org.csstudio.display.builder.runtime.script.ScriptUtil.getLogger(); +PVFactory = org.csstudio.display.builder.runtime.pv.PVFactory; + + +macros = widget.getEffectiveMacros(); +WIDIndex = macros.getValue("WIDIndex"); +WIDSecSub = macros.getValue("WIDSecSub"); +WIDDis = macros.getValue("WIDDis"); +WIDDev = macros.getValue("WIDDev"); + + + /* OPEN FACEPLATE*/ + var map = new Object(); + map["Dev"] = WIDDev; + map["Dis"] = WIDDis; + map["Index"] = WIDIndex; + map["SecSub"] = WIDSecSub; + org.csstudio.display.builder.runtime.script.ScriptUtil.openDisplay(widget, "HW_INTLCK_Faceplate.bob", "STANDALONE", map); + +]]></text> + </script> + <description>Open Faceplate</description> + </action> + </actions> + <text></text> + <width>50</width> + <height>32</height> + <transparent>true</transparent> + <tooltip>Open faceplate</tooltip> + </widget> +</display> diff --git a/NON-APPROVED/ICS_OPI_LIBRARY/DeviceTypes/DigitalMeasure/HW_INTLCK_Faceplate.bob b/NON-APPROVED/ICS_OPI_LIBRARY/DeviceTypes/DigitalMeasure/HW_INTLCK_Faceplate.bob new file mode 100644 index 00000000..c54e5bdd --- /dev/null +++ b/NON-APPROVED/ICS_OPI_LIBRARY/DeviceTypes/DigitalMeasure/HW_INTLCK_Faceplate.bob @@ -0,0 +1,474 @@ +<?xml version="1.0" encoding="UTF-8"?> +<display version="2.0.0"> + <name>HW_INTLCK_Faceplate</name> + <width>460</width> + <height>560</height> + <widget type="tabs" version="2.0.0"> + <name>Tabs</name> + <tabs> + <tab> + <name>Status</name> + <children> + <widget type="group" version="2.0.0"> + <name>group.status</name> + <x>10</x> + <y>10</y> + <width>218</width> + <height>340</height> + <style>3</style> + <widget type="rectangle" version="2.0.0"> + <name>group.status.border</name> + <width>218</width> + <height>330</height> + <line_width>0</line_width> + <line_color> + <color name="GROUP-BORDER" red="150" green="155" blue="151"> + </color> + </line_color> + <background_color> + <color name="GROUP-BORDER" red="150" green="155" blue="151"> + </color> + </background_color> + </widget> + <widget type="rectangle" version="2.0.0"> + <name>group.status.background</name> + <x>5</x> + <y>35</y> + <width>213</width> + <height>289</height> + <line_width>0</line_width> + <line_color> + <color name="PRIMARY-GROUP-BORDER" red="151" green="188" blue="202"> + </color> + </line_color> + <background_color> + <color name="GROUP-BACKGROUND" red="200" green="205" blue="201"> + </color> + </background_color> + </widget> + <widget type="label" version="2.0.0"> + <name>LB_Status</name> + <text>STATUS</text> + <width>218</width> + <height>35</height> + <font> + <font name="Header 2" family="Source Sans Pro" style="BOLD_ITALIC" size="21.0"> + </font> + </font> + <foreground_color> + <color name="GRAY-TEXT" red="255" green="255" blue="255"> + </color> + </foreground_color> + <background_color> + <color name="GROUP-BACKGROUND" red="200" green="205" blue="201"> + </color> + </background_color> + <horizontal_alignment>1</horizontal_alignment> + <vertical_alignment>1</vertical_alignment> + </widget> + <widget type="label" version="2.0.0"> + <name>LB_Status_Position</name> + <text>Position</text> + <x>15</x> + <y>50</y> + <width>203</width> + <height>25</height> + <font> + <font name="Default Bold" family="Source Sans Pro" style="BOLD" size="16.0"> + </font> + </font> + <foreground_color> + <color name="TEXT" red="25" green="25" blue="25"> + </color> + </foreground_color> + <background_color> + <color name="GROUP-BACKGROUND" red="200" green="205" blue="201"> + </color> + </background_color> + <transparent>false</transparent> + <vertical_alignment>1</vertical_alignment> + </widget> + <widget type="led" version="2.0.0"> + <name>LED_Opened</name> + <pv_name>${SecSub}:${Dis}-${Dev}-${Index}:Opened</pv_name> + <x>48</x> + <y>87</y> + <width>25</width> + <height>25</height> + <off_color> + <color name="Grid" red="169" green="169" blue="169"> + </color> + </off_color> + <tooltip>Valve position</tooltip> + </widget> + <widget type="label" version="2.0.0"> + <name>LB_Opened</name> + <text>OPENED</text> + <x>83</x> + <y>87</y> + <width>60</width> + <height>25</height> + <background_color> + <color name="BLUE-BACKGROUND" red="195" green="226" blue="225"> + </color> + </background_color> + <vertical_alignment>1</vertical_alignment> + </widget> + <widget type="led" version="2.0.0"> + <name>LED_Closed</name> + <pv_name>${SecSub}:${Dis}-${Dev}-${Index}:Closed</pv_name> + <x>48</x> + <y>122</y> + <width>25</width> + <height>25</height> + <off_color> + <color name="Grid" red="169" green="169" blue="169"> + </color> + </off_color> + <tooltip>Valve position</tooltip> + </widget> + <widget type="label" version="2.0.0"> + <name>LB_Closed</name> + <text>CLOSED</text> + <x>84</x> + <y>123</y> + <width>60</width> + <height>25</height> + <background_color> + <color name="BLUE-BACKGROUND" red="195" green="226" blue="225"> + </color> + </background_color> + <vertical_alignment>1</vertical_alignment> + </widget> + <widget type="label" version="2.0.0"> + <name>LB_Status_Solenoid</name> + <text>Relay</text> + <x>15</x> + <y>165</y> + <width>203</width> + <height>25</height> + <font> + <font name="Default Bold" family="Source Sans Pro" style="BOLD" size="16.0"> + </font> + </font> + <foreground_color> + <color name="TEXT" red="25" green="25" blue="25"> + </color> + </foreground_color> + <background_color> + <color name="GROUP-BACKGROUND" red="200" green="205" blue="201"> + </color> + </background_color> + <transparent>false</transparent> + </widget> + <widget type="led" version="2.0.0"> + <name>LED_Solenoid</name> + <pv_name>${SecSub}:${Dis}-${Dev}-${Index}:Closed</pv_name> + <x>48</x> + <y>202</y> + <width>25</width> + <height>25</height> + <off_color> + <color name="Grid" red="169" green="169" blue="169"> + </color> + </off_color> + <tooltip>Valve solenoid state</tooltip> + </widget> + <widget type="label" version="2.0.0"> + <name>LB_Solenoid</name> + <text>OUTPUT</text> + <x>84</x> + <y>203</y> + <width>60</width> + <height>25</height> + <background_color> + <color name="BLUE-BACKGROUND" red="195" green="226" blue="225"> + </color> + </background_color> + <vertical_alignment>1</vertical_alignment> + </widget> + </widget> + <widget type="group" version="2.0.0"> + <name>group.op.modes</name> + <x>228</x> + <y>10</y> + <width>190</width> + <height>340</height> + <style>3</style> + <widget type="rectangle" version="2.0.0"> + <name>group.op.modes.border</name> + <width>195</width> + <height>330</height> + <line_width>0</line_width> + <line_color> + <color name="GROUP-BORDER" red="150" green="155" blue="151"> + </color> + </line_color> + <background_color> + <color name="GROUP-BORDER" red="150" green="155" blue="151"> + </color> + </background_color> + </widget> + <widget type="rectangle" version="2.0.0"> + <name>group.op.modes.background</name> + <x>5</x> + <y>35</y> + <width>185</width> + <height>289</height> + <line_width>0</line_width> + <line_color> + <color name="PRIMARY-GROUP-BORDER" red="151" green="188" blue="202"> + </color> + </line_color> + <background_color> + <color name="GROUP-BACKGROUND" red="200" green="205" blue="201"> + </color> + </background_color> + </widget> + <widget type="label" version="2.0.0"> + <name>LB_OP_MODES</name> + <text>OP MODES</text> + <width>190</width> + <height>35</height> + <font> + <font name="Header 2" family="Source Sans Pro" style="BOLD_ITALIC" size="21.0"> + </font> + </font> + <foreground_color> + <color name="GRAY-TEXT" red="255" green="255" blue="255"> + </color> + </foreground_color> + <background_color> + <color name="GROUP-BACKGROUND" red="200" green="205" blue="201"> + </color> + </background_color> + <horizontal_alignment>1</horizontal_alignment> + <vertical_alignment>1</vertical_alignment> + </widget> + <widget type="led" version="2.0.0"> + <name>LED_Auto</name> + <pv_name>${SecSub}:${Dis}-${Dev}-${Index}:OpMode_Auto</pv_name> + <x>40</x> + <y>57</y> + <width>25</width> + <height>25</height> + <off_color> + <color name="Grid" red="169" green="169" blue="169"> + </color> + </off_color> + <tooltip>Operation mode</tooltip> + </widget> + <widget type="label" version="2.0.0"> + <name>LB_STAT_AUTO</name> + <text>AUTO</text> + <x>73</x> + <y>57</y> + <width>60</width> + <height>25</height> + <background_color> + <color name="BLUE-BACKGROUND" red="195" green="226" blue="225"> + </color> + </background_color> + <vertical_alignment>1</vertical_alignment> + </widget> + <widget type="led" version="2.0.0"> + <name>LED_Manual</name> + <pv_name>${SecSub}:${Dis}-${Dev}-${Index}:OpMode_Manual</pv_name> + <x>40</x> + <y>92</y> + <width>25</width> + <height>25</height> + <off_color> + <color name="Grid" red="169" green="169" blue="169"> + </color> + </off_color> + <tooltip>Operation mode</tooltip> + </widget> + <widget type="label" version="2.0.0"> + <name>LB_STAT_MANUAL</name> + <text>MANUAL</text> + <x>75</x> + <y>92</y> + <width>60</width> + <height>25</height> + <background_color> + <color name="BLUE-BACKGROUND" red="195" green="226" blue="225"> + </color> + </background_color> + <vertical_alignment>1</vertical_alignment> + </widget> + <widget type="label" version="2.0.0"> + <name>LB_MESSAGES</name> + <text>MESSAGES</text> + <x>5</x> + <y>160</y> + <width>185</width> + <font> + <font family="Source Sans Pro" style="BOLD_ITALIC" size="21.0"> + </font> + </font> + <foreground_color> + <color name="GRAY-TEXT" red="255" green="255" blue="255"> + </color> + </foreground_color> + <background_color> + <color name="GROUP-BORDER" red="150" green="155" blue="151"> + </color> + </background_color> + <transparent>false</transparent> + <horizontal_alignment>1</horizontal_alignment> + <vertical_alignment>1</vertical_alignment> + </widget> + </widget> + <widget type="rectangle" version="2.0.0"> + <name>buttons.bar</name> + <x>8</x> + <y>361</y> + <width>415</width> + <height>80</height> + <line_width>0</line_width> + <line_color> + <color name="GROUP-BORDER" red="150" green="155" blue="151"> + </color> + </line_color> + <background_color> + <color name="GROUP-BORDER" red="150" green="155" blue="151"> + </color> + </background_color> + </widget> + <widget type="action_button" version="3.0.0"> + <name>BTN_AUTO</name> + <actions> + <action type="write_pv"> + <pv_name>$(pv_name)</pv_name> + <value>1</value> + <description>Write PV</description> + </action> + </actions> + <pv_name>${SecSub}:${Dis}-${Dev}-${Index}:Cmd_Auto</pv_name> + <text>AUTO</text> + <x>12</x> + <y>402</y> + <width>200</width> + <height>33</height> + <tooltip>AUTO operation mode</tooltip> + </widget> + <widget type="action_button" version="3.0.0"> + <name>BTN_MANUAL</name> + <actions> + <action type="write_pv"> + <pv_name>$(pv_name)</pv_name> + <value>1</value> + <description>Write PV</description> + </action> + </actions> + <pv_name>${SecSub}:${Dis}-${Dev}-${Index}:Cmd_Manual</pv_name> + <text>MANUAL</text> + <x>217</x> + <y>403</y> + <width>200</width> + <height>33</height> + <tooltip>MANUAL operation mode</tooltip> + </widget> + <widget type="action_button" version="3.0.0"> + <name>BTN_MAN_ON</name> + <actions> + <action type="write_pv"> + <pv_name>$(pv_name)</pv_name> + <value>1</value> + <description>Write PV</description> + </action> + </actions> + <pv_name>${SecSub}:${Dis}-${Dev}-${Index}:Cmd_ManuOpen</pv_name> + <text>OPEN</text> + <x>217</x> + <y>367</y> + <width>99</width> + <height>33</height> + <rules> + <rule name="EnableRule" prop_id="enabled" out_exp="false"> + <exp bool_exp="(pv0 == 0)"> + <value>false</value> + </exp> + <exp bool_exp="(pv0 == 1)"> + <value>true</value> + </exp> + <pv_name>${SecSub}:${Dis}-${Dev}-${Index}:OpMode_Manual</pv_name> + </rule> + </rules> + <tooltip>Manual OPEN</tooltip> + </widget> + <widget type="action_button" version="3.0.0"> + <name>BTN_MAN_OFF</name> + <actions> + <action type="write_pv"> + <pv_name>$(pv_name)</pv_name> + <value>1</value> + <description>Write PV</description> + </action> + </actions> + <pv_name>${SecSub}:${Dis}-${Dev}-${Index}:Cmd_ManuClose</pv_name> + <text>CLOSE</text> + <x>318</x> + <y>367</y> + <width>99</width> + <height>33</height> + <rules> + <rule name="EnableRule" prop_id="enabled" out_exp="false"> + <exp bool_exp="(pv0 == 0) "> + <value>false</value> + </exp> + <exp bool_exp="(pv0 == 1) "> + <value>true</value> + </exp> + <pv_name>${SecSub}:${Dis}-${Dev}-${Index}:OpMode_Manual</pv_name> + </rule> + </rules> + <tooltip>Manual CLOSE</tooltip> + </widget> + </children> + </tab> + <tab> + <name>Trend</name> + <children> + <widget type="databrowser" version="2.0.0"> + <name>DataBrowser</name> + <file>HW_INTLCK_Faceplate_Trend.plt</file> + <width>438</width> + <height>441</height> + </widget> + </children> + </tab> + </tabs> + <x>10</x> + <y>60</y> + <width>440</width> + <height>490</height> + </widget> + <widget type="rectangle" version="2.0.0"> + <name>Header Bar</name> + <width>460</width> + <height>50</height> + <line_width>0</line_width> + <line_color> + <color red="0" green="0" blue="255" alpha="0"> + </color> + </line_color> + <background_color> + <color name="PRIMARY-HEADER-BACKGROUND" red="151" green="188" blue="202"> + </color> + </background_color> + </widget> + <widget type="label" version="2.0.0"> + <name>LB_HeaderPVName</name> + <text>${SecSub}:${Dis}-${Dev}-${Index}</text> + <x>20</x> + <width>440</width> + <height>50</height> + <font> + <font name="Header 1" family="Source Sans Pro" style="BOLD_ITALIC" size="36.0"> + </font> + </font> + <vertical_alignment>1</vertical_alignment> + </widget> +</display> diff --git a/NON-APPROVED/ICS_OPI_LIBRARY/DeviceTypes/DigitalMeasure/HW_INTLCK_Faceplate_Trend.plt b/NON-APPROVED/ICS_OPI_LIBRARY/DeviceTypes/DigitalMeasure/HW_INTLCK_Faceplate_Trend.plt new file mode 100644 index 00000000..994bc985 --- /dev/null +++ b/NON-APPROVED/ICS_OPI_LIBRARY/DeviceTypes/DigitalMeasure/HW_INTLCK_Faceplate_Trend.plt @@ -0,0 +1,110 @@ +<?xml version="1.0" encoding="UTF-8"?> +<databrowser> + <title></title> + <show_toolbar>true</show_toolbar> + <update_period>3.0</update_period> + <scroll_step>5</scroll_step> + <scroll>true</scroll> + <start>-10 minutes</start> + <end>now</end> + <archive_rescale>NONE</archive_rescale> + <foreground> + <red>229</red> + <green>229</green> + <blue>229</blue> + </foreground> + <background> + <red>77</red> + <green>77</green> + <blue>77</blue> + </background> + <title_font>System|16|1</title_font> + <label_font>System|11|1</label_font> + <scale_font>System|10|0</scale_font> + <legend_font>System|10|0</legend_font> + <axes> + <axis> + <visible>true</visible> + <name>Value Axis</name> + <use_axis_name>true</use_axis_name> + <use_trace_names>true</use_trace_names> + <right>false</right> + <color> + <red>255</red> + <green>165</green> + <blue>0</blue> + </color> + <min>0.0</min> + <max>25.0</max> + <grid>true</grid> + <autoscale>false</autoscale> + <log_scale>false</log_scale> + </axis> + <axis> + <visible>true</visible> + <name>Value 1</name> + <use_axis_name>false</use_axis_name> + <use_trace_names>true</use_trace_names> + <right>false</right> + <color> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + <min>0.0</min> + <max>10.0</max> + <grid>false</grid> + <autoscale>false</autoscale> + <log_scale>false</log_scale> + </axis> + </axes> + <annotations> + </annotations> + <pvlist> + <pv> + <display_name>Closed</display_name> + <visible>true</visible> + <name>${SecSub}:${Dis}-${Dev}-${Index}:Closed</name> + <axis>0</axis> + <color> + <red>0</red> + <green>255</green> + <blue>0</blue> + </color> + <trace_type>AREA</trace_type> + <linewidth>2</linewidth> + <line_style>SOLID</line_style> + <point_type>NONE</point_type> + <point_size>2</point_size> + <waveform_index>0</waveform_index> + <period>0.0</period> + <ring_size>5000</ring_size> + <request>OPTIMIZED</request> + <archive> + <name>pbraw://archiver-01.tn.esss.lu.se:17668/retrieval</name> + <url>pbraw://archiver-01.tn.esss.lu.se:17668/retrieval</url> + <key>1</key> + </archive> + </pv> + <pv> + <display_name>Opened</display_name> + <visible>true</visible> + <name>${SecSub}:${Dis}-${Dev}-${Index}:Opened</name> + <axis>1</axis> + <color> + <red>255</red> + <green>0</green> + <blue>0</blue> + </color> + <trace_type>AREA</trace_type> + <linewidth>2</linewidth> + <line_style>SOLID</line_style> + <point_type>NONE</point_type> + <point_size>2</point_size> + <waveform_index>0</waveform_index> + <period>0.0</period> + <ring_size>5000</ring_size> + <request>OPTIMIZED</request> + </pv> + </pvlist> +</databrowser> diff --git a/NON-APPROVED/TS2/ts2-cryomodule/interlocks.bob b/NON-APPROVED/TS2/ts2-cryomodule/interlocks.bob index c76317c9..6bd4ac0d 100644 --- a/NON-APPROVED/TS2/ts2-cryomodule/interlocks.bob +++ b/NON-APPROVED/TS2/ts2-cryomodule/interlocks.bob @@ -224,16 +224,6 @@ </font> </font> </widget> - <widget type="led" version="2.0.0"> - <name>MotorOK_led</name> - <pv_name>TS2-010:Cryo-Virt-MotOK:Opened</pv_name> - <x>560</x> - <y>228</y> - <off_color> - <color name="RED" red="252" green="13" blue="27"> - </color> - </off_color> - </widget> <widget type="label" version="2.0.0"> <name>13_label_2</name> <text>CryoModuleReady (TICP):</text> @@ -364,4 +354,19 @@ <width>64</width> <precision>2</precision> </widget> + <widget type="embedded" version="2.0.0"> + <name>Embedded Display</name> + <file>../../ICS_OPI_LIBRARY/DeviceTypes/DigitalMeasure/HW_INTLCK_BlockIcon_Compact.bob</file> + <macros> + <WIDDev>Virt</WIDDev> + <WIDDis>Cryo</WIDDis> + <WIDIndex>MotOK</WIDIndex> + <WIDSecSub>TS2-010</WIDSecSub> + </macros> + <x>560</x> + <y>218</y> + <width>50</width> + <height>32</height> + <resize>2</resize> + </widget> </display> -- GitLab