LibTiePie
0.9.16
Library for interfacing TiePie engineering instruments
|
Functions for controlling the measure mode.
Oscilloscopes measure in block mode or in streaming mode. This is determined by the measure mode.
When measuring in block mode (MM_BLOCK), the oscilloscope uses its internal memory to store the measured data. Once the pre defined number of samples is measured, measuring stops and the computer is notified that the measurement is ready. The computer can collect the data and can then start a new measurement. There will be gaps between consecutive measurements.
Advantage of block mode: Fast measurements using a high sample frequency are possible. Disadvantage of block mode: Record length is limited by the instrument's memory size.
When measuring in streaming mode (MM_STREAM), the measured data is transferred continuously to the computer and collected in a buffer, while the instrument remains measuring. When a pre defined number of samples has been collected in the buffer, LibTiePie will notify the calling application that a new chunk of data is available to be collected. The calling application can then get that chunk of data and add it to previously collected data. This makes it possible to perform long continuous measurements without gaps.
Advantage of streaming mode: very long measurements are posible. Disadvantage of streaming mode: the maximum sample frequency is limited by number of enabled channels, the selected resolution, the data transfer rate to computer and the computer speed.
The size of the chunks is set using ScpSetRecordLength(). The combination of chunk size and sample frequency determines the duration of a chunk and also the rate at wich chunks are measured and need to be transferred. When the computer can not keep up with the chunk rate and chunks are measured faster than the computer can process them, the running measurement will be stopped and ScpIsDataOverflow() will return BOOL8_TRUE and data overflow notifications will be triggered.
By default the measure mode is set to: Block mode (MM_BLOCK).
Functions | |
uint32_t | ScpGetMeasureModes (LibTiePieHandle_t hDevice) |
Get the supported measure modes for a specified oscilloscope. More... | |
uint32_t | ScpGetMeasureMode (LibTiePieHandle_t hDevice) |
Get the current measure mode. More... | |
uint32_t | ScpSetMeasureMode (LibTiePieHandle_t hDevice, uint32_t dwMeasureMode) |
Set the measure mode. More... | |
uint32_t ScpGetMeasureModes | ( | LibTiePieHandle_t | hDevice | ) |
Get the supported measure modes for a specified oscilloscope.
[in] | hDevice | A device handle identifying the oscilloscope. |
INVALID_HANDLE | The handle is not a valid oscilloscope handle. |
OBJECT_GONE | The object indicated by the handle is no longer available. |
LIBRARY_NOT_INITIALIZED | The library is not initialized, see LibInit(). |
SUCCESS | The function executed successfully. |
uint32_t ScpGetMeasureMode | ( | LibTiePieHandle_t | hDevice | ) |
Get the current measure mode.
[in] | hDevice | A device handle identifying the oscilloscope. |
INVALID_HANDLE | The handle is not a valid oscilloscope handle. |
OBJECT_GONE | The object indicated by the handle is no longer available. |
LIBRARY_NOT_INITIALIZED | The library is not initialized, see LibInit(). |
SUCCESS | The function executed successfully. |
uint32_t ScpSetMeasureMode | ( | LibTiePieHandle_t | hDevice, |
uint32_t | dwMeasureMode | ||
) |
Set the measure mode.
[in] | hDevice | A device handle identifying the oscilloscope. |
[in] | dwMeasureMode | The required measure mode, a MM_* value. |
INVALID_VALUE | The requested measure mode is invalid. |
INVALID_HANDLE | The handle is not a valid oscilloscope handle. |
OBJECT_GONE | The object indicated by the handle is no longer available. |
LIBRARY_NOT_INITIALIZED | The library is not initialized, see LibInit(). |
SUCCESS | The function executed successfully. |