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.
About using Red Pitaya to generate signal
- redpitaya
- Site Admin
- Posts: 925
- Joined: Wed Mar 26, 2014 7:04 pm
Re: About using Red Pitaya to generate signal
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:
Also, here are working examples that you can use to jumpstart your programing:
https://redpitaya.readthedocs.io/en/lat ... l#examples
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
https://redpitaya.readthedocs.io/en/lat ... l#examples
- redpitaya
- Site Admin
- Posts: 925
- Joined: Wed Mar 26, 2014 7:04 pm
Re: About using Red Pitaya to generate signal
I am moving this to Software.
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 7 guests