Using IVI-COM IviRfSigGen to generate an ARB signal
1 view (last 30 days)
Show older comments
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 Comments
Answers (4)
dm
on 26 Oct 2011
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 Comments
Vinod
on 19 Dec 2011
You need both lines below
sig_gen.RF.OutputEnabled = true;
sig_gen.IQ.Enabled = true;
See Also
Categories
Find more on Instrument Connection and Communication in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!