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/spiraltest.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
298 lines (272 sloc)
7.66 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>test</name> | |
<width>1000</width> | |
<height>1000</height> | |
<widget type="textentry" version="3.0.0"> | |
<name>Text Entry</name> | |
<pv_name>loc://arrayx</pv_name> | |
<x>260</x> | |
<y>70</y> | |
<width>170</width> | |
</widget> | |
<widget type="textentry" version="3.0.0"> | |
<name>Text Entry_9</name> | |
<pv_name>loc://arrayy</pv_name> | |
<x>60</x> | |
<y>70</y> | |
<width>170</width> | |
</widget> | |
<widget type="action_button" version="3.0.0"> | |
<name>Action Button_20</name> | |
<actions execute_as_one="true"> | |
<action type="execute"> | |
<script file="EmbeddedPy"> | |
<text><![CDATA[# Embedded python script | |
from org.csstudio.display.builder.runtime.script import PVUtil, ScriptUtil | |
# widget.setPropertyValue('text', PVUtil.getString(pvs[0])) | |
from jarray import array | |
import jarray | |
import time | |
run = PVUtil.createPV("loc://xarray",5000) | |
run1 = PVUtil.createPV("loc://yarray",5000) | |
run2 = PVUtil.createPV("loc://test" ,5000) | |
count = 0 | |
x = [] | |
y = [] | |
while count < 10: | |
time.sleep(0.1) | |
count += 0.1 | |
y.append(count) | |
PVUtil.writePV("loc://arrayy" ,x ,200) | |
x.append(3) | |
PVUtil.writePV("loc://arrayx" ,y ,200) | |
]]></text> | |
</script> | |
<description>default graph</description> | |
</action> | |
</actions> | |
<x>190</x> | |
<y>20</y> | |
<tooltip>$(actions)</tooltip> | |
</widget> | |
<widget type="action_button" version="3.0.0"> | |
<name>Action Button_23</name> | |
<actions execute_as_one="true"> | |
<action type="execute"> | |
<script file="EmbeddedPy"> | |
<text><![CDATA[# Embedded python script | |
from org.csstudio.display.builder.runtime.script import PVUtil, ScriptUtil | |
print 'Hello' | |
# widget.setPropertyValue('text', PVUtil.getString(pvs[0])) | |
from jarray import array | |
import jarray | |
import time | |
import random | |
from random import * | |
x = [] | |
y = [] | |
count = 0 | |
while count < 10: | |
time.sleep(0.3) | |
count += 0.1 | |
y.append(count) | |
PVUtil.writePV("loc://arrayy" ,x ,200) | |
x.append(randint(-100, 100)) | |
PVUtil.writePV("loc://arrayx" ,y ,200) | |
]]></text> | |
</script> | |
<description>random graph</description> | |
</action> | |
</actions> | |
<x>60</x> | |
<y>20</y> | |
<tooltip>$(actions)</tooltip> | |
</widget> | |
<widget type="textentry" version="3.0.0"> | |
<name>Text Entry_3</name> | |
<x>1140</x> | |
<y>750</y> | |
<width>1</width> | |
<height>1</height> | |
</widget> | |
<widget type="xyplot" version="2.0.0"> | |
<name>X/Y Plot_4</name> | |
<y>110</y> | |
<width>670</width> | |
<height>230</height> | |
<show_toolbar>true</show_toolbar> | |
<x_axis> | |
<title>X</title> | |
<autoscale>true</autoscale> | |
<log_scale>false</log_scale> | |
<minimum>0.0</minimum> | |
<maximum>100.0</maximum> | |
<show_grid>false</show_grid> | |
<title_font> | |
<font name="Default Bold" family="Liberation Sans" style="BOLD" size="14.0"> | |
</font> | |
</title_font> | |
<scale_font> | |
<font name="Default" family="Liberation Sans" style="REGULAR" size="14.0"> | |
</font> | |
</scale_font> | |
<visible>true</visible> | |
</x_axis> | |
<y_axes> | |
<y_axis> | |
<title>Y</title> | |
<autoscale>true</autoscale> | |
<log_scale>false</log_scale> | |
<minimum>0.0</minimum> | |
<maximum>100.0</maximum> | |
<show_grid>false</show_grid> | |
<title_font> | |
<font name="Default Bold" family="Liberation Sans" style="BOLD" size="14.0"> | |
</font> | |
</title_font> | |
<scale_font> | |
<font name="Default" family="Liberation Sans" style="REGULAR" size="14.0"> | |
</font> | |
</scale_font> | |
<visible>true</visible> | |
</y_axis> | |
</y_axes> | |
<traces> | |
<trace> | |
<name></name> | |
<x_pv>loc://arrayx</x_pv> | |
<y_pv>loc://arrayy</y_pv> | |
<err_pv></err_pv> | |
<axis>0</axis> | |
<trace_type>5</trace_type> | |
<color> | |
<color red="0" green="0" blue="255"> | |
</color> | |
</color> | |
<line_width>2</line_width> | |
<line_style>0</line_style> | |
<point_type>3</point_type> | |
<point_size>10</point_size> | |
<visible>true</visible> | |
</trace> | |
</traces> | |
</widget> | |
<widget type="action_button" version="3.0.0"> | |
<name>Action Button_26</name> | |
<actions> | |
<action type="execute"> | |
<script file="EmbeddedPy"> | |
<text><![CDATA[# Embedded python script | |
from org.csstudio.display.builder.runtime.script import PVUtil, ScriptUtil | |
print 'Hello' | |
# widget.setPropertyValue('text', PVUtil.getString(pvs[0])) | |
import time | |
import jarray | |
from jarray import array | |
import operator | |
xarray = PVUtil.createPV("loc://arrayx" ,5000) | |
yarray = PVUtil.createPV("loc://arrayy" ,5000) | |
on = PVUtil.createPV("loc://on" ,5000) | |
x = [0] * 65536 | |
y = [0] * 65536 | |
PVUtil.writePV("loc://arrayx" ,x ,200) | |
PVUtil.writePV("loc://arrayy" ,y ,200) | |
PVUtil.writePV("loc://on" ,0 ,200) | |
]]></text> | |
</script> | |
<description>Reset</description> | |
</action> | |
</actions> | |
<x>320</x> | |
<y>20</y> | |
<width>110</width> | |
<tooltip>$(actions)</tooltip> | |
</widget> | |
<widget type="label" version="2.0.0"> | |
<name>Label_1</name> | |
<text>Y - Axis</text> | |
<x>270</x> | |
<y>360</y> | |
<width>18</width> | |
<height>110</height> | |
<rotation_step>1</rotation_step> | |
<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>CRYVISIL:TC09:EDIT:RAMP-TYPE</pv_name> | |
</rule> | |
</rules> | |
</widget> | |
<widget type="label" version="2.0.0"> | |
<name>Label_2</name> | |
<text>X - Axis</text> | |
<x>380</x> | |
<y>410</y> | |
<width>113</width> | |
<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>CRYVISIL:TC09:EDIT:RAMP-TYPE</pv_name> | |
</rule> | |
</rules> | |
</widget> | |
<widget type="action_button" version="3.0.0"> | |
<name>Action Button_62</name> | |
<actions execute_as_one="true"> | |
<action type="open_display"> | |
<file>profile_visualisation.bob</file> | |
<target>window</target> | |
<description>Open Display</description> | |
</action> | |
<action type="execute"> | |
<script file="EmbeddedPy"> | |
<text><![CDATA[# Embedded python script | |
from org.csstudio.display.builder.runtime.script import PVUtil, ScriptUtil | |
import time | |
from jarray import array | |
import jarray | |
# widget.setPropertyValue('text', PVUtil.getString(pvs[0])) | |
#PV's | |
xaxis = PVUtil.createPV("loc://array_xxVDoubleArray" ,5000) | |
yaxis = PVUtil.createPV("loc://array_yyVDoubleArray" ,5000) | |
#Values | |
x = [] | |
y = [] | |
count = 0 | |
while count < 10: | |
time.sleep(0.1) | |
count += 0.1 | |
x.append(count) | |
PVUtil.writePV("loc://array_xxVDoubleArray" ,x ,200) | |
y.append(PVUtil.getLong(PVUtil.createPV("CRYVISIL:TC09:Temperature" ,5000))) | |
PVUtil.writePV("loc://array_yyVDoubleArray" ,y ,200)]]></text> | |
</script> | |
<description>Execute Script</description> | |
</action> | |
</actions> | |
<text>just testing</text> | |
<x>480</x> | |
<y>30</y> | |
<tooltip>$(actions)</tooltip> | |
</widget> | |
</display> |