本文整理汇总了Python中VISA_Driver.VISA_Driver.read方法的典型用法代码示例。如果您正苦于以下问题:Python VISA_Driver.read方法的具体用法?Python VISA_Driver.read怎么用?Python VISA_Driver.read使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VISA_Driver.VISA_Driver
的用法示例。
在下文中一共展示了VISA_Driver.read方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: clearMessages
# 需要导入模块: from VISA_Driver import VISA_Driver [as 别名]
# 或者: from VISA_Driver.VISA_Driver import read [as 别名]
def clearMessages(self):
#Send version request so message buffer isn't empty
VISA_Driver.writeAndLog(self,'V')
#Read message buffer in full, to clear any messages that were not previously cleared
#(Uncleared messages seem to arise from fact that device seems to be comparatively slow to reply)
reply = VISA_Driver.read(self,ignore_termination=True)
self.log("Message buffer read on initialisation: "+reply)
while not reply.startswith('IPS120'):
#There was an error or incorrect value, try to clear message buffer again
reply = VISA_Driver.read(self,ignore_termination=True)
self.wait(delayTime)
self.log("Message buffer read again: "+reply)