Problem with DC function

Applications, development tools, FPGA, C, WEB
Post Reply
User avatar
ElectroNick
Posts: 3
Joined: Tue Dec 04, 2018 10:28 pm

Problem with DC function

Post by ElectroNick » Mon Mar 22, 2021 8:32 am

The problem is with the DC function. It always outputs a square wave. It was tested with an oscilloscope. So this seems to be a bug with the firmware, or something is wrong with our version. I found a workaround by just setting the voltage amplitude to zero and using an offset, as shown in the SCPI commands page from the documentation.

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

Re: Problem with DC function

Post by redpitaya » Mon Mar 22, 2021 8:34 am

If you just replace SINE with DC or DC_NEG
it should work fine, tested with latest beta. Maybe you are using an old OS.
%% Define Red Pitaya as TCP/IP object

IP= '192.168.178.111'; % Input IP of your Red Pitaya...
port = 5000;
tcpipObj=tcpip(IP, port);

%% Open connection with your Red Pitaya

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

fprintf(tcpipObj,'GEN:RST');
fprintf(tcpipObj,'SOUR1:FUNC DC'); % Set function of output signal
% {sine, square, triangle, sawu,sawd, pwm}
fprintf(tcpipObj,'SOUR1:FREQ:FIX 2000'); % Set frequency of output signal
fprintf(tcpipObj,'SOUR1:VOLT 1'); % Set amplitude of output signal
fprintf(tcpipObj,'OUTPUT1:STATE ON'); % Set output to ON

%% Close connection with Red Pitaya

fclose(tcpipObj);

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 2 guests