Skip to content
Snippets Groups Projects
Commit ab198323 authored by Krisztián Löki's avatar Krisztián Löki
Browse files

Added VEPI faceplate

parent bd224289
No related branches found
No related tags found
No related merge requests found
from org.csstudio.display.builder.runtime.script import ScriptUtil
from org.csstudio.display.builder.runtime.pv import PVFactory
path = "../../vpi/Faceplate/vac_digitelqpce_vpi.bob"
macros = widget.getEffectiveMacros()
macros.expandValues(macros)
devicename = macros.getValue("DEVICENAME")
ch = macros.getValue("CH")
try:
pumpPV = PVFactory.getPV("{}:Ch{}_DevNameR".format(devicename, ch))
pump = pumpPV.read()
PVFactory.releasePV(pumpPV)
pump = pump.value
dmacros = dict()
for k in macros.getNames():
dmacros[k] = macros.getValue(k)
dmacros["CONTROLLER"] = devicename
dmacros["DEVICENAME"] = pump
ScriptUtil.openDisplay(widget, path, "STANDALONE", dmacros)
except Exception as e:
ScriptUtil.getLogger().severe(str(e))
<?xml version="1.0" encoding="UTF-8"?>
<display version="2.0.0">
<name>$(DEVICENAME)</name>
<width>520</width>
<height>460</height>
<widget type="group" version="2.0.0">
<name>TPG-500</name>
<width>520</width>
<height>460</height>
<style>2</style>
<foreground_color>
<color name="GROUP-BORDER" red="150" green="155" blue="151">
</color>
</foreground_color>
<background_color>
<color name="GROUP-BACKGROUND" red="200" green="205" blue="201">
</color>
</background_color>
<widget type="label" version="2.0.0">
<name>Configuration</name>
<text>$(DEVICENAME)</text>
<width>520</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-BORDER" red="150" green="155" blue="151">
</color>
</background_color>
<transparent>false</transparent>
<vertical_alignment>1</vertical_alignment>
</widget>
<widget type="textupdate" version="2.0.0">
<name>CommsStatR</name>
<pv_name>$(DEVICENAME):CommsStatR</pv_name>
<x>360</x>
<y>5</y>
<width>150</width>
<height>25</height>
<font>
<font name="SMALL-SERIF-BOLD" family="Source Serif Pro" style="BOLD" size="14.0">
</font>
</font>
<foreground_color>
<color name="WHITE" red="255" green="255" blue="255">
</color>
</foreground_color>
<transparent>true</transparent>
<horizontal_alignment>2</horizontal_alignment>
<vertical_alignment>1</vertical_alignment>
</widget>
<widget type="group" version="2.0.0">
<name>System Information</name>
<x>10</x>
<y>50</y>
<width>500</width>
<height>270</height>
<style>2</style>
<foreground_color>
<color name="BLUE-GROUP-BORDER" red="138" green="167" blue="167">
</color>
</foreground_color>
<background_color>
<color name="BLUE-GROUP-BACKGROUND" red="179" green="209" blue="209">
</color>
</background_color>
<widget type="label" version="2.0.0">
<name>System Information</name>
<text>System Information</text>
<width>500</width>
<height>30</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="BLUE-GROUP-BORDER" red="138" green="167" blue="167">
</color>
</background_color>
<transparent>false</transparent>
<horizontal_alignment>1</horizontal_alignment>
<vertical_alignment>1</vertical_alignment>
</widget>
<widget type="label" version="2.0.0">
<name>Controllert Type</name>
<text>Controller Type:</text>
<x>10</x>
<y>40</y>
<width>150</width>
<height>25</height>
<horizontal_alignment>2</horizontal_alignment>
<vertical_alignment>1</vertical_alignment>
</widget>
<widget type="textupdate" version="2.0.0">
<name>CtrlTypeR</name>
<pv_name>$(DEVICENAME):CtrlTypeR</pv_name>
<x>170</x>
<y>40</y>
<height>25</height>
<format>6</format>
<show_units>false</show_units>
<horizontal_alignment>1</horizontal_alignment>
<vertical_alignment>1</vertical_alignment>
</widget>
<widget type="label" version="2.0.0">
<name>Firmware Version</name>
<text>Firmware Version:</text>
<x>10</x>
<y>75</y>
<width>150</width>
<height>25</height>
<horizontal_alignment>2</horizontal_alignment>
<vertical_alignment>1</vertical_alignment>
</widget>
<widget type="textupdate" version="2.0.0">
<name>FWVersionR</name>
<pv_name>$(DEVICENAME):FWVersionR</pv_name>
<x>170</x>
<y>75</y>
<height>25</height>
<format>6</format>
<show_units>false</show_units>
<horizontal_alignment>1</horizontal_alignment>
<vertical_alignment>1</vertical_alignment>
</widget>
<widget type="group" version="2.0.0">
<name>Channel 1</name>
<macros>
<CH>1</CH>
</macros>
<x>20</x>
<y>120</y>
<width>200</width>
<height>60</height>
<style>3</style>
<transparent>true</transparent>
<widget type="textupdate" version="2.0.0">
<name>Ch${CH}_NameR</name>
<pv_name>$(DEVICENAME):Ch${CH}_NameR</pv_name>
<width>200</width>
<height>25</height>
<font>
<font name="Header 3" family="Source Sans Pro" style="BOLD_ITALIC" size="18.0">
</font>
</font>
<foreground_color>
<color name="WHITE" red="255" green="255" blue="255">
</color>
</foreground_color>
<background_color>
<color name="BLUE-GROUP-BORDER" red="138" green="167" blue="167">
</color>
</background_color>
<horizontal_alignment>1</horizontal_alignment>
<vertical_alignment>1</vertical_alignment>
</widget>
<widget type="action_button" version="3.0.0">
<name>Ch${CH}_DevNameR</name>
<actions>
<action type="execute">
<script file="open_vpi_screen.py">
</script>
<description>Execute Script</description>
</action>
</actions>
<text>No Pump</text>
<y>30</y>
<width>200</width>
<rules>
<rule name="Text" prop_id="text" out_exp="true">
<exp bool_exp="pvStr0">
<expression>pvStr0</expression>
</exp>
<pv_name>$(DEVICENAME):Ch${CH}_DevNameR</pv_name>
</rule>
<rule name="Enabled" prop_id="enabled" out_exp="false">
<exp bool_exp="pvStr0">
<value>true</value>
</exp>
<pv_name>$(DEVICENAME):Ch${CH}_DevNameR</pv_name>
</rule>
<rule name="Background Color" prop_id="background_color" out_exp="false">
<exp bool_exp="pvStr0 and pvInt1 == 0">
<value>
<color name="RED-BACKGROUND" red="225" green="192" blue="188">
</color>
</value>
</exp>
<pv_name>$(DEVICENAME):Ch${CH}_DevNameR</pv_name>
<pv_name>$(DEVICENAME):Ch${CH}_ValidR</pv_name>
</rule>
</rules>
<tooltip>$(text)</tooltip>
<enabled>false</enabled>
</widget>
</widget>
<widget type="group" version="2.0.0">
<name>Channel 2</name>
<macros>
<CH>2</CH>
</macros>
<x>270</x>
<y>120</y>
<width>200</width>
<height>60</height>
<style>3</style>
<transparent>true</transparent>
<widget type="textupdate" version="2.0.0">
<name>Ch${CH}_NameR</name>
<pv_name>$(DEVICENAME):Ch${CH}_NameR</pv_name>
<width>200</width>
<height>25</height>
<font>
<font name="Header 3" family="Source Sans Pro" style="BOLD_ITALIC" size="18.0">
</font>
</font>
<foreground_color>
<color name="WHITE" red="255" green="255" blue="255">
</color>
</foreground_color>
<background_color>
<color name="BLUE-GROUP-BORDER" red="138" green="167" blue="167">
</color>
</background_color>
<horizontal_alignment>1</horizontal_alignment>
<vertical_alignment>1</vertical_alignment>
</widget>
<widget type="action_button" version="3.0.0">
<name>Ch${CH}_DevNameR</name>
<actions>
<action type="execute">
<script file="open_vpi_screen.py">
</script>
<description>Execute Script</description>
</action>
</actions>
<text>No Pump</text>
<y>30</y>
<width>200</width>
<rules>
<rule name="Text" prop_id="text" out_exp="true">
<exp bool_exp="pvStr0">
<expression>pvStr0</expression>
</exp>
<pv_name>$(DEVICENAME):Ch${CH}_DevNameR</pv_name>
</rule>
<rule name="Enabled" prop_id="enabled" out_exp="false">
<exp bool_exp="pvStr0">
<value>true</value>
</exp>
<pv_name>$(DEVICENAME):Ch${CH}_DevNameR</pv_name>
</rule>
<rule name="Background Color" prop_id="background_color" out_exp="false">
<exp bool_exp="pvStr0 and pvInt1 == 0">
<value>
<color name="RED-BACKGROUND" red="225" green="192" blue="188">
</color>
</value>
</exp>
<pv_name>$(DEVICENAME):Ch${CH}_DevNameR</pv_name>
<pv_name>$(DEVICENAME):Ch${CH}_ValidR</pv_name>
</rule>
</rules>
<tooltip>$(text)</tooltip>
<enabled>false</enabled>
</widget>
</widget>
<widget type="group" version="2.0.0">
<name>Channel 3</name>
<macros>
<CH>3</CH>
</macros>
<x>20</x>
<y>200</y>
<width>200</width>
<height>60</height>
<style>3</style>
<transparent>true</transparent>
<widget type="textupdate" version="2.0.0">
<name>Ch${CH}_NameR</name>
<pv_name>$(DEVICENAME):Ch${CH}_NameR</pv_name>
<width>200</width>
<height>25</height>
<font>
<font name="Header 3" family="Source Sans Pro" style="BOLD_ITALIC" size="18.0">
</font>
</font>
<foreground_color>
<color name="WHITE" red="255" green="255" blue="255">
</color>
</foreground_color>
<background_color>
<color name="BLUE-GROUP-BORDER" red="138" green="167" blue="167">
</color>
</background_color>
<horizontal_alignment>1</horizontal_alignment>
<vertical_alignment>1</vertical_alignment>
</widget>
<widget type="action_button" version="3.0.0">
<name>Ch${CH}_DevNameR</name>
<actions>
<action type="execute">
<script file="open_vpi_screen.py">
</script>
<description>Execute Script</description>
</action>
</actions>
<text>No Pump</text>
<y>30</y>
<width>200</width>
<rules>
<rule name="Text" prop_id="text" out_exp="true">
<exp bool_exp="pvStr0">
<expression>pvStr0</expression>
</exp>
<pv_name>$(DEVICENAME):Ch${CH}_DevNameR</pv_name>
</rule>
<rule name="Enabled" prop_id="enabled" out_exp="false">
<exp bool_exp="pvStr0">
<value>true</value>
</exp>
<pv_name>$(DEVICENAME):Ch${CH}_DevNameR</pv_name>
</rule>
<rule name="Background Color" prop_id="background_color" out_exp="false">
<exp bool_exp="pvStr0 and pvInt1 == 0">
<value>
<color name="RED-BACKGROUND" red="225" green="192" blue="188">
</color>
</value>
</exp>
<pv_name>$(DEVICENAME):Ch${CH}_DevNameR</pv_name>
<pv_name>$(DEVICENAME):Ch${CH}_ValidR</pv_name>
</rule>
</rules>
<tooltip>$(text)</tooltip>
<enabled>false</enabled>
</widget>
</widget>
<widget type="group" version="2.0.0">
<name>Channel 4</name>
<macros>
<CH>4</CH>
</macros>
<x>270</x>
<y>200</y>
<width>200</width>
<height>60</height>
<style>3</style>
<transparent>true</transparent>
<widget type="textupdate" version="2.0.0">
<name>Ch${CH}_NameR</name>
<pv_name>$(DEVICENAME):Ch${CH}_NameR</pv_name>
<width>200</width>
<height>25</height>
<font>
<font name="Header 3" family="Source Sans Pro" style="BOLD_ITALIC" size="18.0">
</font>
</font>
<foreground_color>
<color name="WHITE" red="255" green="255" blue="255">
</color>
</foreground_color>
<background_color>
<color name="BLUE-GROUP-BORDER" red="138" green="167" blue="167">
</color>
</background_color>
<horizontal_alignment>1</horizontal_alignment>
<vertical_alignment>1</vertical_alignment>
</widget>
<widget type="action_button" version="3.0.0">
<name>Ch${CH}_DevNameR</name>
<actions>
<action type="execute">
<script file="open_vpi_screen.py">
</script>
<description>Execute Script</description>
</action>
</actions>
<text>No Pump</text>
<y>30</y>
<width>200</width>
<rules>
<rule name="Text" prop_id="text" out_exp="true">
<exp bool_exp="pvStr0">
<expression>pvStr0</expression>
</exp>
<pv_name>$(DEVICENAME):Ch${CH}_DevNameR</pv_name>
</rule>
<rule name="Enabled" prop_id="enabled" out_exp="false">
<exp bool_exp="pvStr0">
<value>true</value>
</exp>
<pv_name>$(DEVICENAME):Ch${CH}_DevNameR</pv_name>
</rule>
<rule name="Background Color" prop_id="background_color" out_exp="false">
<exp bool_exp="pvStr0 and pvInt1 == 0">
<value>
<color name="RED-BACKGROUND" red="225" green="192" blue="188">
</color>
</value>
</exp>
<pv_name>$(DEVICENAME):Ch${CH}_DevNameR</pv_name>
<pv_name>$(DEVICENAME):Ch${CH}_ValidR</pv_name>
</rule>
</rules>
<tooltip>$(text)</tooltip>
<enabled>false</enabled>
</widget>
</widget>
</widget>
<widget type="group" version="2.0.0">
<name>System Settings</name>
<x>10</x>
<y>340</y>
<width>500</width>
<height>110</height>
<style>2</style>
<foreground_color>
<color name="BLUE-GROUP-BORDER" red="138" green="167" blue="167">
</color>
</foreground_color>
<background_color>
<color name="BLUE-GROUP-BACKGROUND" red="179" green="209" blue="209">
</color>
</background_color>
<widget type="label" version="2.0.0">
<name>System Settings</name>
<text>System Settings</text>
<width>500</width>
<height>30</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="BLUE-GROUP-BORDER" red="138" green="167" blue="167">
</color>
</background_color>
<transparent>false</transparent>
<horizontal_alignment>1</horizontal_alignment>
<vertical_alignment>1</vertical_alignment>
</widget>
<widget type="label" version="2.0.0">
<name>TFTP IP</name>
<text>TFTP IP:</text>
<x>10</x>
<y>40</y>
<height>60</height>
<horizontal_alignment>2</horizontal_alignment>
<vertical_alignment>1</vertical_alignment>
</widget>
<widget type="group" version="2.0.0">
<name>TFTPS</name>
<x>120</x>
<y>40</y>
<width>230</width>
<height>25</height>
<style>3</style>
<transparent>true</transparent>
<widget type="textentry" version="3.0.0">
<name>TFTPIP_AS</name>
<pv_name>$(DEVICENAME):TFTPIP_AS</pv_name>
<width>50</width>
<height>25</height>
</widget>
<widget type="label" version="2.0.0">
<name>IPA-B</name>
<text>.</text>
<x>50</x>
<width>10</width>
<height>25</height>
<horizontal_alignment>1</horizontal_alignment>
<vertical_alignment>1</vertical_alignment>
</widget>
<widget type="textentry" version="3.0.0">
<name>TFTPIP_BS</name>
<pv_name>$(DEVICENAME):TFTPIP_BS</pv_name>
<x>60</x>
<width>50</width>
<height>25</height>
</widget>
<widget type="label" version="2.0.0">
<name>IPB-C</name>
<text>.</text>
<x>110</x>
<width>10</width>
<height>25</height>
<horizontal_alignment>1</horizontal_alignment>
<vertical_alignment>1</vertical_alignment>
</widget>
<widget type="textentry" version="3.0.0">
<name>TFTPIP_CS</name>
<pv_name>$(DEVICENAME):TFTPIP_CS</pv_name>
<x>120</x>
<width>50</width>
<height>25</height>
</widget>
<widget type="label" version="2.0.0">
<name>IPC-D</name>
<text>.</text>
<x>170</x>
<width>10</width>
<height>25</height>
<horizontal_alignment>1</horizontal_alignment>
<vertical_alignment>1</vertical_alignment>
</widget>
<widget type="textentry" version="3.0.0">
<name>TFTPIP_DS</name>
<pv_name>$(DEVICENAME):TFTPIP_DS</pv_name>
<x>180</x>
<width>50</width>
<height>25</height>
</widget>
</widget>
<widget type="action_button" version="3.0.0">
<name>TFTPIPCommitS</name>
<actions>
<action type="write_pv">
<pv_name>$(pv_name)</pv_name>
<value>1</value>
<description>Commit</description>
</action>
</actions>
<pv_name>$(DEVICENAME):TFTPIPCommitS</pv_name>
<x>368</x>
<y>40</y>
<height>25</height>
<tooltip>$(actions)</tooltip>
</widget>
<widget type="group" version="2.0.0">
<name>TFTP-RB</name>
<x>120</x>
<y>75</y>
<width>230</width>
<height>25</height>
<style>3</style>
<transparent>true</transparent>
<widget type="textupdate" version="2.0.0">
<name>TFTPIP_A-RB</name>
<pv_name>$(DEVICENAME):TFTPIP_A-RB</pv_name>
<width>50</width>
<height>25</height>
<horizontal_alignment>2</horizontal_alignment>
<vertical_alignment>1</vertical_alignment>
</widget>
<widget type="label" version="2.0.0">
<name>IPA-B</name>
<text>.</text>
<x>50</x>
<width>10</width>
<height>25</height>
<horizontal_alignment>1</horizontal_alignment>
<vertical_alignment>1</vertical_alignment>
</widget>
<widget type="textupdate" version="2.0.0">
<name>TFTPIP_B-RB</name>
<pv_name>$(DEVICENAME):TFTPIP_B-RB</pv_name>
<x>60</x>
<width>50</width>
<height>25</height>
<horizontal_alignment>2</horizontal_alignment>
<vertical_alignment>1</vertical_alignment>
</widget>
<widget type="label" version="2.0.0">
<name>IPB-C</name>
<text>.</text>
<x>110</x>
<width>10</width>
<height>25</height>
<horizontal_alignment>1</horizontal_alignment>
<vertical_alignment>1</vertical_alignment>
</widget>
<widget type="textupdate" version="2.0.0">
<name>TFTPIP_C-RB</name>
<pv_name>$(DEVICENAME):TFTPIP_C-RB</pv_name>
<x>120</x>
<width>50</width>
<height>25</height>
<horizontal_alignment>2</horizontal_alignment>
<vertical_alignment>1</vertical_alignment>
</widget>
<widget type="label" version="2.0.0">
<name>IPC-D</name>
<text>.</text>
<x>170</x>
<width>10</width>
<height>25</height>
<horizontal_alignment>1</horizontal_alignment>
<vertical_alignment>1</vertical_alignment>
</widget>
<widget type="textupdate" version="2.0.0">
<name>TFTPIP_D-RB</name>
<pv_name>$(DEVICENAME):TFTPIP_D-RB</pv_name>
<x>180</x>
<width>50</width>
<height>25</height>
<horizontal_alignment>2</horizontal_alignment>
<vertical_alignment>1</vertical_alignment>
</widget>
</widget>
</widget>
</widget>
</display>
...@@ -99,11 +99,11 @@ ...@@ -99,11 +99,11 @@
<name>Controller Detailed</name> <name>Controller Detailed</name>
<actions> <actions>
<action type="open_display"> <action type="open_display">
<file>../vepi/Faceplate/vac_ctrl_digitelqpce_controller.bob</file> <file>../../vepi/Faceplate/vac_ctrl_digitelqpce_controller.bob</file>
<macros> <macros>
<DEVICENAME>$(CONTROLLER)</DEVICENAME> <DEVICENAME>$(CONTROLLER)</DEVICENAME>
</macros> </macros>
<target>standalone</target> <target>window</target>
<description>Open Controller Screen</description> <description>Open Controller Screen</description>
</action> </action>
</actions> </actions>
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
<name>$(DEV)-$(IDX)</name> <name>$(DEV)-$(IDX)</name>
<macros> <macros>
<DEV>VEPI</DEV> <DEV>VEPI</DEV>
<FACEPLATE_PATH>$(DIAG_WIDGET_ROOT)/vepi/Faceplate/vac_ctrl_digitalqpce.bob</FACEPLATE_PATH> <FACEPLATE_PATH>$(DIAG_WIDGET_ROOT)/vepi/Faceplate/vac_ctrl_digitelqpce_controller.bob</FACEPLATE_PATH>
<IDX>10001</IDX> <IDX>10001</IDX>
</macros> </macros>
<file>$(DIAG_WIDGET_ROOT)/diagnostics/vac_ctrl-veg-vept.bob</file> <file>$(DIAG_WIDGET_ROOT)/diagnostics/vac_ctrl-veg-vept.bob</file>
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
<name>$(DEV)-$(IDX)</name> <name>$(DEV)-$(IDX)</name>
<macros> <macros>
<DEV>VEPI</DEV> <DEV>VEPI</DEV>
<FACEPLATE_PATH>$(DIAG_WIDGET_ROOT)/vepi/Faceplate/vac_ctrl_digitalqpce.bob</FACEPLATE_PATH> <FACEPLATE_PATH>$(DIAG_WIDGET_ROOT)/vepi/Faceplate/vac_ctrl_digitelqpce_controller.bob</FACEPLATE_PATH>
<IDX>20001</IDX> <IDX>20001</IDX>
</macros> </macros>
<file>$(DIAG_WIDGET_ROOT)/diagnostics/vac_ctrl-veg-vept.bob</file> <file>$(DIAG_WIDGET_ROOT)/diagnostics/vac_ctrl-veg-vept.bob</file>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment