LibTiePie  0.8.0
Library for interfacing TiePie engineering instruments

Description

Functions for controlling the measure mode.

Oscilloscopes measure in block mode or in streaming mode. This is determined by the measure mode.

Block 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.

Streaming mode

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...
 

Function Documentation

uint32_t ScpGetMeasureModes ( LibTiePieHandle_t  hDevice)

Get the supported measure modes for a specified oscilloscope.

Parameters
[in]hDeviceA device handle identifying the oscilloscope.
Returns
The supported measure modes, a set of OR-ed MM_* values.
Status values
INVALID_HANDLE The handle is not a valid oscilloscope handle.
OBJECT_GONE The object indicated by the handle is no longer available.
LIBRARY_NOT_INITIALIZEDThe library is not initialized, see LibInit().
SUCCESS The function executed successfully.
See also
ScpGetMeasureMode
ScpSetMeasureMode
Since
0.4.0
uint32_t ScpGetMeasureMode ( LibTiePieHandle_t  hDevice)

Get the current measure mode.

Parameters
[in]hDeviceA device handle identifying the oscilloscope.
Returns
The currently selected measure mode, a MM_* value.
Status values
INVALID_HANDLE The handle is not a valid oscilloscope handle.
OBJECT_GONE The object indicated by the handle is no longer available.
LIBRARY_NOT_INITIALIZEDThe library is not initialized, see LibInit().
SUCCESS The function executed successfully.
See also
ScpGetMeasureModes
ScpSetMeasureMode
Since
0.4.0
uint32_t ScpSetMeasureMode ( LibTiePieHandle_t  hDevice,
uint32_t  dwMeasureMode 
)

Set the measure mode.

Parameters
[in]hDeviceA device handle identifying the oscilloscope.
[in]dwMeasureModeThe required measure mode, a MM_* value.
Returns
The actually set measure mode, a MM_* value.
Remarks
Changing the measure mode may affect the sample frequency and/or record length.
Status values
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_INITIALIZEDThe library is not initialized, see LibInit().
SUCCESS The function executed successfully.
See also
ScpGetMeasureModes
ScpGetMeasureMode
Since
0.4.0