EasyManuals Logo

Keysight Technologies X Series Programming Guide

Keysight Technologies X Series
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 #134 background imageLoading...
Page #134 background image
134 Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide
Programming Examples
LAN Programming Interface Examples
*
> $Function: queryInstrument$
*
* $Description: send a SCPI command to the instrument, return a
response.$
*
* $Parameters: $
* (FILE *) . . . . . . . . . file pointer associated with TCP/IP
socket.
* (const char *command) . . SCPI command string.
* (char *result) . . . . . . where to put the result.
* (size_t) maxLength . . . . maximum size of result array in
bytes.
*
* $Return: (long) . . . . . . . The number of bytes in result
buffer.
*
* $Errors: returns 0 if anything goes wrong. $
*
******************************************************************/
long queryInstrument(SOCKET sock,
const char *command, char *result, size_t
maxLength)
{
long ch;
char tmp_buf[8];
long resultBytes = 0;
int command_err;
int count;
/*********************************************************
* Send command to signal generator
*********************************************************/
command_err = commandInstrument(sock, command);
if (command_err) return COMMAND_ERROR;

Table of Contents

Other manuals for Keysight Technologies X Series

Questions and Answers:

Question and Answer IconNeed help?

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

Keysight Technologies X Series Specifications

General IconGeneral
BrandKeysight Technologies
ModelX Series
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals