Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
cryvisil/rampconfig.bob
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
347 lines (341 sloc)
10.8 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<display version="2.0.0"> | |
<name>ramp config</name> | |
<macros> | |
<P>CRYVISIL</P> | |
<R>TC09</R> | |
</macros> | |
<width>400</width> | |
<height>500</height> | |
<widget type="group" version="2.0.0"> | |
<name>Group_2</name> | |
<x>10</x> | |
<y>10</y> | |
<width>310</width> | |
<height>380</height> | |
<style>2</style> | |
<widget type="group" version="2.0.0"> | |
<name>Group</name> | |
<x>29</x> | |
<y>189</y> | |
<width>253</width> | |
<height>130</height> | |
<style>2</style> | |
<widget type="label" version="2.0.0"> | |
<name>Label</name> | |
<text>Proportional</text> | |
<x>12</x> | |
<y>52</y> | |
</widget> | |
<widget type="label" version="2.0.0"> | |
<name>Label_7</name> | |
<text>Loop Parameter</text> | |
<x>12</x> | |
<y>22</y> | |
<width>130</width> | |
<foreground_color> | |
<color red="0" green="0" blue="255"> | |
</color> | |
</foreground_color> | |
</widget> | |
<widget type="label" version="2.0.0"> | |
<name>Label_5</name> | |
<text>Integral</text> | |
<x>12</x> | |
<y>72</y> | |
</widget> | |
<widget type="label" version="2.0.0"> | |
<name>Label_6</name> | |
<text>Derivative</text> | |
<x>12</x> | |
<y>92</y> | |
</widget> | |
<widget type="spinner" version="2.0.0"> | |
<name>Text Entry</name> | |
<pv_name>$(P):$(R):EDIT:LOOP-PROPORTIONAL</pv_name> | |
<x>142</x> | |
<y>52</y> | |
<precision>2</precision> | |
<show_units>true</show_units> | |
<background_color> | |
<color red="51" green="194" blue="255"> | |
</color> | |
</background_color> | |
<buttons_on_left>true</buttons_on_left> | |
<minimum>-1.0E10</minimum> | |
<maximum>1.0E10</maximum> | |
<limits_from_pv>false</limits_from_pv> | |
<increment>0.1</increment> | |
</widget> | |
<widget type="spinner" version="2.0.0"> | |
<name>Text Entry_4</name> | |
<pv_name>$(P):$(R):EDIT:LOOP-INTEGRAL</pv_name> | |
<x>142</x> | |
<y>72</y> | |
<precision>2</precision> | |
<show_units>true</show_units> | |
<background_color> | |
<color red="51" green="194" blue="255"> | |
</color> | |
</background_color> | |
<buttons_on_left>true</buttons_on_left> | |
<minimum>-1.0E10</minimum> | |
<maximum>1.0E10</maximum> | |
<limits_from_pv>false</limits_from_pv> | |
<increment>0.1</increment> | |
</widget> | |
<widget type="spinner" version="2.0.0"> | |
<name>Text Entry_5</name> | |
<pv_name>$(P):$(R):EDIT:LOOP-DIFFERENTIAL</pv_name> | |
<x>142</x> | |
<y>92</y> | |
<precision>2</precision> | |
<show_units>true</show_units> | |
<background_color> | |
<color red="51" green="194" blue="255"> | |
</color> | |
</background_color> | |
<buttons_on_left>true</buttons_on_left> | |
<minimum>-1.0E10</minimum> | |
<maximum>1.0E10</maximum> | |
<limits_from_pv>false</limits_from_pv> | |
<increment>0.1</increment> | |
</widget> | |
</widget> | |
<widget type="group" version="2.0.0"> | |
<name>Group_1</name> | |
<x>29</x> | |
<y>43</y> | |
<width>253</width> | |
<height>140</height> | |
<style>2</style> | |
<widget type="label" version="2.0.0"> | |
<name>Label_1</name> | |
<text>Target =</text> | |
<x>12</x> | |
<y>42</y> | |
<rules> | |
<rule name="desc" prop_id="text" out_exp="false"> | |
<exp bool_exp="pv0 == 0"> | |
<value>P Offset [%] =</value> | |
</exp> | |
<exp bool_exp="pv0 == 1 || pv0 == 2"> | |
<value>P max [%] =</value> | |
</exp> | |
<exp bool_exp="pv0 == 3 || pv0 == 5 || pv0 == 6 || pv0 == 7"> | |
<value>Rate [K/s] =</value> | |
</exp> | |
<exp bool_exp="pv0 == 4 || pv0 == 8"> | |
<value>T set [K] =</value> | |
</exp> | |
<pv_name>$(P):$(R):EDIT:RAMP-TYPE</pv_name> | |
</rule> | |
</rules> | |
</widget> | |
<widget type="label" version="2.0.0"> | |
<name>Label_2</name> | |
<text>Stop =</text> | |
<x>12</x> | |
<y>72</y> | |
<rules> | |
<rule name="text" prop_id="text" out_exp="false"> | |
<exp bool_exp="pv0 == 0"> | |
<value>Time End [s] =</value> | |
</exp> | |
<exp bool_exp="pv0 == 1 || pv0 == 2 || pv0 == 3 || pv0 == 5 || pv0 == 6 || pv0 == 7 "> | |
<value>Temp End [K] =</value> | |
</exp> | |
<exp bool_exp="pv0 == 4 || pv0 == 8"> | |
<value>Time [s] =</value> | |
</exp> | |
<pv_name>$(P):$(R):EDIT:RAMP-TYPE</pv_name> | |
</rule> | |
</rules> | |
</widget> | |
<widget type="label" version="2.0.0"> | |
<name>Label_4</name> | |
<text>Rise Time [s] =</text> | |
<x>12</x> | |
<y>102</y> | |
<width>147</width> | |
</widget> | |
<widget type="label" version="2.0.0"> | |
<name>Label_8</name> | |
<text>Type</text> | |
<x>12</x> | |
<y>9</y> | |
<foreground_color> | |
<color red="0" green="0" blue="255"> | |
</color> | |
</foreground_color> | |
</widget> | |
<widget type="combo" version="2.0.0"> | |
<name>Combo Box</name> | |
<pv_name>$(P):$(R):EDIT:RAMP-TYPE</pv_name> | |
<x>142</x> | |
<y>9</y> | |
<height>20</height> | |
<items> | |
<item>'item' = ''item' = 'Item 0''</item> | |
<item>'item' = ''item' = 'Item 1''</item> | |
<item>'item' = ''item' = 'Item 2''</item> | |
<item>'item' = ''item' = 'Item 3''</item> | |
</items> | |
</widget> | |
<widget type="spinner" version="2.0.0"> | |
<name>Text Entry_2</name> | |
<pv_name>$(P):$(R):EDIT:STOP</pv_name> | |
<x>142</x> | |
<y>72</y> | |
<precision>2</precision> | |
<show_units>true</show_units> | |
<background_color> | |
<color red="51" green="194" blue="255"> | |
</color> | |
</background_color> | |
<buttons_on_left>true</buttons_on_left> | |
<minimum>-1.0E10</minimum> | |
<maximum>1.0E10</maximum> | |
<limits_from_pv>false</limits_from_pv> | |
<increment>0.1</increment> | |
</widget> | |
<widget type="spinner" version="2.0.0"> | |
<name>Text Entry_3</name> | |
<pv_name>$(P):$(R):EDIT:TIME-CONST</pv_name> | |
<x>142</x> | |
<y>102</y> | |
<precision>2</precision> | |
<show_units>true</show_units> | |
<background_color> | |
<color red="51" green="194" blue="255"> | |
</color> | |
</background_color> | |
<buttons_on_left>true</buttons_on_left> | |
<border_alarm_sensitive>false</border_alarm_sensitive> | |
<minimum>-1.0E10</minimum> | |
<maximum>1.0E10</maximum> | |
<limits_from_pv>false</limits_from_pv> | |
<increment>0.1</increment> | |
</widget> | |
<widget type="spinner" version="2.0.0"> | |
<name>Text Entry_1</name> | |
<pv_name>$(P):$(R):EDIT:TARGET</pv_name> | |
<x>142</x> | |
<y>39</y> | |
<precision>2</precision> | |
<show_units>true</show_units> | |
<background_color> | |
<color red="51" green="194" blue="255"> | |
</color> | |
</background_color> | |
<buttons_on_left>true</buttons_on_left> | |
<minimum>-1.0E10</minimum> | |
<maximum>1.0E10</maximum> | |
<limits_from_pv>false</limits_from_pv> | |
<increment>0.1</increment> | |
</widget> | |
</widget> | |
<widget type="action_button" version="3.0.0"> | |
<name>Action Button_1</name> | |
<actions> | |
<action type="execute"> | |
<script file="EmbeddedPy"> | |
<text><![CDATA[# Embedded python script | |
from org.csstudio.display.builder.runtime.script import PVUtil, ScriptUtil | |
from org.csstudio.display.builder.model.properties import WidgetColor | |
print 'Save data to profile' | |
# widget.setPropertyValue('text', PVUtil.getString(pvs[0])) | |
ramp_nr = PVUtil.createPV("loc://ramp_nr",10) | |
ramp_nr = PVUtil.getLong(ramp_nr) | |
ramp_type = PVUtil.getLong(PVUtil.createPV("CRYVISIL:TC09:EDIT:RAMP-TYPE",50)) | |
target = PVUtil.getDouble(PVUtil.createPV("CRYVISIL:TC09:EDIT:TARGET",50)) | |
stop = PVUtil.getDouble(PVUtil.createPV("CRYVISIL:TC09:EDIT:STOP",50)) | |
loop_prop = PVUtil.getDouble(PVUtil.createPV("CRYVISIL:TC09:EDIT:LOOP-PROPORTIONAL",50)) | |
loop_int = PVUtil.getDouble(PVUtil.createPV("CRYVISIL:TC09:EDIT:LOOP-INTEGRAL",50)) | |
loop_diff = PVUtil.getDouble(PVUtil.createPV("CRYVISIL:TC09:EDIT:LOOP-DIFFERENTIAL",50)) | |
time_const = PVUtil.getLong(PVUtil.createPV("CRYVISIL:TC09:EDIT:TIME-CONST",50)) | |
#samples = PVUtil.getLong(PVUtil.createPV("CRYVISIL:TC09:EDIT:SAMPLES",50)) | |
samples = 0 | |
profile = PVUtil.getString(PVUtil.createPV("CRYVISIL:TC09:PROFILES",10)).split(";") | |
concat = "%d,%f,%f,%f,%f,%f,%d,%d,0,0,0" % (ramp_type, target, stop, loop_prop, loop_int, loop_diff, time_const, samples) | |
if ramp_nr < len(profile): | |
profile[ramp_nr] = concat | |
else: | |
profile.append(concat) | |
output = ";".join(profile) | |
print output | |
PVUtil.writePV("CRYVISIL:TC09:PROFILES", output, 50) | |
widget.setPropertyValue('background_color', WidgetColor(0, 255, 0, 255))]]></text> | |
</script> | |
<description>save data to profile</description> | |
</action> | |
</actions> | |
<text>SAVE!</text> | |
<x>42</x> | |
<y>329</y> | |
<width>230</width> | |
<tooltip>$(actions)</tooltip> | |
</widget> | |
<widget type="label" version="2.0.0"> | |
<name>Label_9</name> | |
<text>Ramp Parameter</text> | |
<x>29</x> | |
<y>9</y> | |
<width>240</width> | |
<height>40</height> | |
<font> | |
<font family="Liberation Sans" style="REGULAR" size="20.0"> | |
</font> | |
</font> | |
</widget> | |
<widget type="textupdate" version="2.0.0"> | |
<name>Text Update</name> | |
<pv_name>loc://ramp_nr<VLong></pv_name> | |
<x>199</x> | |
<y>9</y> | |
<width>83</width> | |
<height>25</height> | |
<font> | |
<font family="Liberation Sans" style="BOLD" size="20.0"> | |
</font> | |
</font> | |
<foreground_color> | |
<color name="Background" red="255" green="255" blue="255"> | |
</color> | |
</foreground_color> | |
<background_color> | |
<color red="0" green="149" blue="255"> | |
</color> | |
</background_color> | |
<format>1</format> | |
<precision>0</precision> | |
<horizontal_alignment>1</horizontal_alignment> | |
<vertical_alignment>1</vertical_alignment> | |
</widget> | |
</widget> | |
<widget type="multi_state_led" version="2.0.0"> | |
<name>LED (Multi State)_1</name> | |
<x>970</x> | |
<y>320</y> | |
<width>1</width> | |
<height>1</height> | |
<states> | |
<state> | |
<value>0</value> | |
<label>State 1</label> | |
<color> | |
<color name="Off" red="60" green="100" blue="60"> | |
</color> | |
</color> | |
</state> | |
<state> | |
<value>1</value> | |
<label>State 2</label> | |
<color> | |
<color name="On" red="0" green="255" blue="0"> | |
</color> | |
</color> | |
</state> | |
</states> | |
</widget> | |
</display> |