EasyManuals Logo

Agilent Technologies EMC Series Programmer's Guide

Agilent Technologies EMC Series
349 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 #132 background imageLoading...
Page #132 background image
132 Chapter 3
Programming Examples
Reading Trace Data Using 32-bit Real Format (RS-232)
scanf( "%c",&cEnter);
/*Externally route the 50MHz Signal*/
viPrintf(viESA,"CAL:SOUR:STAT ON \n");
}
}
void main()
{
/*Program Variables*/
ViStatus viStatus= 0;
ViChar _VI_FAR cResult[1024000] = {0};
ViReal32 dTraceArray[1024] = {0};
char cBufferInfo[7]= {0};
long lNumberBytes =0L;
long lOpc =0L;
unsigned long lRetCount = 0L;
int iSize = 0;
/*BytesPerPnt is 4 for Real32 or Int32 formats, 8 for Real64, and 2 for Uint16*/
int iBytesPerPnt = 4;
int iSwpPnts = 401; /*Number of points per sweep*/
int iDataBytes = 1604;/*Number of data points, assuming 4 bytes per point*/
int iHeaderBytes = 6; /*Number of bytes in the header, assuming 1604 data bytes*/
FILE *fTraceFile;
/* Open a serial session at COM1 */
viStatus=viOpenDefaultRM(&defaultRM);
if (viStatus =viOpen(defaultRM,"ASRL1::INSTR",VI_NULL,VI_NULL,&viESA) !=
VI_SUCCESS)
{
printf("Could not open a session to ASRL device at COM1!!\n");
exit(0);
}
/*Clear the instrument */
viClear(viESA);
/*Reset the instrument. This will set number of sweep points to default of 401*/
viPrintf(viESA,"*RST\n");
/*Display the program heading */
printf("\n\t\t Read in Trace Data using ASCII Format (using RS-232) Program \n\n"
);
/* Set the input port to the internal 50MHz reference source */
Route50MHzSignal();

Table of Contents

Other manuals for Agilent Technologies EMC Series

Questions and Answers:

Question and Answer IconNeed help?

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

Agilent Technologies EMC Series Specifications

General IconGeneral
BrandAgilent Technologies
ModelEMC Series
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals