示例#1
0
 def __init__(self, name, pvSet, pvGet, formatstring):
     self.setName(name)
     self.setInputNames([name])
     self.setOutputFormat([formatstring])
     self.setLevel(6)
     self.chIn = CAClient(pvSet)
     self.chOut = CAClient(pvGet)
示例#2
0
    def __init__(self,
                 name,
                 mca_root_pv,
                 channelAdvanceInternalNotExternal=False):
        self.logger = LoggerFactory.getLogger(
            "McsWaveformChannelController:%s" % name)
        self.verbose = False

        self.name = name
        self.mca_root_pv = mca_root_pv
        self.pv_stop = CAClient(mca_root_pv + 'StopAll')
        self.pv_dwell = CAClient(mca_root_pv + 'Dwell')
        self.pv_channeladvance = CAClient(mca_root_pv + 'ChannelAdvance')
        self.pv_presetReal = CAClient(mca_root_pv + 'PresetReal')
        self.pv_erasestart = CAClient(mca_root_pv + 'EraseStart')
        self.channelAdvanceInternalNotExternal = channelAdvanceInternalNotExternal
        self.channelAdvanceInternal = 0
        self.channelAdvanceExternal = 1

        self.configure()
        self.exposure_time = 1
        self.exposure_time_offset = .0
        self.number_of_positions = 0
        self.started = False
        self.hardware_trigger_provider = None
        self.stream = None
示例#3
0
 def __init__(self, name, pvinstring, pvoutstring, tolerance=0.01):
     self.name = name
     self.incli = CAClient(pvinstring)
     self.outcli = CAClient(pvoutstring)
     self.currentpos = 0.0
     self.targetpos = 0.0
     self._tolerance = tolerance
示例#4
0
    def setupEpics(self, rootPV):

        self.chDisable = CAClient(rootPV + ":DISABLE")
        self.configChannel(self.chDisable)
        self.chReset = CAClient(rootPV + ":RESET")
        self.configChannel(self.chReset)

        self.chSetGain = CAClient(rootPV + ":GAIN:DMD")
        self.configChannel(self.chSetGain)
        self.chGetGain = CAClient(rootPV + ":GAIN:RBV")
        self.configChannel(self.chGetGain)

        self.chSetLowerLevel = CAClient(rootPV + ":SCA-LOWER:DMD")
        self.configChannel(self.chSetLowerLevel)
        self.chGetLowerLevel = CAClient(rootPV + ":SCA-LOWER:RBV")
        self.configChannel(self.chGetLowerLevel)

        self.chSetHigherLevel = CAClient(rootPV + ":SCA-UPPER:DMD")
        self.configChannel(self.chSetHigherLevel)
        self.chGetHigherLevel = CAClient(rootPV + ":SCA-UPPER:RBV")
        self.configChannel(self.chGetHigherLevel)

        self.chPeakTime = CAClient(rootPV + ":PEAKTIME:DMD")
        self.configChannel(self.chPeakTime)
        self.chSaturation = CAClient(rootPV + ":SATURATION")
        self.configChannel(self.chSaturation)
示例#5
0
    def __init__(self):

        self.ccWaveFormHead = CAClient(pvWaveFormHead)
        self.ccSubArraySize = CAClient(pvSubArraySize)
        self.ccSubArrayIndex = CAClient(pvSubArrayIndex)
        self.ccUpdate = CAClient(pvUpdate)

        self.ccCh01 = CAClient(pvCh01)
        self.ccCh02 = CAClient(pvCh02)
        self.ccCh03 = CAClient(pvCh03)
        self.ccCh04 = CAClient(pvCh04)
        self.ccCh05 = CAClient(pvCh05)
        self.ccCh06 = CAClient(pvCh06)

        self.ccWaveFormHead.configure()
        self.ccSubArraySize.configure()
        self.ccSubArrayIndex.configure()
        self.ccUpdate.configure()

        self.ccCh01.configure()
        self.ccCh02.configure()
        self.ccCh03.configure()
        self.ccCh04.configure()
        self.ccCh05.configure()
        self.ccCh06.configure()

        self.length = 0
        self.head = 0

        self.dataSetCh01 = dnp.zeros([maxLength])
        self.dataSetCh01.setName("Channel 1")
        self.js = Finder.find("command_server")
