LibTiePie  0.4.0
Library for interfacing TiePie engineering instruments
 All Files Functions Typedefs Groups Pages
Input channels

Functions

uint16_t ScpGetChannelCount (TpDeviceHandle_t hDevice)
 Get number of channels.
 
uint32_t ScpGetSharedChannelGroupCount (TpDeviceHandle_t hDevice)
 Get number of shared channel groups.
 
uint32_t ScpGetSharedChannelGroup (TpDeviceHandle_t hDevice, uint32_t dwGroupIndex, uint16_t *pChannelNumbers, uint32_t dwLength)
 Get channel number list for channel group.
 
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 ScpChGetConnectorType (TpDeviceHandle_t hDevice, uint16_t wCh)
 Get channel connector type.
 
uint64_t ScpChGetCouplings (TpDeviceHandle_t hDevice, uint16_t wCh)
 Get supported couplings.
 
uint64_t ScpChGetCoupling (TpDeviceHandle_t hDevice, uint16_t wCh)
 Get coupling.
 
uint64_t ScpChSetCoupling (TpDeviceHandle_t hDevice, uint16_t wCh, uint64_t qwCoupling)
 Set coupling.
 
bool8_t ScpChGetEnabled (TpDeviceHandle_t hDevice, uint16_t wCh)
 Check whether channel is enabled.
 
bool8_t ScpChSetEnabled (TpDeviceHandle_t hDevice, uint16_t wCh, bool8_t bEnable)
 Set channel enable.
 
bool8_t ScpChIsDifferential (TpDeviceHandle_t hDevice, uint16_t wCh)
 Check whether the channel has a differential input.
 
double ScpChGetProbeGain (TpDeviceHandle_t hDevice, uint16_t wCh)
 Get channel probe gain.
 
double ScpChSetProbeGain (TpDeviceHandle_t hDevice, uint16_t wCh, double dProbeGain)
 Set channel probe gain.
 
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.
uint32_t ScpChGetConnectorType ( TpDeviceHandle_t  hDevice,
uint16_t  wCh 
)

Get channel connector type.

Parameters
hDeviceA device handle.
wChChannel number, 0..ScpGetChannelCount() - 1.
Returns
Channel connector type.
uint64_t ScpChGetCoupling ( TpDeviceHandle_t  hDevice,
uint16_t  wCh 
)

Get coupling.

Parameters
hDeviceA device handle.
wChChannel number, 0..ScpGetChannelCount() - 1.
Returns
Coupling, a CK_* value.
uint64_t ScpChGetCouplings ( TpDeviceHandle_t  hDevice,
uint16_t  wCh 
)

Get supported couplings.

Parameters
hDeviceA device handle.
wChChannel number, 0..ScpGetChannelCount() - 1.
Returns
Supported couplings, a set of OR-ed CK_* values.
bool8_t ScpChGetEnabled ( TpDeviceHandle_t  hDevice,
uint16_t  wCh 
)

Check whether channel is enabled.

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

Get channel probe gain.

Parameters
hDeviceA device handle.
wChChannel number, 0..ScpGetChannelCount() - 1.
Returns
Probe gain.
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 ScpChIsDifferential ( TpDeviceHandle_t  hDevice,
uint16_t  wCh 
)

Check whether the channel has a differential input.

Parameters
hDeviceA device handle.
wChChannel number, 0..ScpGetChannelCount() - 1.
Returns
BOOL8_TRUE if differential, BOOL8_FALSE otherwise.
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.
uint64_t ScpChSetCoupling ( TpDeviceHandle_t  hDevice,
uint16_t  wCh,
uint64_t  qwCoupling 
)

Set coupling.

Parameters
hDeviceA device handle.
wChChannel number, 0..ScpGetChannelCount() - 1.
qwCouplingCoupling: a CK_* value.
Returns
Coupling, a CK_* value.
bool8_t ScpChSetEnabled ( TpDeviceHandle_t  hDevice,
uint16_t  wCh,
bool8_t  bEnable 
)

Set channel enable.

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

Set channel probe gain.

Parameters
hDeviceA device handle.
wChChannel number, 0..ScpGetChannelCount() - 1.
dProbeGainProbe gain.
Returns
Probe gain.
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.
uint16_t ScpGetChannelCount ( TpDeviceHandle_t  hDevice)

Get number of channels.

Parameters
hDeviceA device handle.
Returns
Number of channels.
uint32_t ScpGetSharedChannelGroup ( TpDeviceHandle_t  hDevice,
uint32_t  dwGroupIndex,
uint16_t *  pChannelNumbers,
uint32_t  dwLength 
)

Get channel number list for channel group.

Parameters
hDeviceA device handle.
dwGroupIndexGroup index, 0..ScpGetSharedChannelGroupCount() - 1.
pChannelNumbersPointer to channel number buffer or NULL.
dwLengthChannel number buffer length.
Returns
Number of channels in group.
See Also
ScpGetSharedChannelGroupCount
uint32_t ScpGetSharedChannelGroupCount ( TpDeviceHandle_t  hDevice)

Get number of shared channel groups.

Parameters
hDeviceA device handle.
Returns
Number of shared channel groups.
See Also
ScpGetSharedChannelGroup