GPIB Connection to 2340A - Response garbled #photo-notice
I've been trying to use use GPIB interface on my 2340A and had only limited success so far. I've bought a Prologix GPIB-USB adapter for the task. I can connect to the instrument and send commands that show up on the debug screen - see https://groups.io/g/TekScopes/photo/263696/3241684?p=Created,,,20,2,0,0 - here just asking for the instrument to identify. The response, however, is not intelligible. The settings I've used on the scope are here: https://groups.io/g/TekScopes/photo/263696/3241685?p=Created,,,20,2,0,0
And the python code I've used is
rm = pyvisa.ResourceManager('@py')
inst = rm.open_resource('ASRL/dev/cu.usbserial-PX4QY88I::INSTR')
inst.baud_rate = 9600
inst.read_termination = '\n'
inst.write_termination = '\n'
inst.timeout = 2500
inst.encoding = 'latin-1'
and which returns 'ÿ\r'
setting the instrument encoding in python to 'ascii' (the default) instead of 'latin-1' results in an error as byte 0 cannot be decoded. I'm working a Mac and would like to keep working in python and the http://www.ke5fx.com/gpib/readme.htm toolkit is Windows only.
Any help is greatly appreciated.