Agilent Technologies Infiniium 8000A Programmer's Reference Manual page 281

Table of Contents

Advertisement

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
//*****************************************************************************
//
//
Description: This file is broken into three sections
//
Section 1: Data Structures to describe Infiniium Public Waveform File
//
Section 2: Functions to correctly read .bin files
//
Section 3: Functions to convert a .bin file to .csv file
//*****************************************************************************
//
//
Description: Structures and Enumerations to describe Infiniium
//
Public Waveform File - using these structures assumes
//
a 32-Bit x86 Compiler
//
typedef struct
{
char Cookie[2];
char Version[2];
int
FileSize;
int
NumberOfWaveforms;
} tPBFileHeader;
const char PB_COOKIE[2] = {'A', 'G'};
const char PB_VERSION[2] = {'1', '0'};
#define DATE_TIME_STRING_LENGTH 16
#define FRAME_STRING_LENGTH
#define SIGNAL_STRING_LENGTH 16
typedef struct
{
int
HeaderSize;
int
WaveformType;
int
NWaveformBuffers;
int
Points;
int
Count;
float
XDisplayRange;
double XDisplayOrigin;
double XIncrement;
double XOrigin;
int
XUnits;
int
YUnits;
char
Date[DATE_TIME_STRING_LENGTH];
Example Program for Reading Binary Data
The following is a programming example of reading a Binary Data (.bin) file and
converting it to an XYPairs (.csv) file without a file header.
24
Disk Commands
BIN Header Format
13-27

Advertisement

Table of Contents
loading

Table of Contents