示例#6
0
    def __init__(self, port, panel):
        self.port = port
        panelDict = {'U1': 'I', 'U2': 'J'}
        if panel.upper() not in ['U1', 'U2', 'I', 'J']:
            print "-> patch panel choice is invalid: allowed values are U1 or U2"
            print "-> U1 panel selected as default."
            self.panel = 'U1'
        else:
            self.panel = panel
        panelStr = panelDict[panel.upper()]
        rootComStr = "BL06" + panelStr + "-EA-USER-01:ASYN"
        self.addrStr = rootComStr + "%1u." % self.port
        pvIn = rootComStr + "%1u.TINP" % self.port
        pvOut = rootComStr + "%1u.AOUT" % self.port
        self.chIn = CAClient(pvIn)
        self.chIn.configure()
        self.chOut = CAClient(pvOut)
        self.chOut.configure()

        self.baudList = [
            "Unknown", "300", "600", "1200", "2400", "4800", "9600"
        ]
        self.baudList += ["19200", "38400", "57600", "115200", "230400"]
        self.bitList = ["Unknown", "5", "6", "7", "8"]
        self.stopList = ["Unknown", "1", "2"]
        self.parityList = ["Unknown", "None", "Even", "Odd"]
        self.flowList = ["Unknown", "None", "Hardware"]

        self.getParameters()
        self.report()
示例#7
0
    def __init__(self, name, strSetPV, strGetPV, strStatusPV, strEnablePV):
        self.logger = LoggerFactory.getLogger("ID_PolarisationClass:%s" % name)
        self.verbose = True

        self.setName(name)
        self.setInputNames([name])
        self.setExtraNames([])
        #		self.Units=[strUnit];
        self.setLevel(7)
        #		self.setOutputFormat(["%20.12f"]);
        self.enable = ['Beamline', 'Machine Control Room']
        self.positions = [
            'PosCirc', 'NegCirc', 'Horizontal', 'Vertical', 'LinArb'
        ]

        self.chSetPol = CAClient(strSetPV)
        self.chSetPol.configure()
        self.chGetPol = CAClient(strGetPV)
        self.chGetPol.configure()
        self.chStatus = CAClient(strStatusPV)
        self.chStatus.configure()
        self.chEnable = CAClient(strEnablePV)
        self.chEnable.configure()
        self.currentPol = 'Unknown'
        self.demandPol = 'Unknown'
        self.strStatus = 'unknown'
        self.strEnable = self.enable[1]
示例#8
0
    def __init__(self, name, strTempSetPV, strTempSetReadBackPV, strTemp1GetPV,
                 strTemp2GetPV):
        self.setName(name)
        self.setInputNames([name])
        self.setExtraNames(['T1', 'T2'])
        self.setOutputFormat(["%6.3f", "%6.3f", "%6.3f"])

        #		self.Units=[strUnit];
        self.setLevel(7)
        #		self.setOutputFormat(["%20.12f"]);

        self.currentTemp = [0, 0]
        self.demondTemp = 0

        #Default delay is 10 minutes = 600 seconds
        self.waitTime = 600
        self.waitEnough = True
        self.errorTolerance = 1

        self.chSetTemp = CAClient(strTempSetPV)
        self.chSetTemp.configure()
        self.chSetTempRB = CAClient(strTempSetReadBackPV)
        self.chSetTempRB.configure()

        self.chGetTemp1 = CAClient(strTemp1GetPV)
        self.chGetTemp1.configure()
        self.chGetTemp2 = CAClient(strTemp2GetPV)
        self.chGetTemp2.configure()
示例#9
0
    def __init__(self, name, pv='ME13C-EA-DET-01:',formatstring='%6f'):
        self.setName(name)
#         self.setInputNames([])
#         self.setOutputFormat([])
        self.nextCh=CAClient(pv+'NextPixel')
        self.rt=CAClient(pv+'PresetReal')
        self.checkbusy=CAClient(pv+'ElapsedReal')
示例#10
0
 def __init__(self, name, pvVoltage, pvStatus, formatstring):
     self.setName(name)
     self.chVoltage = CAClient(pvVoltage)
     self.chStatus = CAClient(pvStatus)
     self.Units = ['V']
     self.setOutputFormat([formatstring])
     self.delay = 5
     self.timeout = 30
示例#11
0
	def setupEpics(self, rootPV):
		#Epics PV for the Number of elements available
		self.chHead=CAClient(rootPV + ":ELEMENTCOUNTER");  self.configChannel(self.chHead);

#		Epics PVs for the channels:
		self.chData=[];
		for i in range(self.numberOfChannels):
			self.chData.append( CAClient(rootPV + ":CH" + str(i+1) + "DATA"));
			self.configChannel(self.chData[i]);
示例#12
0
 def __init__(self, name, pvcontrolstring, pvstatestring, unitstring,
              formatstring):
     self.setName(name)
     self.setInputNames([name])
     self.Units = [unitstring]
     self.setOutputFormat([formatstring])
     self.setLevel(3)
     self.incli = CAClient(pvcontrolstring)
     self.statecli = CAClient(pvstatestring)
