AnsweredAssumed Answered

MATLAB AD9361 data stream example question

Question asked by James24 on May 8, 2017
Latest reply on May 17, 2018 by travisfcollins

I'm using the fmcomms2_3_data_stream example from HIL library to test FMCOMMS2 with ZC706 board, I would like to ask if it's possible to use only data capture methods without transmitting any samples? Method stepImpl() seems to require defining transmitting signal (sine in example), I'd like to capture any data from RX1 buffer. Thanks in advance.

 

Example code:

 

s = iio_sys_obj_matlab; % Constructor
s.ip_address = '192.168.1.1';
s.dev_name = 'ad9361';
s.in_ch_no = 2;
s.out_ch_no = 2;
s.in_ch_size = 8192;
s.out_ch_size = 8192;

 

s = s.setupImpl();

 

input = cell(1, s.in_ch_no + length(s.iio_dev_cfg.cfg_ch));
Fs = 30.72e6;
Fc = 1e6;
t = 1/Fs:1/Fs:s.in_ch_size/Fs;
for i=1:s.in_ch_no
input{i} = sin(2*pi*Fc*t+(i-1)*pi/2)*1024;
end


input{s.in_ch_no+1} = 2.4e9;
input{s.in_ch_no+2} = 30.72e6;
input{s.in_ch_no+3} = 18.0e6;
input{s.in_ch_no+4} = 'slow_attack';
input{s.in_ch_no+5} = 0;
input{s.in_ch_no+6} = 'slow_attack';
input{s.in_ch_no+7} = 0;
input{s.in_ch_no+8} = 2.4e9;
input{s.in_ch_no+9} = 30.72e6;
input{s.in_ch_no+10} = 18.0e6;

 

output = cell(1, s.out_ch_no + length(s.iio_dev_cfg.mon_ch));

 

for i = 1:5
output = stepImpl(s, input);
rssi1 = output{s.out_ch_no+1};
rssi2 = output{s.out_ch_no+2};
end

 

s.releaseImpl();

Outcomes