EEVblog Electronics Community Forum

Products => Test Equipment => Topic started by: HaloArchive on December 21, 2015, 10:21:25 pm

Title: Siglent SDG1025 MATLAB Programming ARB Waveform?
Post by: HaloArchive on December 21, 2015, 10:21:25 pm
Hello All,

I have been playing around with the SDG1025 for a few months now and was wondering if anyone has some code to generate and then upload an arbitrary waveform to the SDG1025 via MATLAB? I know that there are a few Agilent examples floating around but there obviously isn't much for Siglent.  I know how to use SCPI commands to control the waveforms through the VISA interface, but would really like to see an example of uploading arbitrary waveform via MATLAB.

Thanks!
Title: Re: Siglent SDG1025 MATLAB Programming ARB Waveform?
Post by: tautech on December 21, 2015, 11:09:44 pm
Welcome to the forum.

Links to Siglent's Matlab drivers
http://www.siglentamerica.com/gjjrj.aspx?id=204 (http://www.siglentamerica.com/gjjrj.aspx?id=204)

From the Matlab site:
Control and Configure Function Generators:
https://www.mathworks.com/products/instrument/supported/function-generator.html (https://www.mathworks.com/products/instrument/supported/function-generator.html)

A UART example from Siglent I've had for a while: (not verified, also attached below)

Code: [Select]
32'h3E_EA20;     //dds:fc*2^32*10/100MHz,3E_EA20 for 9600b/s
      i_uart_idle_en=2'b00;        //among char bit,00 for no idle bit ,01 or 10 for random     //idle within 3bit,11 for stably 2 bit   
      i_uart_parity_random= 0;     //1 means random parity bit,0 means right parity bit
      i_uart_dwidth = 8;           //the character bit number from 5---9
      i_tri_data_num = 16;         //the bit number 1-32
      i_uart_parity = 2'b00;       //01 or 10 for no parity, 00 for odd,11 for even
      i_uart_stopbit = 2'b00;      //00 for 1 bit,01 or 10 for 2 bit,11 for 1.5 bit
      i_uart_polarity = 1'b1;      //0 for the idle low and 1 for the idle high
      i_tri_data = 32'h8e_f1_94_5f;//the input data to compare with the rxd data and to       //generate the rxd data
Title: Re: Siglent SDG1025 MATLAB Programming ARB Waveform?
Post by: ivan747 on December 23, 2015, 03:49:34 am
That is very nice, Tautec. I'll give it a try.

Title: Re: Siglent SDG1025 MATLAB Programming ARB Waveform?
Post by: tautech on December 23, 2015, 04:02:44 am
That is very nice, Tautec. I'll give it a try.
Ivan, I have many more unfortunately they're all bus types: Can, I2C etc.
Also many have Chinese //rems

I''l hunt out a few and post them.
Title: Re: Siglent SDG1025 MATLAB Programming ARB Waveform?
Post by: ivan747 on December 30, 2015, 09:51:20 pm
That is very nice, Tautec. I'll give it a try.
Ivan, I have many more unfortunately they're all bus types: Can, I2C etc.
Also many have Chinese //rems

I''l hunt out a few and post them.

Code is code ;)
Title: Re: Siglent SDG1025 MATLAB Programming ARB Waveform?
Post by: tautech on December 31, 2015, 12:11:39 am
UART files attached, Rems in English
Title: Re: Siglent SDG1025 MATLAB Programming ARB Waveform?
Post by: tautech on December 31, 2015, 12:17:09 am
SPI files attached
Title: Re: Siglent SDG1025 MATLAB Programming ARB Waveform?
Post by: tautech on December 31, 2015, 12:20:06 am
LIN files attached
Title: Re: Siglent SDG1025 MATLAB Programming ARB Waveform?
Post by: tautech on December 31, 2015, 12:24:52 am
I2C files attached
Title: Re: Siglent SDG1025 MATLAB Programming ARB Waveform?
Post by: ivan747 on December 31, 2015, 01:07:12 am
Tautech, I only see the Labview drivers on the link you gave, am I missing something?

I am guessing those files are really .m files and they go together.
Title: Re: Siglent SDG1025 MATLAB Programming ARB Waveform?
Post by: ivan747 on December 31, 2015, 01:13:26 am
I'm gonna take a guess and say it's the "Siglent SDG 1000 5000 800 Series Signal Generator Certified LabVIEW Plug and Play" driver because of its recent release and 1.0 version.


...
...
...
It wasn't.
Title: Re: Siglent SDG1025 MATLAB Programming ARB Waveform?
Post by: tautech on December 31, 2015, 01:49:09 am
I'm gonna take a guess and say it's the "Siglent SDG 1000 5000 800 Series Signal Generator Certified LabVIEW Plug and Play" driver because of its recent release and 1.0 version.


...
...
...
It wasn't.
All the SDG (AWG's) drivers are lower down on the driver page, just be sure to select the correct series, 800, 1000 or 5000