![Rohde & Schwarz SMBV100A Скачать руководство пользователя страница 545](http://html1.mh-extra.com/html/rohde-and-schwarz/smbv100a/smbv100a_operating-manual_1477735545.webp)
Remote Control Commands
R&S
®
SMBV100A
530
Operating Manual 1176.8016.02 ─ 17
// SICO.wv
// Generating a binary data set from the I/Q pairs in the file SICO.txt
// and storing the result to file SICO.wv
FILE *fp_sour, *fp_dest;
float i_float, q_float;
unsigned short i_usint, q_usint;
fp_sour = fopen("SICO.TXT", "rt");
if (fp_sour == 0)
return -1;
fp_dest = fopen("SICO.WV", "wb");
if (fp_dest == 0)
{
fclose(fp_sour);
return -1;
}
// Write required tags to waveform file
fprintf(fp_dest, "{TYPE: SMU-WV,0}");
fprintf(fp_dest, "{CLOCK: 10e6}");
fprintf(fp_dest, "{SAMPLES: %d}", samples);
// RMS, Peak
fprintf(fp_dest, "{LEVEL OFFS: %f,%f}", -1.0f * 20.0f * log10(1.0f/sqrt(2.0f)), 0.0f);
fprintf(fp_dest, "{WAVEFORM-%d:#", (samples * 4) + 1);
for (i=0; i<samples; i++)
{
// Read I/Q pair from ASCII file
if (fscanf(fp_sour, "%f %f", &i_float, &q_float) == EOF)
break;
// Convert I/Q pair to unsigned short
i_usint = (unsigned short)floor((i_float * 32767.0) + 0.5);
q_usint = (unsigned short)floor((q_float * 32767.0) + 0.5);
// Write converted I/Q pair to waveform file
fwrite(&i_usint, 2, 1, fp_dest);
fwrite(&q_usint, 2, 1, fp_dest);
}
fprintf(fp_dest, "}");
fclose(fp_dest);
fclose(fp_sour);
return 0;
}
7.4.4 Creating an ASCII C-List Manually
When you create the C-list in the editor, as shown in the figure, you get an ASCII file
with the extension
*.dm_iqc
(see the example
Waveform and List Format
Содержание SMBV100A
Страница 1: ...R S SMBV100A Vector Signal Generator Operating Manual Operating Manual 1176 8016 02 17 ÚÞ 2 ...
Страница 31: ...Contents R S SMBV100A 16 Operating Manual 1176 8016 02 17 ...
Страница 129: ...Manual Operation R S SMBV100A 114 Operating Manual 1176 8016 02 17 Legend of Front Panel Controls ...