DioGetInputLoadState

Applies To

GX5055, GX5295, File

Purpose

Returns the channel input load states.

Syntax

DioGetInputLoadState (nHandle, pnState, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
DIO Master board handle, Board handle or File board handle.
nChannel
SHORT
If Board Handle was passed:
Channel number in the DIO board, each board has 32 I/O channels. I/O channels number range is 0-31.
Gx5295: Each DIO board has 4 Auxiliary channels. Auxiliary channels number range is 0-3.
If Master Board Handle was passed:
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).
Gx5295: Each DIO board adds 4 Auxiliary channels, Auxiliary channels number range is 0-123 (1 master and 30 slaves)
pnState
PSHORT
Returned load states:
0. DIO_LOAD_DISCONNECTED: Load is not connected.
1. DIO_LOAD_CONNECTED: Load is connected.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

GX5055:

The function enables all the loads to be applied to the specified input channels (constant source and the resistive load). When the load is enabled there is a ~40Ohm resistor in between the input And the loads.

Each channel has an independent load with the following capabilities:

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

2.    Maintain high impedance over a wide voltage.

3.    Separate high and low commutating voltages – DioSetupInputLoadCommutatingVoltage function.

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

With independent high and low 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 commutating voltages, the load will remain in a high impedance state.

GX5295:

Each channel has an independent load with the following capabilities:

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

     Maintain high impedance over a wide voltage.

     Single commutating voltage – DioSetupInputLoadCommutatingVoltage function.

With a single commutating voltage, the source and sink currents have a single threshold voltage.

Channels input source and sink constant currents can be read back and set dynamically at any time even while the DIO is running mode.

Example

The following example returns the Input load state for channel 0:

 

SHORT nState;

DioGetInputLoadState (nHandle, 0, &nState, &nStatus);

 

See Also

DioSetupInputLoadState, DioSetupInputLoadCurrent, DioSetupInputLoadCommutatingVoltage, DioSetupInputLoadResistance, DioSetupInputThresholdVoltages, DioGetErrorString