LibTiePie  0.4.3
Library for interfacing TiePie engineering instruments
 All Files Functions Typedefs Macros Groups Pages
Mode

This section contains measure mode related functions. More...

Functions

uint32_t ScpGetMeasureModes (TpDeviceHandle_t hDevice)
 Get the supported measure modes for a specified device.
 
uint32_t ScpGetMeasureMode (TpDeviceHandle_t hDevice)
 Get the current measure mode.
 
uint32_t ScpSetMeasureMode (TpDeviceHandle_t hDevice, uint32_t dwMeasureMode)
 Set the measure mode.
 

Detailed Description

This section contains measure mode related functions.

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 signalled that the measurement is ready. The computer will collect the data and can then start a new measurment. There will be gaps between consecutive measurements.

Advantage of block mode: Fast measurements using a high sample frequency are posible. 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 in blocks with a pre defined size to the computer, while the instrument remains measuring. This makes it possible to perform long continuous measurements without gaps.

Advantage of streaming mode: very long measurements are posible. Disadvantage of block mode: the maximum sample frequency is limited by the data transfer rate to computer and the computer speed

The size of the blocks is set using ScpSetRecordLength(). The combination of block size and sample frequency determines the duration of a block and also the rate at wich blocks are measured and need to be transferred. When the computer can not keep up with the block rate and blocks are measured faster than the computer can process them, the running measurement will be stopped and ScpIsDataOverflow() will return BOOL8_TRUE.

By default the measure mode is set to: Block mode (MM_BLOCK).

Function Documentation

uint32_t ScpGetMeasureModes ( TpDeviceHandle_t  hDevice)

Get the supported measure modes for a specified device.

Parameters
hDeviceA device handle.
Returns
The supported measure modes, a set of OR-ed MM_* values.
uint32_t ScpGetMeasureMode ( TpDeviceHandle_t  hDevice)

Get the current measure mode.

Parameters
hDeviceA device handle.
Returns
The currently selected measure mode, a MM_* value.
uint32_t ScpSetMeasureMode ( TpDeviceHandle_t  hDevice,
uint32_t  dwMeasureMode 
)

Set the measure mode.

Note
Changing the measure mode may affect the sample frequency and/or record length value.
Parameters
hDeviceA device handle.
dwMeasureModeThe required measure mode, a MM_* value.
Returns
The actually set measure mode, a MM_* value.