0
votes

I´m currently trying to make USB communication to the laser controler TLB 6700 (New Focus - Newport) with python.

https://www.newport.com/f/velocity-wide-&-fine-tunable-lasers

This is my first python task, and I´ve been having several troubles. So, by steps:

1) This device has its own drivers, and a comercial software to control it. However, I would like to develop my own code to perform several automation procedures.

2) The newport drivers are not NI compatible. This mean that I can not use PyVisa to recognise the device if I´m using the Newport drivers.

3) I think I can not use PyUSB too, for the same reasson. Even I´m not totally sure about that.

4) A solution that I´ve found is to use the NI-Interactive control to install a secondary NI driver for the device. Following this procedure I can recognise the device with PyUSB.

5) However, I do not understand how to activate the device and to send commands. I guess that the correct procedure is something like:

5.1: Call a library. Newport provides diferent libraries and dllwrapers. I´m asuming that the correct procedure is to use Ctypes to call the primary device dll. This will lead the possible instruction call.

5.2: Recognise the device as I´ve done with the NI driver and thorugh PyUSB.

5.3: Open the device and send command through PyUSB code.

So, here my questions:

  • PyVISA seems much easier to use than PyUSB. Any of you know a procedure to do the same but with PyVISA?

  • Any of you have done similar procedure with Newport devices, or even with the same TLB 6700 controller?

Thank you in advance,

Cheers,

1

1 Answers

1
votes

It might be a bit late but just in case, I developed a python code to control a TLB 67xx. You could find it in my github.

Basically I call the dll through (UsbDllWrap) python net (import clr) and use it to set the wavelength, start a scan , etc... I do have several decorator that you could dismiss (@InOut.output for instance). You might need to adjust the path of your dll, if you do not use Anaconda for python. That is the only decent way I found to control the NewFocus laser, as it will not be possible to control them through PyVisa. Obviously, doing so it is only possible on Windows.

I am still working on a cross platform solution that could be suitable for Linux