Using IVI-COM IviRfSigGen to generate an ARB signal
1 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
I have what I hope is an easy question that I have just been unable to find the answer to: I want to turn on the ARB output remotely.
I have an Agilent Vector Signal Generator that I have connected (through GPIB) that I am controlling Via an Ivi-com object (specifically, an IviRfSigGen Object).
Now, how can one turn on the ARB output using this object? I can load a file into the ARB memory, and then even choose the file, but for the life of me, I cannot figure out how to turn on the arb output.
This is the simple code I have setup so far. i_data & q_data are already generated.
%rfgen is the logical id held within the Configureation Store
sig_gen = instrument.ivi.IviRFSigGen('rfgen');
%init the device
sig_gen.Initialize('rfgen', true, true, '');
%set frequency - this works
sig_gen.RF.Frequency = 1E9;
sig_gen.RF.Level = 0;
%load file into the VSG
sig_gen.DigitalModulation.Arb.WriteWaveform('arbwave', i_data, q_data, false);
%set the waveform as the selected waveform
sig_gen.DigitalModulation.Arb.SelectedWaveform('arbwave');
%I know up until this point it all works, because I can manually hit the "arb on" button and it works. But that defeats the purpose of doing it remotely.
0 个评论
回答(4 个)
dm
2011-10-26
Which VSG from Agilent do you use? If you have the instrument control toolbox in Matlab, controlling the instrument thru a GPIB object is quite easy, however, you'd have to write Matlab scripts for doing the specific things you want (e.g. uploading signals, downloading data, etc). If you have the programming manual of the instrument this is quite straight forward (e.g.);
BoardNumber = 0; % Example GPIB card number
DeviceNumber = 15; % Example GPIB address
arb = gpib('ni',BoardNumber,DeviceNumber);
arb.InputBufferSize = 1000; % Or whatever you need
arb.Timeout = 120; % Can be convenient to set a timeout
fopen(arb); % Open communication
fprintf(arb,'*IDN?'); % Return identification information
fprintf(arb,'blablabla') % Pass whatever you want
data = fscanf(arb); % Read data, use str2num if numeric data desired.
0 个评论
Vinod
2011-12-19
You need both lines below
sig_gen.RF.OutputEnabled = true;
sig_gen.IQ.Enabled = true;
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Instrument Connection and Communication 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!