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.

回答(4 个)

dm
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.

Alex
Alex 2011-10-28
I could use GPIB or a VISA object to control each device, however I have multiple VSG's and VSG manufacterers to contend with. Thus, I would be needing to create my own driver utilizing the device's specific SCPI commands to control a test. This is in FACT what the IVI foundation drivers already do, and so it should be easier to use their information rather than re-write what they have done.
Also, utilizing VISA object limits you to keeping specific devices on certain GPIB addresses - which is just not flexable enough for my work.

Rob Graessle
Rob Graessle 2011-10-28
Try this:
sig_gen.RF.OutputEnabled = true;
  1 个评论
Alex
Alex 2011-10-28
Already did. That turns on the RF output, but does not touch the ARB output.
I specifically went into the VSG after running that command into the ARB screen (Mode -> dual Arb). If I hit the on button, then the signal (AWGN) comes through.
So, I think the sig_gen.RF.OutputEnabled = true; only represents the RF toggle button on the lower right of the VSG

请先登录,再进行评论。


Vinod
Vinod 2011-12-19
You need both lines below
sig_gen.RF.OutputEnabled = true;
sig_gen.IQ.Enabled = true;
  1 个评论
Alex
Alex 2012-1-13
This only turns on the IQ & the RF output. The modulation option also need to be turned on.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Instrument Connection and Communication 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by