示例#13
0
 def __init__(self, name, pvinstring, pvoutstring, unitstring,
              formatstring):
     self.setName(name)
     self.setInputNames([name])
     self.Units = [unitstring]
     self.setOutputFormat([formatstring])
     self.setLevel(3)
     self.incli = CAClient(pvinstring)
     self.outcli = CAClient(pvoutstring)
示例#14
0
    def setup(self):
        self.chControl = CAClient(self.filterRootPV + ':CTRL')
        self.configChannel(self.chControl)
        self.chInStatus = CAClient(self.filterRootPV + ':INLIM')
        self.configChannel(self.chInStatus)
        self.chOutStatus = CAClient(self.filterRootPV + ':OUTLIM')
        self.configChannel(self.chOutStatus)

        self.getFilterPosition()
示例#15
0
 def getChannelInputStreamCAClients(self, channel_pv_suffix):
     if installation.isLive():
         pv_waveform = CAClient(self.binpoint_root_pv + channel_pv_suffix +
                                'BINPOINT')
         pv_count = CAClient(self.binpoint_root_pv + channel_pv_suffix +
                             'BINPOINT:NLAST.B')
     else:
         pv_waveform = []
         pv_count = self.number_of_positions
     return pv_waveform, pv_count
示例#16
0
	def __init__(self, name, pvinstring, pvoutstring, unitstring, formatstring,help=None):
		self.setName(name);
		if help is not None: self.__doc__+='\nHelp specific to '+self.name+':\n'+help
		self.setInputNames([name])
		self.Units=[unitstring]
		self.setOutputFormat([formatstring])
		self.setLevel(5)
		self.incli=CAClient(pvinstring)
		self.incli.configure()
		self.outcli=CAClient(pvoutstring)
		self.outcli.configure()
示例#17
0
	def __init__(self, name, strChTP, strChCNT, strChSn):
		self.setName(name);
		self.setInputNames([]);
		self.setExtraNames([name]);
#		self.Units=[strUnit];
		#self.setLevel(5);
		self.setOutputFormat(["%20.12f"]);
		self.chTP=CAClient(strChTP);
		self.chCNT=CAClient(strChCNT);
		self.chSn=CAClient(strChSn);
		self.tp = -1;
示例#18
0
	def __init__(self, name, strPV, strUnit, strFormat):
		self.setName(name);
		self.setInputNames([name])
		self.setExtraNames([name]);
		self.Units=[strUnit]
		self.setOutputFormat([strFormat])
		self.setLevel(3)
		self.incli=CAClient(strPV+'.VAL')
		self.outcli=CAClient(strPV+'.RBV')
		self.statecli=CAClient(strPV+'.DMOV')
		self.stopcli=CAClient(strPV+'.STOP')
示例#19
0
 def __init__(self, name):
     self.name = name
     self.epicsClient = CAClient("camserver")
     #self.epicsClient.configure()
     print "epicsClient: " + str(self.epicsClient)
     self.camserverCommandClient = CAClient(self.camserverWriterPV)
     print "camserverCommandClient: " + str(self.camserverCommandClient)
     self.camserverWriterClient = CAClient(self.camserverWriterPV)
     print "camserverWriterClient: " + str(self.camserverWriterClient)
     self.camserverReaderClient = CAClient(self.camserverReaderPV)
     print "camserverReaderClient: " + str(self.camserverReaderClient)
示例#20
0
    def setupEpics(self, rootPV):
        #Epics PV for the Number of elements available (Head of waveform)

        #		Epics PVs for the channels:
        self.chData = []

        for i in range(self.numberOfDetectors):
            self.chData.append(CAClient(rootPV + ":mca" + str(i + 1)))
            self.configChannel(self.chData[i])

        self.chHead = CAClient(rootPV + ":mca1.NORD")
        self.configChannel(self.chHead)
 def __init__(self, name, pvinstring, pvoutstring, pvstopstring, tolerance, unitstring, formatstring, upperlimit, lowerlimit):
     self.setName(name);
     self.setInputNames([name])
     self.Units=[unitstring]
     self.setOutputFormat([formatstring])
     self.setLevel(5)
     self.incli=CAClient(pvinstring)
     self.outcli=CAClient(pvoutstring)
     self.stopcli=CAClient(pvstopstring)
     self._tolerance=tolerance
     self.setUpperGdaLimits(upperlimit)
     self.setLowerGdaLimits(lowerlimit)
示例#22
0
    def setupEpics(self, pvSet, pvGet, pvStatus):
        #		Epics PVs for checking fast scan readiness:
        self.chSet = CAClient(pvSet)
        self.configChannel(self.chSet)
        self.chGet = CAClient(pvGet)
        self.configChannel(self.chGet)

        if pvStatus:
            self.chStatus = CAClient(pvStatus)
            self.configChannel(self.chStatus)
        else:
            self.chStatus = None
