2

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:

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_812140円mV.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')

And debug log:

 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)') -> 0
2016年03月29日 17:28:44,130 - pyvisa - DEBUG - GPIB::1::INSTR - reading 20480 bytes (last status <StatusCode.success_max_count_read: 1073676294>)
2016年03月29日 17:30:58,366 - pyvisa - DEBUG - viRead(60710720, <ctypes.c_char_Array_20480 object at 0x0389FF30>, 20480, 'c_ulong(0)') -> -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 <module>
 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.
asked Mar 30, 2016 at 0:38

1 Answer 1

2

Found my issue.

tek.write('FILESYSTEM:FRINT "C:\EDIR\EDIR_812140円mV.png", GPIB')

is incorrect. It should be

tek.write('FILESYSTEM:FRINT "C:/EDIR/EDIR_812/140mV.png", GPIB')
answered Mar 30, 2016 at 1:48
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.