LibTiePie  0.9.16
Library for interfacing TiePie engineering instruments

Description

Functions to control the clock output type.

Oscilloscopes can support supplying a clock output signal, use ScpGetClockOutputs() to determine the available clock outputs for an oscilloscope.

When an oscilloscope supports selecting a clock output signal, refer to the instrument manual for the location of the clock output and the specifications of the clock output signal.

Depending on the instrument, a clock output can support multiple output frequencies. Use ScpGetClockSourceFrequencies() to determine which frequencies are supported.

By default the clock output is disabled (CO_DISABLED).

Functions

uint32_t ScpGetClockOutputs (LibTiePieHandle_t hDevice)
 Get the supported clock outputs of the specified oscilloscope. More...
 
uint32_t ScpGetClockOutput (LibTiePieHandle_t hDevice)
 Get the currently selected clock output of the specified oscilloscope. More...
 
uint32_t ScpSetClockOutput (LibTiePieHandle_t hDevice, uint32_t dwClockOutput)
 Set the clock output of the specified oscilloscope. More...
 
uint32_t ScpGetClockOutputFrequencies (LibTiePieHandle_t hDevice, double *pList, uint32_t dwLength)
 Get an array with the supported clock output frequencies of the specified oscilloscope. More...
 
double ScpGetClockOutputFrequency (LibTiePieHandle_t hDevice)
 Get the current clock output frequency of the specified oscilloscope. More...
 
double ScpSetClockOutputFrequency (LibTiePieHandle_t hDevice, double dClockOutputFrequency)
 Set the clock output frequency of the specified oscilloscope. More...
 

Function Documentation

uint32_t ScpGetClockOutputs ( LibTiePieHandle_t  hDevice)

Get the supported clock outputs of the specified oscilloscope.

Parameters
[in]hDeviceA device handle identifying the oscilloscope.
Returns
The supported clock outputs, a set of OR-ed CO_* values, or 0 when unsuccessful.
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
ScpGetClockOutput
ScpSetClockOutput
ScpGetClockOutputFrequencies
ScpGetClockOutputFrequency
ScpSetClockOutputFrequency
Since
0.4.0
uint32_t ScpGetClockOutput ( LibTiePieHandle_t  hDevice)

Get the currently selected clock output of the specified oscilloscope.

Parameters
[in]hDeviceA device handle identifying the oscilloscope.
Returns
The current clock output, a CO_* value, or 0 when unsuccessful.
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
ScpGetClockOutputs
ScpSetClockOutput
ScpGetClockOutputFrequencies
ScpGetClockOutputFrequency
ScpSetClockOutputFrequency
Since
0.4.0
uint32_t ScpSetClockOutput ( LibTiePieHandle_t  hDevice,
uint32_t  dwClockOutput 
)

Set the clock output of the specified oscilloscope.

Parameters
[in]hDeviceA device handle identifying the oscilloscope.
[in]dwClockOutputThe requested clock output, a CO_* value.
Returns
The actually set clock output, a CO_* value, or 0 when unsuccessful.
Status values
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_INITIALIZEDThe library is not initialized, see LibInit().
SUCCESS The function executed successfully.
See also
ScpGetClockOutputs
ScpGetClockOutput
ScpGetClockOutputFrequencies
ScpGetClockOutputFrequency
ScpSetClockOutputFrequency
Since
0.4.0
uint32_t ScpGetClockOutputFrequencies ( LibTiePieHandle_t  hDevice,
double *  pList,
uint32_t  dwLength 
)

Get an array with the supported clock output frequencies of the specified oscilloscope.

The caller must assure that enough memory is allocated. This function is only available when the clock output is set to CO_FIXED.

Parameters
[in]hDeviceA device handle identifying the oscilloscope.
[out]pListA pointer to an array for the clock output frequencies, or NULL.
[in]dwLengthThe number of elements in the array.
Returns
Total number of supported clock output frequencies, or 0 when unsuccessful.
Status values
NOT_SUPPORTED The oscilloscope does not support clock output or the clock output is not set to CO_FIXED.
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.
Example
uint32_t dwLength = ScpGetClockOutputFrequencies( hDevice , NULL , 0 );
double* pFrequencies = malloc( sizeof( double ) * dwLength );
dwLength = ScpGetClockOutputFrequencies( hDevice , pFrequencies , dwLength );
for( i = 0 ; i < dwLength ; i++ )
{
printf( "%f\n" , pFrequencies[ i ] );
}
free( pFrequencies );
See also
ScpGetClockOutputs
ScpGetClockOutput
ScpSetClockOutput
ScpGetClockOutputFrequency
ScpSetClockOutputFrequency
Since
0.6
double ScpGetClockOutputFrequency ( LibTiePieHandle_t  hDevice)

Get the current clock output frequency of the specified oscilloscope.

This function is only available when the clock output is set to CO_FIXED.

Parameters
[in]hDeviceA device handle identifying the oscilloscope.
Returns
The current clock output frequency in Hz, or 0 when unsuccessful.
Status values
NOT_SUPPORTED The oscilloscope does not support clock output or the clock output is not set to CO_FIXED.
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
ScpGetClockOutputs
ScpGetClockOutput
ScpSetClockOutput
ScpGetClockOutputFrequencies
ScpSetClockOutputFrequency
Since
0.6
double ScpSetClockOutputFrequency ( LibTiePieHandle_t  hDevice,
double  dClockOutputFrequency 
)

Set the clock output frequency of the specified oscilloscope.

This function is only available when the clock output is set to CO_FIXED.

Parameters
[in]hDeviceA device handle identifying the oscilloscope.
[in]dClockOutputFrequencyThe required clock output frequency in Hz.
Returns
The actually set clock output frequency in Hz, or 0 when unsuccessful.
Status values
VALUE_CLIPPED The requested clock output frequency is outside the valid range and clipped to the closest limit.
VALUE_MODIFIED The requested clock output 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 clock output or the clock output is not set to CO_FIXED.
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
ScpGetClockOutputs
ScpGetClockOutput
ScpSetClockOutput
ScpGetClockOutputFrequencies
ScpGetClockOutputFrequency
Since
0.6