示例#23
0
 def __init__(self, name):
     self.setName(name)
     self.setInputNames([])
     self.setExtraNames([])
     self.setOutputFormat([])
     self.setLevel(7)
     self.MinLevel = 1
     self.ricur = CAClient("SR21C-DI-DCCT-01:SIGNAL")
     self.ricur.configure()
     self.shutter = CAClient("FE05I-PS-SHTR-02:STA")
     self.shutter.configure()
     self.wasOff = False
示例#24
0
	def __init__(self, name, strPV, strCh, time):
		self.setName(name);
		self.setInputNames([])
		self.setExtraNames([name]);
#		self.Units=[strUnit]
#		self.setOutputFormat(['%d'])
		self.setLevel(3)
		self.chTP=CAClient(strPV+'.TP')
		self.chCNT=CAClient(strPV+'.CNT')
		self.chFREQ=CAClient(strPV+'.FREQ')
		self.chPRn=CAClient(strPV+'.PR' + strCh)
		self.chSn=CAClient(strPV+'.S' + strCh)
示例#25
0
	def __init__(self, name, strPV, time):
		self.setName(name);
		self.setInputNames([])
		self.setExtraNames([name]);
#		self.setOutputFormat(['%d'])
		self.setLevel(3)
		self.chTP=CAClient(strPV+'.TP')
		self.chCNT=CAClient(strPV+'.CNT')
		self.chFREQ=CAClient(strPV+'.FREQ')
		
		for n in range(64):
			self.chScalerValue[n]=CAClient(strPV+'.S' + n)
示例#26
0
	def setupEpics(self, rootPV):
		self.chDwell =CAClient(rootPV + ":Dwell"); self.configChannel(self.chDwell);
		self.chPreset=CAClient(rootPV + ":PresetReal"); self.configChannel(self.chPreset);
		self.chEraseStart=CAClient(rootPV + ":EraseStart"); self.configChannel(self.chEraseStart);

		#Epics PV for the Number of elements available (Head of waveform)
		self.chHead=CAClient(rootPV + ":mca1.NORD");  self.configChannel(self.chHead);

#		Epics PVs for the channels:
		self.chData=[];
		for i in range(self.numberOfDetectors):
			self.chData.append( CAClient(rootPV + ":mca" + str(i+2)));
			self.configChannel(self.chData[i]);
示例#27
0
	def __init__(self, name, pv='ME13C-EA-DET-01:',formatstring='%6f'):
		self.setLevel(9)
		self.setOutputFormat([formatstring]*4)
		self.setName(name)	
		self.setInputNames([name])
		self.pvt=CAClient(pv+'EraseStart')
		self.rt=CAClient(pv+'PresetReal')
		self.rt.configure()
		self.pvt.configure()
		self.checkbusy=CAClient(pv+'ElapsedReal')
		self.checkbusy.configure()	
		self.setExtraNames(['xmroi1','xmroi2','xmroi3'])
		self.new_position=1
示例#28
0
 def __init__(self, xpv, ypv, controlpv, numberofpointstoplot=1000,save=False):
     '''
     Constructor
     '''
     self.xpv=xpv
     self.ypv=ypv
     self.xcli=CAClient(xpv)
     self.ycli=CAClient(ypv)
     self.control=CAClient(controlpv)
     self.x=array.array('d')
     self.y=array.array('d')
     self.plotsize=numberofpointstoplot
     self.isSave=save
    def __init__(self, name, pv_set, pv_read, timeout, tolerance = 0.0005): #BL16B-EA-PSU-01
        self.name = name
        self.inputNames = [name]
        self.outputFormat = ['%6.4f']

        self.timeout = timeout
        self.tol = tolerance
        self._time_triggered = None
        self._last_target = None
        self._pv_set = CAClient(pv_set)
        self._pv_read = CAClient(pv_read)
        self._pv_set.configure()
        self._pv_read.configure()
示例#30
0
    def setup(self):
        #		Epics PVs for changing the magnet X, Y, Z field value:
        self.chIT = CAClient(self.scalerRootPV + ":SC:INTTIME")
        self.configChannel(self.chIT)
        self.chStart = CAClient(self.scalerRootPV + ":SC:STARTCOUNT")
        self.configChannel(self.chStart)
        self.chMode = CAClient(self.scalerRootPV + ":SC:MODE")
        self.configChannel(self.chMode)

        for i in range(AdcScalerClass.SCALER_CHANNEL):
            self.chCounts[i] = CAClient(self.scalerRootPV + ":CH" +
                                        str(i + 1) + ":SUM")
            self.configChannel(self.chCounts[i])