Script execution

This commit is contained in:
sfop
2016-08-18 12:01:07 +02:00
parent 98f9218aaf
commit 39965d4e2f

View File

@@ -12,11 +12,11 @@ import java.awt.Color as Color
LASER_SETTLING_TIME = 0.1
def laser_on():
caput("SIN-TIMAST-TMA:Beam-Las-Delay-Sel", 0)
#caput("SIN-TIMAST-TMA:Beam-Las-Delay-Sel", 0)
time.sleep(LASER_SETTLING_TIME)
def laser_off():
caput("SIN-TIMAST-TMA:Beam-Las-Delay-Sel", 1)
#caput("SIN-TIMAST-TMA:Beam-Las-Delay-Sel", 1)
time.sleep(LASER_SETTLING_TIME)
@@ -220,6 +220,19 @@ def add_convex_hull_plot(title, x,y, name=None, clear = False, x_range = None, y
return [hx,hy]
import random
class ComX(ReadonlyRegisterBase):
def doRead(self):
return gun_solenoid.read()/10.0 + random.random()
class ComY(ReadonlyRegisterBase):
def doRead(self):
return gun_solenoid.read()/15.0 + random.random()
comx = ComX()
comy = ComY()
avx = create_averager(comx, 5, 0.001)
avy = create_averager(comy, 5, 0.001)
camtool.com_x_mean, camtool.com_y_mean, camtool.com_x_stdev, camtool.com_y_stdev
#CAS
if controller.isServerEnabled():