Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Auto Gain function of SR830 DSP lock-in amplifier via labview with GPIB connection

Hello

 

I'm using Labview 2018 with GPIB-USB-HS+ to connect with SR830

Most of the communications are fine(setting time constant, filter, read data...etc) except one thing: auto gain function

 

SR830 is kinda slow at determine the proper gain level to achieve maximum sensitivity without overload (typically 1~3 secs, sometimes longer), if you attempt to communicate with SR830 before autogain function is done, an error will occur.

 

According to manual from stanford research, by reading Serial Poll Status Byte(bit 1), we can know that autogain is done or not. it should return 0 when auto gain is on-going and return 1 when it is done.

 

However, by sending "*STB? 1" from VISA write and VISA read the response, it always returns 0 regardless autogain is done or not, and the response time of *STB? is pretty slow, too(~1 sec)

 

Currently I set the gain level by manually calibrate it, but it's not really good for automation in measurement.

Does anyone encounter similar problem with SR830 and successfully solve it?

 

I do consult the local agent of stanford research in my country, they only tell me that they never find this problem while using RS232 to communicate with SR830, that's all.

 

 

P.S.

 

Please DON'T tell me to check VI driver of SR830 from NI, I already check it(every SCPI code send by VISA) and just like many VI drivers of other instruments, it contains a lot of subtle bugs which are hard to find. The person whoever write it does not consider the response time of Autogain and it will transfer standard error-out data flow immediately after sending Autogain command, and cause an error, good job bro.

 

 

 

Message 1 of 2
(1,173 Views)

OK, it seems that not many user of SR830 notice the problem of auto gain in remote program control.

 

 

After consulting several experienced engineers who have worked with SR830 via remote program, the best solution might be built another auto gain vi instead of using AGAN command. 

 

The logic is : check the current reading value and sensitivity level(in numeric), if the ratio  (measurement/sensitivity) > 0.9, decrease sensitivity, if the ratio < 0.1, increase the sensitivity.

 

 

attachment is my version of auto gain vi, its not pretty but it works.

 

 

By the way, I did consult Stanford Research directly and got reply as:

 

"This is a limitation of the way the IEEE488 command set works. You can instead try using GPIB command IBRSP instead to do this."

 

 

It seems that there are some intrinsic problems in the command set of SR830 which make it not possible to get correct reading of *STB? command while using GPIB interface.

 

 

 

 

Message 2 of 2
(1,102 Views)