EasyManuals Logo

Keysight Technologies N5166B CXG Programming Guide

Keysight Technologies N5166B CXG
398 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #281 background imageLoading...
Page #281 background image
Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide 281
Creating and Downloading Waveform Files
Programming Examples
char s[20];
char cmd[200];
// The E4438C, E8267C and E8267D accept the E443xB format.
// so we can use this next section on any of these signal
generators.
// However the E443xB format only uses 14 bits.
bytesToSend = numsamples*2; // calculate the number of
bytes
sprintf(s, “%d”, bytesToSend); // create a string s with that
number of bytes
// The SCPI command has four parts.
// Part 1 = :MEM:DATA “filename”,
// Part 2 = length of Part 3 when written to a string
// Part 3 = length of the data in bytes. This is in s from
above.
// Part 4 = the buffer of data
// Build parts 1, 2, and 3 for the I data.
sprintf(cmd, “:MEM:DATA \”ARBI:FILE1\”, #%d%d”, strlen(s),
bytesToSend);
// Send parts 1, 2, and 3
iwrite(id, cmd, strlen(cmd), 0, 0);
// Send part 4. Be careful to use the correct command here. In
many
// programming languages, there are two methods to send SCPI
commands:
// Method 1 = stop at the first ‘0’ in the data
// Method 2 = send a fixed number of bytes, ignoring ‘0’ in the
data.
// You must find and use the correct command for Method 2.
iwrite(id, ibuffer, bytesToSend, 0, 0);
// Send a terminating carriage return
iwrite(id, “\n”, 1, 1, 0);

Table of Contents

Other manuals for Keysight Technologies N5166B CXG

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Keysight Technologies N5166B CXG and is the answer not in the manual?

Keysight Technologies N5166B CXG Specifications

General IconGeneral
BrandKeysight Technologies
ModelN5166B CXG
CategoryPortable Generator
LanguageEnglish

Related product manuals