1158
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference
39
Reference
Example Program for Reading Binary Data
The following is a programming example of reading a Binary Data (.bin)
file and converting it to a CSV (.csv) file without a file header.
/* bintoascii.c */
/* Reads the binary file format.
This program demonstrates how to import the Infiniium
oscilloscope binary file format and how to export it to an
ascii comma separated file format.
*/
#pragma pack(4)
#include <stdio.h>
/* location of: printf() */
#include <stdlib.h>
/* location of: atof(), atoi() */
#include <string.h>
/* location of: strlen() */
#include "sicl.h"
/* Defines */
#define MAX_LENGTH 10000000
#define INTERFACE "lan[130.29.70.247]:inst0" /* Change the IP address
* to the one found in
* the Remote Setup
* dialog box.
*/
#define TRUE 1
#define FALSE 0
#define IO_TIMEOUT 20000
/* Type definitions */
typedef unsigned _int64 UINT64; /* This defines a 64-bit unsigned
* integer for Microsoft platforms.
*/
/* Structure and Union definitions */
union DATATYPE
{
char buffer[MAX_LENGTH];
/* Buffer for reading word format data */
char byte[MAX_LENGTH];
unsigned short word[MAX_LENGTH/2];
UINT64 longlong[MAX_LENGTH/4];
};
typedef struct
{
char Cookie[2];
char Version[2];
int
FileSize;
int
NumberOfWaveforms;
} FileHeader;
const char COOKIE[2] = {'A', 'G'};
const char VERSION[2] = {'1', '0'};
Содержание Infiniium 90000 Q-Series
Страница 1: ...s1 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference...
Страница 50: ...50 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 2 Setting Up...
Страница 86: ...86 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 3 Introduction to Programming...
Страница 146: ...146 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 8 Programming Conventions...
Страница 190: ...190 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 11 Calibration Commands...
Страница 274: ...274 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 14 Digital Commands...
Страница 292: ...292 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 15 Disk Commands...
Страница 318: ...318 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 16 Display Commands...
Страница 364: ...364 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 17 Function Commands...
Страница 382: ...382 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 19 Histogram Commands...
Страница 404: ...404 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 20 InfiniiScan ISCan Commands...
Страница 412: ...412 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 21 Limit Test Commands...
Страница 416: ...416 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 22 Lister Commands...
Страница 696: ...696 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 25 Measure Commands...
Страница 702: ...702 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 26 Pod Commands...
Страница 760: ...760 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 29 Self Test Commands...
Страница 804: ...804 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 30 Serial Data Equalization Commands...
Страница 818: ...818 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 31 System Commands...
Страница 830: ...830 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 32 Time Base Commands...
Страница 930: ...930 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 33 Trigger Commands...
Страница 1000: ...1000 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 35 Waveform Memory Commands...
Страница 1018: ...1018 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 37 Error Messages...
Страница 1109: ...Sample Programs 38 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 1109 print End of program...
Страница 1150: ...1150 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 38 Sample Programs...
Страница 1186: ...1186 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference Index...