Skip to content
Permalink
master
Switch branches/tags

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?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 96 lines (90 sloc) 2.84 KB
<?xml version="1.0" encoding="UTF-8"?>
<display version="2.0.0">
<name>Mass Config</name>
<width>525</width>
<height>400</height>
<widget type="group" version="2.0.0">
<name>Group</name>
<x>30</x>
<y>30</y>
<width>250</width>
<height>130</height>
<style>2</style>
<widget type="label" version="2.0.0">
<name>Label_28</name>
<text>Enter Element:</text>
<x>9</x>
<y>9</y>
<vertical_alignment>1</vertical_alignment>
</widget>
<widget type="spinner" version="2.0.0">
<name>Spinner_2</name>
<pv_name>$(P):RGA200:Mass_MNO</pv_name>
<x>139</x>
<y>9</y>
</widget>
<widget type="label" version="2.0.0">
<name>Label_30</name>
<text>Channel Electron Multiplier:</text>
<x>9</x>
<y>69</y>
<width>180</width>
</widget>
<widget type="label" version="2.0.0">
<name>Label_31</name>
<text>Noise Floor Value:</text>
<x>9</x>
<y>39</y>
<width>120</width>
</widget>
<widget type="spinner" version="2.0.0">
<name>Spinner_3</name>
<x>139</x>
<y>39</y>
</widget>
<widget type="checkbox" version="2.0.0">
<name>Check Box_1</name>
<label></label>
<x>193</x>
<y>71</y>
<width>20</width>
<height>15</height>
</widget>
<widget type="action_button" version="3.0.0">
<name>Action Button_22</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]))
massconfig_nr = PVUtil.createPV("loc://massconfig_nr",10)
massconfig_nr = PVUtil.getLong(massconfig_nr)
# AMU = PVUtil.getLong(PVUtil.createPV("CRYVISIL::EDIT:AMU",50)) #befüllen#
# NF = PVUtil.getDouble(PVUtil.createPV("CRYVISIL::EDIT:NF",50)) #befüllen#
# CEM = PVUtil.getDouble(PVUtil.createPV("CRYVISIL::EDIT:CEM",50)) #befüllen#
# massprofile = PVUtil.getString(PVUtil.createPV("CRYVISIL::",10)).split(";") #befüllen#
concat = "%f,%f,%f (AMU, NF, CEM)
if massconfig_nr < len(massprofile):
massprofile[massconfig_nr] = concat
else:
massprofile.append(concat)
output = ";".join(massprofile)
print output
# PVUtil.writePV("CRYVISIL::", output, 50) #befüllen#
widget.setPropertyValue('background_color', WidgetColor(173, 255, 0, 255))]]></text>
</script>
<description>Save</description>
</action>
</actions>
<text>Save</text>
<x>9</x>
<y>99</y>
<width>230</width>
<height>20</height>
<tooltip>$(actions)</tooltip>
</widget>
</widget>
</display>