title: PyVISA Timeout error
body: <p>I am trying to transfer a scope file from Tektronix to PC. Unfortunately I keep getting a TIMEOUT error. My writes work but when reading the raw format I am stuck. 
  Here is my code:</p>
  
  <pre><code>import visa
  import time
  
  scope = visa.ResourceManager()
  tek = scope.open_resource('GPIB::1::INSTR')
  tek.timeout=100000 # timeout 100s
  print(tek.query('*IDN?'))
  tek.write('FILESYSTEM:FRINT "C:\EDIR\EDIR_812\140mV.png", GPIB')
  
  time.sleep(6)
  data = tek.read_raw()
  time.sleep(6)
  
  
  fid = open('C:/Users/svpxi01/Desktop/GPIB read/my_image.png', 'wb')
  fid.write(data)
  fid.close()
  tek.close()
  print('Done')
  </code></pre>
  
  <p>And debug log:</p>
  
  <pre><code>    TEKTRONIX,TDS5034B,B052776,CF:91.1CT FV:2.0.11
  
  2016-03-29 17:28:38,119 - pyvisa - DEBUG - viWrite(60710720, b'FILESYSTEM:FRINT "C:\\EDIR\\EDIR_812`mV.png", GPIB\r\n', 50, 'c_ulong(50)') -&gt; 0
  2016-03-29 17:28:44,130 - pyvisa - DEBUG - GPIB::1::INSTR - reading 20480 bytes (last status &lt;StatusCode.success_max_count_read: 1073676294&gt;)
  2016-03-29 17:30:58,366 - pyvisa - DEBUG - viRead(60710720, &lt;ctypes.c_char_Array_20480 object at 0x0389FF30&gt;, 20480, 'c_ulong(0)') -&gt; -1073807339
  2016-03-29 17:30:58,406 - pyvisa - DEBUG - GPIB::1::INSTR - exception while reading: VI_ERROR_TMO (-1073807339): Timeout expired before operation completed.
  Traceback (most recent call last):
    File "C:\Users\SyedM03\python\tekwrite.py", line 20, in &lt;module&gt;
      data = tek.read_raw()
    File "C:\Python34\lib\site-packages\pyvisa\resources\messagebased.py", line 306, in read_raw
      chunk, status = self.visalib.read(self.session, size)
    File "C:\Python34\lib\site-packages\pyvisa\ctwrapper\functions.py", line 1582, in read
      ret = library.viRead(session, buffer, count, byref(return_count))
    File "C:\Python34\lib\site-packages\pyvisa\ctwrapper\highlevel.py", line 188, in _return_handler
      raise errors.VisaIOError(ret_value)
  pyvisa.errors.VisaIOError: VI_ERROR_TMO (-1073807339): Timeout expired before operation completed.
  </code></pre>