Test and Measurement Forum

Passing AWG Table from XL Vb to dll

Post any questions you may have about our current range of oscilloscopes

Passing AWG Table from XL Vb to dll

Postby RussellA » Tue Apr 12, 2011 6:37 pm

ref SetSigGenArbitrary

Hoping someone can help me here ..!
Have the AWG data in XL and can pull it into a 1d Array.
How do you define the function call / pointer "* arbitraryWaveform" to pass the data (waveform table) through the dll ?

Many Thanks,

Re: Passing AWG Table from XL Vb to dll

Postby Chris » Thu Apr 14, 2011 9:35 am

You will need to save the data as a file, then read the file into the buffer...

waveformSize = 0;
printf("Select a waveform file to load: ");
scanf("%s", fileName);
if ((fp = fopen(fileName, "r"))) // read in data - one number per line
while (EOF != fscanf(fp, "%hi", (arbitraryWaveform + waveformSize))&& waveformSize++ < 8192);
printf("File successfully loaded\n");
printf("Invalid filename\n");

The number of lines & values used will vary
i.e. for 4000 series: max 8192 lines, values 0..4095
for 2000 series: max 4094 lines, values 0..255
Site Admin
Site Admin
Posts: 169
Joined: Tue Aug 17, 2010 9:00 am
Location: St. Neots

Return to USB PC Oscilloscopes

Who is online

Users browsing this forum: No registered users and 0 guests