Download AlazarDSO User Guide
Transcript
AlazarDSO User Guide
unsigned
unsigned
unsigned
unsigned
int
int
int
int
WhichChannel:1;
BoardNumber:4;
SampleResolution:3;
DataFormat:2;
};
struct _HEADER1 {
unsigned int RecordNumber:24;
unsigned int BoardType:8;
};
struct _HEADER2 {
unsigned int TimeStampLowPart;
};
struct _HEADER3
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
};
{
int
int
int
int
int
int
int
int
int
int
int
int
TimeStampHighPart:8;
ClockSource:2;
ClockEdge:1;
SampleRate:7;
InputRange:5;
InputCoupling:2;
InputImpedence:2;
ExternalTriggered:1;
ChannelBTriggered:1;
ChannelATriggered:1;
TimeOutOccurred:1;
ThisChannelTriggered:1;
typedef struct _ALAZAR_HEADER {
struct _HEADER0 hdr0;
struct _HEADER1 hdr1;
struct _HEADER2 hdr2;
struct _HEADER3 hdr3;
} ALAZAR_HEADER, *PALAZAR_HEADER;
The following code fragment shows how to convert the record timestamp contained in a
record header structure from clock ticks to seconds.
double
AlazarHeaderTimestampToSeconds (
ALAZAR_HEADER *pAlazarHeaderHeader,
CAPTURE_FILE_HEADER *pCaptureFileHeader
)
{
DWORD dwTimestampHigh = pAlazarHeader->hdr3.TimeStampHighPart;
DWORD dwTimestampLow = pAlazarHeader->hdr2.TimeStampLowPart;
INT64 nTimestamp_counts;
nTimestamp_counts = (INT64) dwTimestampLow;
nTimestamp_counts |= (((INT64) (dwTimestampHigh & 0x0ff)) << 32);
double dTimestamp_sec =
(double) nTimestamp_counts *
pCaptureFileHeader->m_nTimestampMultiplier /
pCaptureFileHeader->m_dSamplesPerSecond;
return dTimestamp_sec;
}
© 2008-2010 Alazar Technologies Inc.
157