捕获Pyvisa Python的Agilent 6000(DSO6034A)的机组人员
我想使用下面的代码捕获安捷伦范围的屏幕截图,但我会出现错误,并且取消打印可以帮助我,(vi_error_tmo(-1073807339):超时在完成之前已完成),谢谢
import pyvisa as visa
import sys
# Example VISA address for a USB connection:
VISA_ADDRESS = 'USB0::0x2A8D::0x1797::CN57046145::0::INSTR'
rm = visa.ResourceManager(VISA_ADDRESS, read_termination = '\n', write_termination = '\n' )
# Define VISA Resource Manager
scope = visa.ResourceManager('C:\\Windows\\System32\\visa32.dll')
#print (scope.query('*IDN?'))
scope.write(':HARDcopy: STARt')
raw_data = scope.read_raw ()
f= open ('Shot.png','wb')
f.write (raw_data)
f.close
I would like to capture a screenshot of an Agilent scope using the code below but I get fault, and print was canceled can you please help me, (VI_ERROR_TMO (-1073807339): Timeout expired before operation completed) , thanks
import pyvisa as visa
import sys
# Example VISA address for a USB connection:
VISA_ADDRESS = 'USB0::0x2A8D::0x1797::CN57046145::0::INSTR'
rm = visa.ResourceManager(VISA_ADDRESS, read_termination = '\n', write_termination = '\n' )
# Define VISA Resource Manager
scope = visa.ResourceManager('C:\\Windows\\System32\\visa32.dll')
#print (scope.query('*IDN?'))
scope.write(':HARDcopy: STARt')
raw_data = scope.read_raw ()
f= open ('Shot.png','wb')
f.write (raw_data)
f.close
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论