LibTiePie  0.4.1
Library for interfacing TiePie engineering instruments
 All Files Functions Typedefs Groups Pages
Range

Functions

bool8_t ScpChGetAutoRanging (TpDeviceHandle_t hDevice, uint16_t wCh)
 Check whether auto ranging is enabled.
 
bool8_t ScpChSetAutoRanging (TpDeviceHandle_t hDevice, uint16_t wCh, bool8_t bEnable)
 Set auto ranging.
 
uint32_t ScpChGetRanges (TpDeviceHandle_t hDevice, uint16_t wCh, double *pList, uint32_t dwLength)
 Get supported ranges for current coupling.
 
uint32_t ScpChGetRangesEx (TpDeviceHandle_t hDevice, uint16_t wCh, uint64_t qwCoupling, double *pList, uint32_t dwLength)
 Get supported ranges by coupling.
 
double ScpChGetRange (TpDeviceHandle_t hDevice, uint16_t wCh)
 Get range.
 
double ScpChSetRange (TpDeviceHandle_t hDevice, uint16_t wCh, double dRange)
 Set range.
 

Detailed Description

Function Documentation

bool8_t ScpChGetAutoRanging ( TpDeviceHandle_t  hDevice,
uint16_t  wCh 
)

Check whether auto ranging is enabled.

Parameters
hDeviceA device handle.
wChChannel number, 0..ScpGetChannelCount() - 1.
Returns
BOOL8_TRUE if enabled, BOOL8_FALSE if disabled.
double ScpChGetRange ( TpDeviceHandle_t  hDevice,
uint16_t  wCh 
)

Get range.

Parameters
hDeviceA device handle.
wChChannel number, 0..ScpGetChannelCount() - 1.
Returns
Range.
uint32_t ScpChGetRanges ( TpDeviceHandle_t  hDevice,
uint16_t  wCh,
double *  pList,
uint32_t  dwLength 
)

Get supported ranges for current coupling.

Example:

uint32_t dwRangeCount = ScpChGetRanges( hDevice , wCh , NULL , 0 );
double Ranges[ dwRangeCount ];
dwRangeCount = ScpChGetRanges( hDevice , wCh , Ranges , dwRangeCount );
printf( "ScpChGetRanges (Ch%u):\n" , wCh + 1 );
for( uint32_t i = 0 ; i < dwRangeCount ; i++ )
printf( "- %f\n" , Ranges[ i ] );
Parameters
hDeviceA device handle.
wChChannel number, 0..ScpGetChannelCount() - 1.
pListPointer to array.
dwLengthNumber of elements in array.
Returns
Total number of ranges.
See Also
ScpChGetRangesEx
uint32_t ScpChGetRangesEx ( TpDeviceHandle_t  hDevice,
uint16_t  wCh,
uint64_t  qwCoupling,
double *  pList,
uint32_t  dwLength 
)

Get supported ranges by coupling.

Parameters
hDeviceA device handle.
wChChannel number, 0..ScpGetChannelCount() - 1.
qwCouplingCoupling: a CK_* value.
pListPointer to array.
dwLengthNumber of elements in array.
Returns
Total number of ranges.
See Also
ScpChGetRanges
bool8_t ScpChSetAutoRanging ( TpDeviceHandle_t  hDevice,
uint16_t  wCh,
bool8_t  bEnable 
)

Set auto ranging.

Parameters
hDeviceA device handle.
wChChannel number, 0..ScpGetChannelCount() - 1.
bEnableBOOL8_TRUE to enable or BOOL8_FALSE to disable.
Returns
BOOL8_TRUE if enabled, BOOL8_FALSE if disabled.
double ScpChSetRange ( TpDeviceHandle_t  hDevice,
uint16_t  wCh,
double  dRange 
)

Set range.

Example:

double dRange = 10;
dRange = ScpChSetRange( hDevice , wCh , dRange );
printf( "ScpChSetRange = %f" , dRange );
Parameters
hDeviceA device handle.
wChChannel number, 0..ScpGetChannelCount() - 1.
dRangeMaximum value that must fit within range.
Returns
Range.