DioSetupInputLoadResistance

Applies To

GX5055, File.

Purpose

Sets the channels input pull-up and pull down resistive loads.

Syntax

DioSetupInputLoadResistance (nHandle, nChannelListMode, nCountOrFirstChannel, panChannelList, nLastChannel, dPullup, dPulldown, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
DIO Master handle, Slave handle or File board handle.
nChannelListMode
SHORT
Channel list mode dictates how nCountOrFirstChannel and panChannelList parameters are used. Channel list mode options are as follows:
0  DIO_CH_LIST_MODE_ARRAY_OF_CHANNELS: The user specifies an array of channels where nCountOrFirstChannel is the number of elements in the list array and panChannelList is an array contains the channels numbers. In this mode nLastChannel is ignored.
1  DIO_CH_LIST_MODE_ALL_BOARD_CHANNELS: Apply the settings to all the board’s channels associated with this board handle. In this mode nCountOrFirstChannel, panChannelList and nLastChannel variavles are ignored.
2  DIO_CH_LIST_MODE_ALL_DOMAIN_CHANNELS: Apply the settings to all the channels in the domain, e.g. if there are two boards in the domain (Master and a Slave), then all 64 channels will be set. In this mode nCountOrFirstChannel, panChannelList and nLastChannel variavles are ignored.
3  DIO_CH_LIST_MODE_RANGE_OF_CHANNELS: Apply settings to a range of channels where nCountOrFirstChannel is the first channel number and nLastChannel is the last channel number. In this mode panChannelList variavle is ignored.
nCountOrFirstChannel
SHORT
If nChannelListMode parameter is set to DIO_CH_LIST_MODE_ARRAY_OF_CHANNELS, then it is specifying the number of elements in the panChannelList array parameter.
If nChannelListMode parameter is set to DIO_CH_LIST_MODE_RANGE_OF_CHANNELS, then it is specifying the first channel number to apply the settings to,
otherwise it is ignored and should set to zero.
Channel number in the DIO domain, each DIO board adds 32 I/O channels. I/O channels number range is 0-991 (1 master and 30 slaves).
panChannelList
PSHORT
Array of channels numbers. Channels numbers can be from 0 to the last channel in the domain. E.g., if the domain has two boards then the last channel is 63.
This parameter is only used if nChannelListMode parameter is set to DIO_CH_LIST_MODE_ARRAY_OF_CHANNELS, otherwise is should be passed as NULL.
Channel number in the DIO domain, each DIO board adds 32 I/O channels. I/O channels number range is 0-991 (1 master and 30 slaves).
nLastChannel
SHORT
If nChannelListMode parameter is set to DIO_CH_LIST_MODE_RANGE_OF_CHANNELS, then it is specifying the last channel number to apply the settings to,
otherwise it is ignored and should set to zero.
Channel number in the DIO domain, each DIO board adds 32 I/O channels. I/O channels number range is 0-991 (1 master and 30 slaves).
dPullup
DOUBLE
Input pull-up resistive loads can be one of the following:
  1. DIO_RESISTIVE_LOAD_240_OHMS = 240
  2. DIO_RESISTIVE_LOAD_290_OHMS = 290
  3. DIO_RESISTIVE_LOAD_1K_OHMS = 1000
  4. DIO_RESISTIVE_LOAD_OPEN = -1
dPulldown
DOUBLE
Input pull down resistive loads can be one of the following:
  1. DIO_RESISTIVE_LOAD_240_OHMS = 240
  2. DIO_RESISTIVE_LOAD_290_OHMS = 290
  3. DIO_RESISTIVE_LOAD_1K_OHMS = 1000
  4. DIO_RESISTIVE_LOAD_OPEN = -1
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

Each channel has an independent load with the following capabilities:

0.  Channels’ Input constant source and sink currents up to 24 mA – DioSetupInputLoadCurrent  function.

1.    Maintain high impedance over a wide voltage.

2.    Separate high and low clamping (commutating) voltages – DioSetupInputLoadCurrentVoltageClamps function.

3.    Channels’ Input Resistive load options - DioSetupInputLoadResistance function.

With independent high and low clamping (commutating) voltages, the source and sink currents each have their own threshold voltage. If the voltage on the input, when the load is activated, is between the two clamping voltages, the load will remain in a high impedance state.

The input resistive load is useful in applications with very low DUT output swings (where a traditional active load will not switch on and off completely or quickly) and also as a means of forcing the DUT to a known voltage when the DUT is in HiZ.

Note: The source and sink currents should be programmed to 0 during normal operation of the resistive load.

When the resistive load is placed in HiZ (DIO_RESISTIVE_LOAD_OPEN) it maintains a low leakage current when the input voltage is between the supply rails.

Channels input pull-up and pull down resistive loads can be read back and set dynamically at any time even while the DIO is running mode.

Example

The following example uses an array of channels list to set the input pull-up to 240 ohms and pull down resistive to open:

SHORT anChannelList[]={0, 2, 5, 7, 9, 13, 14, 27};

DioSetupInputLoadResistance (nHandle, DIO_CH_LIST_MODE_ARRAY_OF_CHANNELS, 8, anChannelList, 0, DIO_RESISTIVE_LOAD_240_OHMS, DIO_RESISTIVE_LOAD_OPEN, &nStatus);

The following example sets all the board’s channels the input pull-up to 240 ohms and pull down resistive to open:

DioSetupInputLoadResistance (nHandle, DIO_CH_LIST_MODE_ALL_BOARD_CHANNELS, 0, NULL , 0, DIO_RESISTIVE_LOAD_240_OHMS, DIO_RESISTIVE_LOAD_OPEN, &nStatus);

The following example sets all the boards channels the input pull-up to 240 ohms and pull down resistive to open:

DioSetupInputLoadResistance (nHandle, DIO_CH_LIST_MODE_ALL_DOMAIN_CHANNELS, 0, NULL , 0, DIO_RESISTIVE_LOAD_240_OHMS, DIO_RESISTIVE_LOAD_OPEN, &nStatus);

The following example sets channels 5 to 10 the input pull-up to 240 ohms and pull down resistive to open:

DioSetupInputLoadResistance (nHandle, DIO_CH_LIST_MODE_RANGE_OF_CHANNELS, 5, NULL, 10, DIO_RESISTIVE_LOAD_240_OHMS, DIO_RESISTIVE_LOAD_OPEN, &nStatus);

 

See Also

DioSetupInputLoadCurrent, DioSetupInputLoadResistance, DioSetupInputThresholdVoltages, DioGetErrorString