added laser shutter

This commit is contained in:
Chris Milne
2018-06-27 20:14:11 +02:00
parent c52f9c907c
commit 64a3a54d59
3 changed files with 40 additions and 10 deletions
+10 -10
View File
@@ -230,16 +230,16 @@ aliases = {
'z_und' : 125,
'desc' : '4.5M Jungfrau detector',
'eco_type' : 'devices_general.alvradetectors.DIAClient'},
# 'http://sf-daq-2:10000' : {
# 'alias' : 'DetJF',
# 'z_und' : 127,
# 'desc' : '4.5M Jungfrau detector',
# 'eco_type' : 'devices_general.alvradetectors.JF'},
# 'SLAAR21-LTIM01-EVR0' : {
# 'alias' : 'LaserShutter',
# 'z_und' : 127,
# 'desc' : 'Laser Shutter',
# 'eco_type' : 'loptics.laser_shutter.laser_shutter'},
'SARES11-V' : {
'alias' : 'vacuum',
'z_und' : 127,
'desc' : 'Prime vacuum system',
'eco_type' : 'endstations.alvra_prime.vacuum'},
'SLAAR11-LTIM01-EVR0' : {
'alias' : 'laserShutter',
'z_und' : 122,
'desc' : 'Laser Shutter',
'eco_type' : 'loptics.laser_shutter.laser_shutter'},
# = dict(
# alias = ''
# z_und =
+6
View File
@@ -83,3 +83,9 @@ class microscope:
# prism (as a SmarAct-only stage) is defined purely in ../aliases/alvra.py
class vacuum:
def __init__(self,Id):
self.Id.Id
# Vacuum PVs for Prime chamber
self.spectrometerVac = PV('SARES11-VMFR126-600:PRESSURE')
+24
View File
@@ -0,0 +1,24 @@
from epics import caput, caget
class laser_shutter:
def __init__(self,Id):
self.Id = Id
def __repr__(self):
return self.get_status()
def get_status(self):
Id = self.Id
status = caget(Id+":FrontUnivOut5_SOURCE")
if status == 4:
return 'open'
elif status == 3:
return 'close'
else:
return "unknown"
def open(self):
caput(self.Id+":FrontUnivOut3_SOURCE",4)
def close(self):
caput(self.Id+":FrontUnivOut3_SOURCE",3)