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.
By default the highest available range is selected and auto ranging is enabled.
|
bool8_t | ScpChGetAutoRanging (TpDeviceHandle_t hDevice, uint16_t wCh) |
| Check whether auto ranging is enabled for a specified channel. More...
|
|
bool8_t | ScpChSetAutoRanging (TpDeviceHandle_t hDevice, uint16_t wCh, bool8_t bEnable) |
| Set auto ranging for a specified channel. More...
|
|
uint32_t | ScpChGetRanges (TpDeviceHandle_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 (TpDeviceHandle_t hDevice, uint16_t wCh) |
| Get the currently selected input range for a specified channel. More...
|
|
double | ScpChSetRange (TpDeviceHandle_t hDevice, uint16_t wCh, double dRange) |
| Set the input range for a specified channel. More...
|
|
uint32_t ScpChGetRanges |
( |
TpDeviceHandle_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
VALUE_CLIPPED | The requested input range is larger than the largest available range and clipped to that range. |
VALUE_MODIFIED | The requested input range is within the valid range but not available. The closest larger valid value is set. |
INVALID_VALUE | The requested input range is invalid. |
INVALID_CHANNEL | The requested channel number is not valid. |
INVALID_HANDLE | The handle is not a valid oscilloscope handle. |
DEVICE_GONE | The device indicated by the device handle is no longer available. |
LIBRARY_NOT_INITIALIZED | The library is not initialized, see LibInit(). |
SUCCESS | The function executed successfully. |
- Example
double dRange = 10;
printf( "ScpChSetRange = %f" , dRange );
- See also
- ScpChGetRanges
-
ScpChGetRange
- Since
- 0.4.0