title: Error when trying to communicate with scope, VisaIOError: VI_ERROR_TMO (-1073807339): Timeout expired before operation completed
body: <p>I need to communicate with a scope, Agilent Infiniium DCA-J 86100C, with python 2.7. The company Keysight offers various python code, although I'm trying to run one of them to help me learn but it crashed. I'm using GPIB and pyvisa for the connection. </p>
  
  <p>I've already tried to change to termination characters but it didn't change anything. I'm not sure what band rate I could try.</p>
  
  <pre class="lang-py prettyprint-override"><code>SCOPE_VISA_ADDRESS = "GPIB0::7::INSTR"
  rm = visa.ResourceManager('C:\\Windows\\System32\\visa32.dll')
  KsInfiniiVisionX = rm.open_resource(SCOPE_VISA_ADDRESS)
  KsInfiniiVisionX.clear()
  
  KsInfiniiVisionX.query(':SYSTEM:DSP "";*OPC?')
  KsInfiniiVisionX.write(":HARDcopy:INKSaver OFF")
  KsInfiniiVisionX.write(":DISPlay:DATA? PNG,SCReen,COLor")
  
  my_image = KsInfiniiVisionX.read_raw()
  </code></pre>
  
  <pre><code>Traceback (most recent call last):
    File "X:\...\Get_screen_image_VISA_Python_modified\InfiniiVision_Save_ScreenShot_to_PC_Python-2.7_modified.py", line 201, in &lt;module&gt;
      my_image = KsInfiniiVisionX.read_raw()
    File "C:\Python27\lib\site-packages\pyvisa\resources\messagebased.py", line 306, in read_raw
      chunk, status = self.visalib.read(self.session, size)
    File "C:\Python27\lib\site-packages\pyvisa\ctwrapper\functions.py", line 1582, in read
      ret = library.viRead(session, buffer, count, byref(return_count))
    File "C:\Python27\lib\site-packages\pyvisa\ctwrapper\highlevel.py", line 188, in _return_handler
      raise errors.VisaIOError(ret_value)
  VisaIOError: VI_ERROR_TMO (-1073807339): Timeout expired before operation completed.
  </code></pre>