LibTiePie
0.9.16
Library for interfacing TiePie engineering instruments
|
Functions to control the clock source of the oscilloscope.
Oscilloscopes can support multiple clock sources, use ScpGetClockSources() to determine the available clock sources for an oscilloscope.
When an oscilloscope supports selecting an external clock source, refer to the instrument manual for the location of the external clock input and the specifications of the required external clock signal.
Depending on the instrument, an external clock input can support multiple input frequencies. Use ScpGetClockSourceFrequencies() to determine which frequencies are supported.
By default the clock source is set to: Internal (CS_INTERNAL).
Functions | |
uint32_t | ScpGetClockSources (LibTiePieHandle_t hDevice) |
Get the supported clock sources of the specified oscilloscope. More... | |
uint32_t | ScpGetClockSource (LibTiePieHandle_t hDevice) |
Get the currently selected clock source of the specified oscilloscope. More... | |
uint32_t | ScpSetClockSource (LibTiePieHandle_t hDevice, uint32_t dwClockSource) |
Set the clock source of the specified oscilloscope. More... | |
uint32_t | ScpGetClockSourceFrequencies (LibTiePieHandle_t hDevice, double *pList, uint32_t dwLength) |
Get an array with the supported clock source frequencies of the specified oscilloscope. More... | |
double | ScpGetClockSourceFrequency (LibTiePieHandle_t hDevice) |
Get the current clock source frequency of the specified oscilloscope. More... | |
double | ScpSetClockSourceFrequency (LibTiePieHandle_t hDevice, double dClockSourceFrequency) |
Set the clock source frequency of the specified oscilloscope. More... | |
uint32_t ScpGetClockSources | ( | LibTiePieHandle_t | hDevice | ) |
Get the supported clock sources of the specified oscilloscope.
[in] | hDevice | A device handle identifying the oscilloscope. |
0
when unsuccessful. 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 ScpGetClockSource | ( | LibTiePieHandle_t | hDevice | ) |
Get the currently selected clock source of the specified oscilloscope.
[in] | hDevice | A device handle identifying the oscilloscope. |
0
when unsuccessful. 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 ScpSetClockSource | ( | LibTiePieHandle_t | hDevice, |
uint32_t | dwClockSource | ||
) |
Set the clock source of the specified oscilloscope.
[in] | hDevice | A device handle identifying the oscilloscope. |
[in] | dwClockSource | The requested clock source, a CS_* value. |
0
when unsuccessful. 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. |
uint32_t ScpGetClockSourceFrequencies | ( | LibTiePieHandle_t | hDevice, |
double * | pList, | ||
uint32_t | dwLength | ||
) |
Get an array with the supported clock source frequencies of the specified oscilloscope.
The caller must assure that enough memory is allocated. This function is only available when the clock source is set to CS_EXTERNAL.
[in] | hDevice | A device handle identifying the oscilloscope. |
[out] | pList | A pointer to an array for the clock source frequencies, or NULL . |
[in] | dwLength | The number of elements in the array. |
0
when unsuccessful. NOT_SUPPORTED | The oscilloscope does not support external clock or the clock source is not set to CS_EXTERNAL. |
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 ScpGetClockSourceFrequency | ( | LibTiePieHandle_t | hDevice | ) |
Get the current clock source frequency of the specified oscilloscope.
This function is only available when the clock source is set to CS_EXTERNAL.
[in] | hDevice | A device handle identifying the oscilloscope. |
0
when unsuccessful. NOT_SUPPORTED | The oscilloscope does not support external clock or the clock source is not set to CS_EXTERNAL. |
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 ScpSetClockSourceFrequency | ( | LibTiePieHandle_t | hDevice, |
double | dClockSourceFrequency | ||
) |
Set the clock source frequency of the specified oscilloscope.
This function is only available when the clock source is set to CS_EXTERNAL.
[in] | hDevice | A device handle identifying the oscilloscope. |
[in] | dClockSourceFrequency | The required clock source frequency in Hz. |
0
when unsuccessful. VALUE_CLIPPED | The requested clock source frequency is outside the valid range and clipped to the closest limit. |
VALUE_MODIFIED | The requested clock source frequency is within the valid range but not available. The closest valid value is set. |
INVALID_VALUE | The requested value is invalid. |
NOT_SUPPORTED | The oscilloscope does not support external clock or the clock source is not set to CS_EXTERNAL. |
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. |