Controlling a SR830 Lock-in amplifier

19 ビュー (過去 30 日間)
Henrik
Henrik 2012 年 3 月 7 日
回答済み: Nikolai Khokhlov 2023 年 6 月 8 日
Hi I would like to control my Stanford Research SR830 Lock-in Amplifier from Matlab. However I can only find the Labview drivers. I have GPIB connectors. How can I connect properly to the SR830?
Best Henrik
  1 件のコメント
Henrik
Henrik 2012 年 3 月 13 日
Is there really no one who has any idea about this?

サインインしてコメントする。

回答 (2 件)

Walter Roberson
Walter Roberson 2012 年 4 月 13 日
I do not find a specific driver for that, but in theory you should be able to use Instrument Control Toolbox for that
  2 件のコメント
Henrik
Henrik 2012 年 4 月 14 日
Thanks, I figured it out earlier.
I use the "tmtool" to connect to the gpib and then send commands to the lock-in by "fprintf".
This is great, cuz I can connect to all my Sourcemeters, Lockins and switchbox.
Marian Baah
Marian Baah 2015 年 4 月 2 日
i've been able to send commands to my lock-in and whatever information coming out is what i am expecting, my problem however is that anytime i run the programme i recieve this "Warning: GPIB : NI : An I/O operation has been canceled mostly likely due to a Timeout." I don't know how to rectify that problem Any ideas?

サインインしてコメントする。


Nikolai Khokhlov
Nikolai Khokhlov 2023 年 6 月 8 日
I've get the next code from Instrument Control Toolbox. It works as a start
%% Instrument Connection
% Find a GPIB object. 8 - is your GBIP adress, settied on lock-in
sr830 = instrfind('Type', 'gpib', 'BoardIndex', 0, 'PrimaryAddress', 8, 'Tag', '');
% Create the GPIB object if it does not exist
% otherwise use the object that was found.
if isempty(sr830)
sr830 = gpib('NI', 0, 8);
else
fclose(sr830);
sr830 = sr830(1);
end
% Connect to instrument object, sr830.
fopen(sr830);
% Send command to get value of channel X
fprintf(sr830, 'OUTP? 1');
% read the output
x_value = fscanf(sr830)
% close the connection
fclose(sr830);
delete(sr830);

カテゴリ

Help Center および File ExchangeInstrument Control Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by