LibTiePie
0.9.12
Library for interfacing TiePie engineering instruments
|
Functions to control pre samples.
When pre samples are selected (pre sample ratio > 0), the trigger point is located at position (pre sample ratio * record length), dividing the record in pre samples and post samples. This way it is possible to "look back in time" since the pre samples were captured before the trigger moment.
Pre sample ratio is set as a number between 0 and 1, representing the percentage of the total record length:
By default the pre sample ratio is: 0 (no pre samples).
The pre sample buffer is not completely filled by default. When a trigger occurs before the pre sample buffer is filled, part of the pre samples will be invalid. Use ScpGetValidPreSampleCount() before collecting the data to determine the amount of valid pre samples. To ensure the pre samples buffer will be completely filled, set the trigger hold off to TH_ALLPRESAMPLES.
Functions | |
double | ScpGetPreSampleRatio (LibTiePieHandle_t hDevice) |
Get the current pre sample ratio of a specified oscilloscope. More... | |
double | ScpSetPreSampleRatio (LibTiePieHandle_t hDevice, double dPreSampleRatio) |
Set the pre sample ratio of a specified oscilloscope. More... | |
double ScpGetPreSampleRatio | ( | LibTiePieHandle_t | hDevice | ) |
Get the current pre sample ratio of a specified oscilloscope.
[in] | hDevice | A device handle identifying the oscilloscope. |
0
and 1
. NOT_SUPPORTED | The indicated oscilloscope does not support pre samples with the current settings. |
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. |
double ScpSetPreSampleRatio | ( | LibTiePieHandle_t | hDevice, |
double | dPreSampleRatio | ||
) |
Set the pre sample ratio of a specified oscilloscope.
[in] | hDevice | A device handle identifying the oscilloscope. |
[in] | dPreSampleRatio | The required pre sample ratio, a number between 0 and 1 . |
0
and 1
. NOT_SUPPORTED | The indicated oscilloscope does not support pre samples with the current settings. |
INVALID_VALUE | The requested value 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. |