Keysight E4428C ESG RF Programming Manual page 283

Signal generators
Table of Contents

Advertisement

// as needed.
//**********************************************************************************
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include
"visa.h"
//
// IMPORTANT:
//
Configure the following three lines correctly before compiling and running
char* instOpenString ="TCPIP0::xxx.xxx.xxx.xxx::INSTR"; // your instrument's IP address
const char* localSrcFile = "\\Files\\IQ_DataC";
const char* instDestFile = "/USER/WAVEFORM/IQ_DataC";
const int BUFFER_SIZE = 100*1024;// Size of the copy buffer
int main(int argc, char* argv[])
{
ViSession defaultRM, vi;
ViStatus status = 0;
status = viOpenDefaultRM(&defaultRM);// Open the default resource manager
// TO DO: Error handling here
status = viOpen(defaultRM, instOpenString, VI_NULL, VI_NULL, &vi);
if (status)// If any errors then display the error and exit the program
{
fprintf(stderr, "viOpen failed (%s)\n", instOpenString);
return -1;
}
FILE* file = fopen(localSrcFile, "rb");// Open local source file for binary reading
if (!file) // If any errors display the error and exit the program
{
fprintf(stderr, "Could not open file: %s\n", localSrcFile);
Keysight Signal Generators Programming Guide
Creating and Downloading Waveform Files
Programming Examples
275

Advertisement

Table of Contents
loading

Table of Contents