Pulse mode: Infinite number of repeated bursts doesn't work

Applications, development tools, FPGA, C, WEB
Festo
Posts: 10
Joined: Tue May 24, 2016 1:16 pm
Location: Berlin

Re: Pulse mode: Infinite number of repeated bursts doesn't w

Post by Festo » Mon Jul 11, 2016 8:38 am

I tried it, but nothing changed. After 70 seconds the oscilloscope didn't show me a signal. I used an external oscilloscope, not the RP oscilloscope. Here is my Code.

Code: Select all

%% Define Red Pitaya as TCP/IP object
clc
clear all
close all
IP= '172.23.56.50';           % Input IP of your Red Pitaya...
port = 5000;                    % If you are using WiFi then IP is:             
tcpipObj=tcpip(IP, port);       % 192.168.128.1

fopen(tcpipObj);
tcpipObj.Terminator = 'CR/LF';

%% The example generate sine bursts every 0.5 seconds indefinety
%fprintf(tcpipObj,'GEN:RST');

fprintf(tcpipObj,'SOUR2:FUNC sine');                                                 
fprintf(tcpipObj,'SOUR2:FREQ:FIX 13000000');     % Set frequency of output signal
fprintf(tcpipObj,'SOUR2:VOLT 1');          % Set amplitude of output signal

fprintf(tcpipObj,'SOUR2:BURS:STAT ON');    % Set burst mode to ON

fprintf(tcpipObj,'SOUR2:BURS:NOR -1');    % Infinity number of sine wave pulses
fprintf(tcpipObj,'SOUR2:BURS:INT:PER 1000'); % Set time of burst period in microseconds = 5 * 1/Frequency * 1000000
fprintf(tcpipObj,'SOUR2:BURS:NCYC 1000');       % Set 1 pulses of sine wave

fprintf(tcpipObj,'SOUR2:TRIG:IMM');          % Set generator trigger to immediately
fprintf(tcpipObj,'OUTPUT2:STATE ON');         % Set output to ON


%% Close connection with Red Pitaya

fclose(tcpipObj

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: Pulse mode: Infinite number of repeated bursts doesn't w

Post by Nils Roos » Mon Jul 11, 2016 9:11 pm

My bad, I didn't wait long enough. With your first set of instructions, it stopped pretty quickly, and when it didn't stop after half a minute with the changed sequence, I assumed it would be alright. *Sigh* I'll have to dig a little deeper then...

Laurent
Posts: 18
Joined: Mon Jun 23, 2014 6:38 pm
Location: Paris

Re: Pulse mode: Infinite number of repeated bursts doesn't w

Post by Laurent » Tue Jul 12, 2016 10:28 am

Hi Nils,
here is the non working code.
Any help highly appreciated :)
Laurent
BTW do you know how to activate scpi debug (log is included in the code but not activated as far as i understand).

Code: Select all

%% Define Red Pitaya as TCP/IP object
clc
clear all
close all
IP= '125.40.41.97';           % Input IP of your Red Pitaya...
port = 5000;
tcpipObj=tcpip(IP, port);

tcpipObj.InputBufferSize = 16384*64;
tcpipObj.OutputBufferSize = 16384*64;
flushinput(tcpipObj)
flushoutput(tcpipObj)

%% Open connection with your Red Pitaya and close previous
x=instrfind;
fclose(x);
fopen(tcpipObj);
tcpipObj.Terminator = 'CR/LF';

%% ARBITRARY
% Calcualte arbitrary waveform with 16384 samples
% Values of arbitrary waveform must be in range from -1 to 1.
N=16383;
t=0:(2*pi)/N:2*pi;
x=ones(size(t));x(1)=0;x(end)=0;
% plot(t,x)
% grid on

% Convert waveforms to string with 5 decimal places accuracy
waveform_ch_1_0 =num2str(x,'%1.5f,');
% latest are empty spaces  “,”.
waveform_ch_1 =waveform_ch_1_0(1,1:length(waveform_ch_1_0)-3);

%%

fprintf(tcpipObj,'GEN:RST')                     % Reset to default settings
fprintf(tcpipObj,'SOUR1:FUNC ARBITRARY');       % Set function of output signal
fprintf(tcpipObj,['SOUR1:TRAC:DATA:DATA ' waveform_ch_1])  % Send waveforms to Red Pitya
fprintf(tcpipObj,'SOUR1:VOLT 0.7');             % Set amplitude of output signal
fprintf(tcpipObj,'SOUR1:FREQ:FIX 5000000');        % Set frequency of output signal

fprintf(tcpipObj,'SOUR1:BURS:STAT ON');    % Set burst mode to ON
fprintf(tcpipObj,'SOUR1:BURS:NOR -1');    % Infinity number of sine wave pulses
fprintf(tcpipObj,'SOUR1:BURS:INT:PER 100'); % Set time of burst period in microseconds = 5 * 1/Frequency * 1000000
fprintf(tcpipObj,'SOUR1:BURS:NCYC 1');       % Set 1 pulses of sine wave
fprintf(tcpipObj,'SOUR1:TRIG:IMM');          % Set generator trigger to immediately
fprintf(tcpipObj,'OUTPUT1:STATE ON');         % Set output to ON
%%
fclose(tcpipObj);

Festo
Posts: 10
Joined: Tue May 24, 2016 1:16 pm
Location: Berlin

Re: Pulse mode: Infinite number of repeated bursts doesn't w

Post by Festo » Tue Jul 12, 2016 10:44 am

I tried it and I could recognize the Signal. So it works on my RP.

Laurent
Posts: 18
Joined: Mon Jun 23, 2014 6:38 pm
Location: Paris

Re: Pulse mode: Infinite number of repeated bursts doesn't w

Post by Laurent » Tue Jul 12, 2016 2:28 pm

Well it works for 5 seconds (50000/10kHz). Then it stops. I use redpitaya 0.95.
maybe you have another version?

Festo
Posts: 10
Joined: Tue May 24, 2016 1:16 pm
Location: Berlin

Re: Pulse mode: Infinite number of repeated bursts doesn't w

Post by Festo » Mon Jul 18, 2016 8:11 am

Sorry. I thought you have another problem. The problem with to early ending process is also in my programm. Till now nowbody could found a solution.

Festo
Posts: 10
Joined: Tue May 24, 2016 1:16 pm
Location: Berlin

Re: Pulse mode: Infinite number of repeated bursts doesn't w

Post by Festo » Mon Jul 25, 2016 10:40 am

Did anyone find something out to fix this problem?

Festo
Posts: 10
Joined: Tue May 24, 2016 1:16 pm
Location: Berlin

Re: Pulse mode: Infinite number of repeated bursts doesn't w

Post by Festo » Mon Oct 17, 2016 12:58 pm

Did anyone find a solution yet? Is it a hardware or a software problem?

hugoralf
Posts: 3
Joined: Mon Jul 29, 2019 1:23 pm

Re: Pulse mode: Infinite number of repeated bursts doesn't work

Post by hugoralf » Mon Jul 29, 2019 4:04 pm

I didn't find the solution yet. Did anyone find the solution for such problem in matlab code?

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: Google [Bot] and 19 guests