Specifications
Chapter 18 287
PSA Programming Examples
Using C to Save Binary Trace Data
PSA Programming Examples
Using C to Save Binary Trace Data
This C programming example (Trace.c) can be found on the
Documentation CD.
This example uses Option B7J.
/***************************************************************************
* Trace.c
* Agilent Technologies 2001
*
* Instrument Requirements:
* E444xA with option B7J and firmware version >= A.02.00 or
* E4406A with firmware version >= A.05.00
*
* This Program shows how to get and save binary trace data in Basic mode
* The results are saved to C:\trace.txt
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include "visa.h"
void main ()
{
/*program variable*/
ViSession defaultRM, viPSA;
ViStatus viStatus= 0;
char sBuffer[80]= {0};
char dummyvar;
FILE *fTraceFile;
long lNumberPoints= 0;
long lNumberBytes= 0;
long lLength= 0;
long i = 0;
long lOpc = 0L;
unsigned long lBytesRetrieved;