![LeCroy DDA-3000A Скачать руководство пользователя страница 230](http://html1.mh-extra.com/html/lecroy/dda-3000a/dda-3000a_operators-manual_1866311230.webp)
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);
Содержание DDA-3000A
Страница 1: ...LECROY X STREAM OSCILLOSCOPES O P E R AT O R S M A N U A L SEPTEMBER 2006 ...
Страница 18: ...16 WM OM E Rev I BLANK PAGE ...
Страница 64: ...62 WM OM E Rev I icon in Channels dialog zooms one trace zooms all displayed traces ...
Страница 65: ...X Stream Operator s Manual WM OM E Rev I 63 then Math Setup then Measure Setup then Utilities Setup ...
Страница 80: ...78 WM OM E Rev I 4 Select a language 5 Click Next when the Wizard appears ...
Страница 81: ...X Stream Operator s Manual WM OM E Rev I 79 6 Select Complete setup ...
Страница 157: ...X Stream Operator s Manual WM OM E Rev I 155 ...
Страница 170: ...168 WM OM E Rev I 5 Read the status information in line StatusDescription ...
Страница 214: ...212 WM OM E Rev I Delay Parameter Find Range selected ...
Страница 263: ...X Stream Operator s Manual WM OM E Rev I 261 ...
Страница 284: ...282 WM OM E Rev I ...
Страница 285: ...X Stream Operator s Manual WM OM E Rev I 283 Using a Surface Plot Excel Example 5 ...
Страница 321: ...X Stream Operator s Manual WM OM E Rev I 319 Further Examples of MATLAB Waveform Functions Negate the input signal ...
Страница 324: ...322 WM OM E Rev I ...