当前位置: 首页>>代码示例>>Python>>正文


Python CAClient.caputWait方法代码示例

本文整理汇总了Python中gda.epics.CAClient.caputWait方法的典型用法代码示例。如果您正苦于以下问题:Python CAClient.caputWait方法的具体用法?Python CAClient.caputWait怎么用?Python CAClient.caputWait使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gda.epics.CAClient的用法示例。


在下文中一共展示了CAClient.caputWait方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: FunctionGenerator

# 需要导入模块: from gda.epics import CAClient [as 别名]
# 或者: from gda.epics.CAClient import caputWait [as 别名]
class FunctionGenerator(ScannableMotionBase):
    
    def __init__(self, name):
        self.setName(name)
        num = int(name[-1])
        #EPICS PVs
        func="BL11I-EA-FGEN-0%d:FUNC" % num
        output="BL11I-EA-FGEN-0%d:OUT" % num
        freq="BL11I-EA-FGEN-0%d:FREQ" % num
        freqrbv="BL11I-EA-FGEN-0%d:FREQ:RBV" % num
        amp="BL11I-EA-FGEN-0%d:AMP" % num
        amprbv="BL11I-EA-FGEN-0%d:AMP:RBV" % num
        offset="BL11I-EA-FGEN-0%d:OFF" % num
        offsetrbv="BL11I-EA-FGEN-0%d:OFF:RBV" % num
        sym="BL11I-EA-FGEN-0%d:SYMM" % num
        symrbv="BL11I-EA-FGEN-0%d:SYMM:RBV" % num
        
        dutycyc="BL11I-EA-FGEN-0%d:DCYC" % num
        dutycycrbv="BL11I-EA-FGEN-0%d:DCYC:RBV" % num
        trigger="BL11I-EA-FGEN-0%d:TRIGSRC" % num
        burstmode="BL11I-EA-FGEN-0%d:BURSTMODE" % num
        burstncyc="BL11I-EA-FGEN-0%d:BURSTNCYC" % num
        burstncycrbv="BL11I-EA-FGEN-0%d:BURSTNCYC:RBV" % num
        burststate="BL11I-EA-FGEN-0%d:BURST" % num
        disable="BL11I-EA-FGEN-0%d:DISABLE" % num        
        
        self.setInputNames(["frequency","amplitude","shift","symmetry"])
        self.setExtraNames([])
        self.function=CAClient(func)
        self.output=CAClient(output)
        self.frequency=CAClient(freq)
        self.frequencyrbv=CAClient(freqrbv)
        self.amplitude=CAClient(amp)
        self.amplituderbv=CAClient(amprbv)
        self.shiftcli=CAClient(offset)
        self.shiftrbv=CAClient(offsetrbv)
        self.symmetry=CAClient(sym)
        self.symmetryrbv=CAClient(symrbv)
        self.dutycycle=CAClient(dutycyc)
        self.dutycyclerbv=CAClient(dutycycrbv)
        self.triggersrc=CAClient(trigger)
        self.burstmode=CAClient(burstmode)
        self.burstncyc=CAClient(burstncyc)
        self.burstncycrbv=CAClient(burstncycrbv)
        self.burststate=CAClient(burststate)
        self.disable=CAClient(disable)
        
    # function generator controls
    def setFunction(self, function):
        try:
            if not self.function.isConfigured():
                self.function.configure()
            self.function.caputWait(function)
        except FactoryException, e:
            print "create channel error (%s): %s" % (self.function.getChannel().getName(),e)
        except CAException, e:
            print "caput Error (%s): %s" % (self.function.getChannel().getName(),e)
开发者ID:fajinyuan,项目名称:gda-dls-beamline-i11,代码行数:59,代码来源:functiongenerator.py


注:本文中的gda.epics.CAClient.caputWait方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。