Keysight Technologies X-Series Programming Manual page 273

Signal generators
Hide thumbs Also See for X-Series:
Table of Contents

Advertisement

Creating and Downloading Waveform Files
Programming Examples
char buffer memory
write except the
represents the
lenToSend
lenLen, lenToSend);
Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide
unsigned char* buf = new unsigned char[BUFFER_SIZE]; // Allocate
if (buf && lenToSend)
{
// Do not send the EOI (end of instruction) terminator on any
// last one
viSetAttribute( vi, VI_ATTR_SEND_END_EN, 0 );
// Prepare and send the SCPI command header
char s[20];
sprintf(s, "%d", lenToSend);
int lenLen = strlen(s);
unsigned char s2[256];
// Write the command mmem:data and the header.The number lenLen
// number of bytes and the actual number of bytes is the variable
sprintf((char*)s2, "mmem:data \"%s\", #%d%d", instDestFile,
// Send the command and header to the signal generator
viWrite(vi, s2, strlen((char*)s2), 0);
long numRead;
// Send file in BUFFER_SIZE chunks to the signal generator
273

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents