Trying to reliably communicate between Laser and PC via GPIB

92 Views Asked by At

For my PhD, I am currently using a Tunics Plus Laser.

I am able to perform several communications like:

import pyvisa

gpib_address = pyvisa.ResourceManager().open_resource('GPIB0::10::INSTR') 
gpib_address.write('L=1550')

which sets the laser wavelength for exapmle.

Now there is also the command:

gpib_address.query('L?')

which should return the current laser wavelength. However, I do not reliably get an answer. I can't make out any cause, but it's rather arbitrary if or if not I get an answer. If not, it returns just an empty string, but not nothing?!? I tried by playing with the parameter query_delay, but that wasn't successful.

I also use various other GPIB devices and have no problems with them. They work fine.

Anybody has similar experiences?

0

There are 0 best solutions below