About using Red Pitaya to generate signal

Applications, development tools, FPGA, C, WEB
Post Reply
tttt3222
Posts: 1
Joined: Wed Mar 13, 2024 11:06 am

About using Red Pitaya to generate signal

Post by tttt3222 » Wed Mar 13, 2024 11:16 am

Hello!
When I using STEMlab 125-10 to generate signal, I find that the type of signal and the amplitude of output signal can't be set on the matlab. I would like to know if the code is wrong or some other reason. The code is the example given by you.
The following is the cut of the code:
%% GENERATION
writeline(RP,'SOUR1:FUNC SINE');
writeline(RP,'SOUR1:FREQ:FIX 1000000'); % Set frequency of output signal
writeline(RP,'SOUR1:VOLT 1'); % Set amplitude of output signal

writeline(RP,'SOUR1:BURS:STAT BURST'); % Set burst mode to BURST
writeline(RP,'SOUR1:BURS:NCYC 3'); % Set 3 pulses of sine wave
Looking forward to your reply.

User avatar
redpitaya
Site Admin
Posts: 912
Joined: Wed Mar 26, 2014 7:04 pm

Re: About using Red Pitaya to generate signal

Post by redpitaya » Fri Mar 15, 2024 11:22 am

Hello tttt3222,

Thank you for writing on the forum.
The provided code looks OK, but several lines of code, crucial for the correct functionality, are missing.
First of all, please note that you are generating a burst signal. Without proper settings on the oscilloscope, you will miss the signal. I would suggest first generating a continuous signal, and once that is working, moving on to burst signals.

Secondly, please check whether the signal is correctly triggered. You need both of the following commands to trigger the output:

Code: Select all

writeline(RP,'OUTPUT1:STATE ON');           % Set output to ON
writeline(RP,'SOUR1:TRIG:INT');             % Generate trigger
Also, here are working examples that you can use to jumpstart your programing:
https://redpitaya.readthedocs.io/en/lat ... l#examples

User avatar
redpitaya
Site Admin
Posts: 912
Joined: Wed Mar 26, 2014 7:04 pm

Re: About using Red Pitaya to generate signal

Post by redpitaya » Fri Mar 15, 2024 11:23 am

I am moving this to Software.

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: No registered users and 77 guests