本文整理汇总了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)