Functions to control the input range of an oscilloscope channel.
An oscilloscope channel will have one or more different input ranges. The number of input ranges and which ranges are available depends on the selected input coupling. Use ScpChGetRanges() to determine how many and which ranges are available. Changing the input couping may change the selected input range.
An input channel supports auto ranging, where a suitable input range is selected based on the measured data of the last performed measurement with the channel. Manually setting a range will disable auto ranging.
When auto ranging of a channel is enabled and trigger level mode is set to TLM_ABSOLUTE, the input range will not auto range to a range that is smaller than the selected trigger level.
By default the highest available range is selected and auto ranging is enabled.
|
bool8_t | ScpChGetAutoRanging (LibTiePieHandle_t hDevice, uint16_t wCh) |
| Check whether auto ranging is enabled for a specified channel. More...
|
|
bool8_t | ScpChSetAutoRanging (LibTiePieHandle_t hDevice, uint16_t wCh, bool8_t bEnable) |
| Set auto ranging for a specified channel. More...
|
|
uint32_t | ScpChGetRanges (LibTiePieHandle_t hDevice, uint16_t wCh, double *pList, uint32_t dwLength) |
| Get the supported input ranges for a specified channel, with the currently selected coupling. More...
|
|
double | ScpChGetRange (LibTiePieHandle_t hDevice, uint16_t wCh) |
| Get the currently selected input range for a specified channel. More...
|
|
double | ScpChSetRange (LibTiePieHandle_t hDevice, uint16_t wCh, double dRange) |
| Set the input range for a specified channel. More...
|
|
uint32_t ScpChGetRanges |
( |
LibTiePieHandle_t |
hDevice, |
|
|
uint16_t |
wCh, |
|
|
double * |
pList, |
|
|
uint32_t |
dwLength |
|
) |
| |
Get the supported input ranges for a specified channel, with the currently selected coupling.
- Parameters
-
[in] | hDevice | A device handle identifying the oscilloscope. |
[in] | wCh | The channel number identifying the channel, 0 to ScpGetChannelCount() - 1 . |
[out] | pList | A pointer to an array for the input ranges. |
[in] | dwLength | The number of elements in the array. |
- Returns
- The total number of ranges.
- Status values
-
- Example
double* pRanges = malloc( sizeof( double ) * dwRangeCount );
dwRangeCount =
ScpChGetRanges( hDevice , wCh , pRanges , dwRangeCount );
printf( "ScpChGetRanges (Ch%u):\n" , wCh + 1 );
for( i = 0 ; i < dwRangeCount ; i++ )
printf( "- %f\n" , pRanges[ i ] );
free( pRanges );
- See also
- ScpChGetRange
-
ScpChSetRange
- Since
- 0.4.0
Get the currently selected input range for a specified channel.
- Parameters
-
- Returns
- The currently selected input range.
- Status values
-
- See also
- ScpChGetRanges
-
ScpChSetRange
- Since
- 0.4.0
Set the input range for a specified channel.
When a non existing input range value is tried to be set, the closest available larger input range is selected.
- Parameters
-
[in] | hDevice | A device handle identifying the oscilloscope. |
[in] | wCh | The channel number identifying the channel, 0 to ScpGetChannelCount() - 1 . |
[in] | dRange | The requested input range, or maximum absolute value that must fit within the range. |
- Returns
- The actually selected input range.
- Status values
-
- Example
double dRange = 10;
printf( "ScpChSetRange = %f" , dRange );
- See also
- ScpChGetRanges
-
ScpChGetRange
- Since
- 0.4.0