EasyManuals Logo
Home>Agilent Technologies>Measuring Instruments>8163B

Agilent Technologies 8163B Programming Guide

Agilent Technologies 8163B
274 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 #207 background imageLoading...
Page #207 background image
How to Log Results VISA Programming Examples
Agilent 8163A/B, 8164A/B & 8166A/B Mainframes, Fifth Edition 207
How to Log Results
This example demonstrates how to use logging functions.
Install a Power Sensor in Slot 1, before executing this example.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <visa.h>
#define MAX_LOG_VALUES 4000 /* max number of values the
instrument is able to log */
#define HEADER_SIZE 7 /* includes 6 bytes header and 1 CR */
/* function prototypes for this examples/*
/* function for a simple error handling explained in example 1 */
void checkError(ViStatus session, ViStatus err_status );
/* initialize the visa interface */
ViStatus InitVisa ( ViSession *iHandle);
/*globals*/
static unsigned char logBuffer[MAX_LOG_VALUES * sizeof(ViReal64) +
HEADER_SIZE];
/*array for the float results */
static ViReal32 logResults[MAX_LOG_VALUES];
void main (void)
{
ViStatus errStatus; /* returned error code from visa call */
ViSession vi; /* current session handle */
ViChar replyBuf[256]; /* buffer holding answers from the
instrument */
ViChar c; /* used in the keyboard wait loop */
ViInt32 slot; /* slot number where the power meter is
plugged */
ViInt32 chan; /* channel to be logged */
ViInt32 i; /* loop counter */
ViInt32 noOfValues; /* number of values to be logged*/
ViReal64 averagingTime; /* aveaging time used in a logging cycle
*/
ViPChar replySubStr; /* pointer to a substring of the
instruments reply */

Table of Contents

Other manuals for Agilent Technologies 8163B

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies 8163B and is the answer not in the manual?

Agilent Technologies 8163B Specifications

General IconGeneral
BrandAgilent Technologies
Model8163B
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals