EasyManuals Logo

LeCroy WavePro 7300A User Manual

Default Icon
437 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 #230 background imageLoading...
Page #230 background image
228 WM-OM-E Rev I
// if the client app. was run before the scope then these events will be created,
// if the scope was run first then these events
// will just be opened
HANDLE m_hDataAvailable = CreateEvent(NULL, FALSE, FALSE /* initial state */,
szMutexDataAvailableName);
HANDLE m_hProcessingComplete = CreateEvent(NULL, FALSE, FALSE /* initial state */,
szMutexProcessingCompleteName);
if(m_hDataAvailable == 0 || m_hProcessingComplete == 0)
{
printf("Unable to open events\n");
return 0;
}
// main loop
while(1)
{
int i = 0;
printf("Waiting for new data...\n");
// wait an infinite amount of time for data to be available
DWORD waitSuccess = WaitForSingleObject(m_hDataAvailable, INFINITE);
// print the first few bytes of the input waveform
CDescHeader *descHeader = (CDescHeader *) &m_lpMMFile[0];
short *m_lpWaveform = &m_lpMMFile[descHeader->headerSize / sizeof(short)];
for(i = 0; i < 4; ++i)
printf("%f ", (m_lpWaveform[i] * descHeader->verGain) +
descHeader->verOffset);
// compute the mean of all data values, while computing the abs value of the waveform
//in-place
double sum = 0.0;
for(i = 0; i < descHeader->numSamples; ++i)
{
sum += (m_lpWaveform[i] * descHeader->verGain) + descHeader->verOffset;
m_lpWaveform[i] = abs(m_lpWaveform[i]);
}
sum /= descHeader->numSamples;
// modify the output units, set to Amps
strcpy(descHeader->verUnit, "A");
// print the mean, numer of samples, trigger time in seconds, and the segment index
printf(" (%f) %d %d %d\n", sum, descHeader->numSamples, (int)
(descHeader->trigTime / lecTimeStampOneSecond), descHeader->segmentIndex);

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the LeCroy WavePro 7300A and is the answer not in the manual?

LeCroy WavePro 7300A Specifications

General IconGeneral
BrandLeCroy
ModelWavePro 7300A
CategoryTest Equipment
LanguageEnglish

Related product manuals