Siglent SDG1025 MATLAB Programming ARB Waveform? - Page 1
Forum section: electronics / testgear

author: HaloArchive
author_rank: Newbie
timestamp: December 21, 2015, 10:21:25 pm
content: 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!

author: tautech
author_rank: Super Contributor
timestamp: December 21, 2015, 11:09:44 pm
content: Welcome to the forum.Links to Siglent's Matlab drivershttp://www.siglentamerica.com/gjjrj.aspx?id=204From the Matlab site:Control and Configure Function Generators:https://www.mathworks.com/products/instrument/supported/function-generator.htmlA UART example from Siglent I've had for a while: (not verified, also attached below)Code:32'h3E_EA20; //dds:fc*2^32*10/100MHz,3E_EA20 for 9600b/si_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 biti_uart_parity_random= 0; //1 means random parity bit,0 means right parity biti_uart_dwidth = 8; //the character bit number from 5---9i_tri_data_num = 16; //the bit number 1-32i_uart_parity = 2'b00; //01 or 10 for no parity, 00 for odd,11 for eveni_uart_stopbit = 2'b00; //00 for 1 bit,01 or 10 for 2 bit,11 for 1.5 biti_uart_polarity = 1'b1; //0 for the idle low and 1 for the idle highi_tri_data = 32'h8e_f1_94_5f;//the input data to compare with the rxd data and to //generate the rxd data

author: ivan747
author_rank: Super Contributor
timestamp: December 23, 2015, 03:49:34 am
content: That is very nice, Tautec. I'll give it a try.

author: tautech
author_rank: Super Contributor
timestamp: December 23, 2015, 04:02:44 am
content: Quote from: ivan747 on December 23, 2015, 03:49:34 amIvan, I have many more unfortunately they're all bus types: Can, I2C etc.Also many have Chinese //remsI''l hunt out a few and post them.

author: ivan747
author_rank: Super Contributor
timestamp: December 30, 2015, 09:51:20 pm
content: Quote from: tautech on December 23, 2015, 04:02:44 amCode is code

author: tautech
author_rank: Super Contributor
timestamp: December 31, 2015, 12:11:39 am
content: UART files attached, Rems in English

author: tautech
author_rank: Super Contributor
timestamp: December 31, 2015, 12:17:09 am
content: SPI files attached

author: tautech
author_rank: Super Contributor
timestamp: December 31, 2015, 12:20:06 am
content: LIN files attached

author: tautech
author_rank: Super Contributor
timestamp: December 31, 2015, 12:24:52 am
content: I2C files attached

author: ivan747
author_rank: Super Contributor
timestamp: December 31, 2015, 01:07:12 am
content: 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.

author: ivan747
author_rank: Super Contributor
timestamp: December 31, 2015, 01:13:26 am
content: 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.

author: tautech
author_rank: Super Contributor
timestamp: December 31, 2015, 01:49:09 am
content: Quote from: ivan747 on December 31, 2015, 01:13:26 amAll the SDG (AWG's) drivers are lower down on the driver page, just be sure to select the correct series, 800, 1000 or 5000