282 Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide
Creating and Downloading Waveform Files
Programming Examples
// Identical to the section above, except for the Q data.
sprintf(cmd, “:MEM:DATA \”ARBQ:FILE1\”, #%d%d”,
strlen(s),bytesToSend);
iwrite(id, cmd, strlen(cmd), 0, 0);
iwrite(id, qbuffer, bytesToSend, 0, 0);
iwrite(id, “\n”, 1, 1, 0);
printf(“Loaded FILE1 using the E443xB format\n”);
// The E4438C, E8267C and E8267D have a newer faster format which
// allows 16 bits to be used. However this format is not
accepted in
// the E443xB. Therefore do not use this next section for the
E443xB.
printf(“Note: Loading FILE2 on a E443xB will cause \”ERROR: 208,
I/O error\”\n”);
// Identical to the I and Q sections above except
// a) The I and Q data are interleaved
// b) The buffer of I+Q is twice as long as the I buffer was.
// c) The SCPI command uses WFM1 instead of ARBI and ARBQ.
bytesToSend = numsamples*4;
sprintf(s, “%d”, bytesToSend);
sprintf(cmd, “:mem:data \”WFM1:FILE2\”, #%d%d”,
strlen(s),bytesToSend);
iwrite(id, cmd, strlen(cmd), 0, 0);
iwrite(id, iqbuffer, bytesToSend, 0, 0);
iwrite(id, “\n”, 1, 1, 0);
printf(“Loaded FILE2 using the E4438C, E8267C and E8267D
format\n”);
return 0;
}
Содержание X-Series
Страница 4: ...4 ...
Страница 10: ...10 Contents ...